react-native-webrtc / react-native-webrtc/react-native-callkeep

Could not invoke RNCallKeep.getAudioRoutes

Open
#504 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
511
Avg merge
9h 12m
Merged PRs (30d)
2

Description

Bug report

  • I've checked the example to reproduce the issue.

  • Reproduced on:

  • Android

  • iOS

Description

Phone is crashing after calling getAudioRoutes

Steps to Reproduce

Execute:

        RNCallKeep.getAudioRoutes().then((routes) => {
          console.log(routes)
        })

Versions

- Callkeep: 4.3.1
- React Native: 0.65.1
- iOS:
- Android: 5.1.1
- Phone model: 

Logs

E/unknown:ReactNative(26649): Exception in native call
E/unknown:ReactNative(26649): java.lang.RuntimeException: Could not invoke RNCallKeep.getAudioRoutes
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:383)
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
E/unknown:ReactNative(26649): 	at android.os.Handler.handleCallback(Handler.java:739)
E/unknown:ReactNative(26649): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
E/unknown:ReactNative(26649): 	at android.os.Looper.loop(Looper.java:145)
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
E/unknown:ReactNative(26649): 	at java.lang.Thread.run(Thread.java:818)
E/unknown:ReactNative(26649): Caused by: java.lang.reflect.InvocationTargetException
E/unknown:ReactNative(26649): 	at java.lang.reflect.Method.invoke(Native Method)
E/unknown:ReactNative(26649): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/unknown:ReactNative(26649): 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
E/unknown:ReactNative(26649): 	... 8 more
E/unknown:ReactNative(26649): Caused by: java.lang.NoSuchMethodError: No virtual method getDevices(I)[Landroid/media/AudioDeviceInfo; in class Landroid/media/AudioManager; or its super classes (declaration of 'android.media.AudioManager' appears in /system/framework/framework.jar:classes2.dex)
E/unknown:ReactNative(26649): 	at io.wazo.callkeep.RNCallKeepModule.getAudioRoutes(RNCallKeepModule.java:616)```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at RNCallKeepModule.java line 616, where getAudioRoutes is reported to fail, and review the Android 5.1.1 reproduction and stack trace. Reproduce the call on the affected Android version and verify that getAudioRoutes no longer crashes and returns audio routes.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.