Open CVRamana opened 4 years ago
Can you let me know what the stack trace looks like?
@slycoder Stack trace getting from Android Studio
I/ReactNativeJS: '_onRoomDidDisconnect ERROR: ', undefined W/System.err: java.lang.IllegalArgumentException: Receiver not registered: com.twiliorn.library.CustomTwilioVideoView$BecomingNoisyReceiver@e09020 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1012) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1342) W/System.err: at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:608) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:608) at com.twiliorn.library.CustomTwilioVideoView.setAudioFocus(CustomTwilioVideoView.java:413) at com.twiliorn.library.CustomTwilioVideoView.access$1300(CustomTwilioVideoView.java:88) at com.twiliorn.library.CustomTwilioVideoView$3.onDisconnected(CustomTwilioVideoView.java:701) at com.twilio.video.Video$2.onDisconnected(Video.java:185) at com.twilio.video.Room$1.lambda$onDisconnected$4$Room$1(Room.java:150) at com.twilio.video.-$$Lambda$Room$1$ZNVpZ-qxz87vdKMI7r9ywt-W_hA.run(lambda) at android.os.Handler.handleCallback(Handler.java:836) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6339) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
It actually looks like some kind of race condition --- it's disconnecting so quickly that some of the set up code hasn't actually be run yet causing the error.
But the underlying question is why you're getting disconnected so quickly...
Did you find out the reason? I also got that same problem.
Can you add logging around the onRoomDidConnect and onRoomDidDisconnect methods to see if it is successfully connecting and disconnecting?
Steps to reproduce
1.get the access token 2.enter access token ad room name from the my device and in the emulater w 3.pressing the connect button gets me this error.
Expected behaviour
should establish the video connection successfully between the two
Actual behaviour
when i generate room from second device it get onRoomDidDisconnect() called after the connect button press with Error-undefine
Environment
react-native-twilio-video-webrtc
Version: "master"