App crash on video call in android
See original GitHub issueDescription
I received an error report with the above exception in Android 7,9, 10 versions on SDK 2.8.2. Unfortunately, I can’t tell whether it was related to screen orientation change because it is happening on the client-side. But when I tested on my devices which both ave android 10, It’s working fine.
Code to start call:
val defaultOptions = JitsiMeetConferenceOptions.Builder() .setAudioMuted(true) .setVideoMuted(true) .setSubject(state.res.class_name) .setToken(state.res.meeting_token) .setServerURL(URL(BuildConfig.CONFERENCE_URL)) .setUserInfo(JitsiMeetUserInfo(ss.getJitsiUserInfoBundle())) .setFeatureFlag(Constant.INVITE_ENABLED,false) .setFeatureFlag(Constant.LIVE_STREAMING_ENABLED,false) .setRoom(BuildConfig.CONFERENCE_URL.plus(state.name)) .setWelcomePageEnabled(false) .build() JitsiMeetActivity.launch(activity,defaultOptions)
Crash reports:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.jitsi.meet.sdk.ListenerUtils.runListenerMethodOnUiThread(ListenerUtils.java:139) at org.jitsi.meet.sdk.ListenerUtils.access$000(ListenerUtils.java:35) at org.jitsi.meet.sdk.ListenerUtils$1.run(ListenerUtils.java:114) at android.os.Handler.handleCallback(Handler.java:888) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:8147) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at org.jitsi.meet.sdk.ListenerUtils.runListenerMethodOnUiThread(ListenerUtils.java:135) ... 9 more Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'org.jitsi.meet.sdk.JitsiMeetView org.jitsi.meet.sdk.JitsiMeetFragment.getJitsiView()' on a null object reference at org.jitsi.meet.sdk.JitsiMeetActivity.getJitsiView(JitsiMeetActivity.java:106) at org.jitsi.meet.sdk.JitsiMeetActivity.leave(JitsiMeetActivity.java:122) at org.jitsi.meet.sdk.JitsiMeetActivity.finish(JitsiMeetActivity.java:95) at org.jitsi.meet.sdk.JitsiMeetActivity.onConferenceTerminated(JitsiMeetActivity.java:220) ... 11 more
Current behavior
I received an error report with the above exception in Android 7,9, 10 versions on SDK 2.8.2. Unfortunately, I can’t tell whether it was related to screen orientation change because it is happening on the client-side. But when I tested on my devices which both ave android 10, It’s working fine.
Steps to reproduce
Start a video call and then try to rotate the screen.
Environment details
Jitsi SDK Version: 2.8.2 Android versions: 7.1.1, 9, 10.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Today I tested that issue on Jitsi Meet version 20.4.1 and it looks much stable - I did 50-70 rotates without any crash. So, maybe that issue is resolved in SDK 2.10.0 Tested on Redmi Note 5 Android 9 and Samsung S8 Android 9
https://github.com/react-native-webrtc/react-native-webrtc/issues/720#issuecomment-552374206 try this it worked for me the only thing you need to do is make your minimum version to 24 minSdkVersion = 24