react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

Could not invoke RNCallKeep.getAudioRoutes

Open m4r00p opened this issue 4 years ago • 0 comments

Bug report

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

  • Reproduced on:

  • [x] 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)```

m4r00p avatar Dec 09 '21 15:12 m4r00p