Description
Samsung Galaxy A54 5G sample app crash on launch due to:
ZoomVideoSDKVideoHelper.rotateMyVideo(int)’ on a null object reference
commenting out (in Android studio) this line
protected void refreshRotation() {
int displayRotation = display.getRotation();
// boolean ret = ZoomVideoSDK.getInstance().getVideoHelper().rotateMyVideo(displayRotation);
}
temporary resolve the crash and the app work as expected
Errors
FATAL EXCEPTION: main
Process: com.ekaansh.zoomexpo, PID: 28549
java.lang.NullPointerException: Attempt to invoke interface method ‘boolean us.zoom.sdk.ZoomVideoSDKVideoHelper.rotateMyVideo(int)’ on a null object reference
at com.reactnativezoom.videosdk.RNZoomViewManager.refreshRotation(RNZoomViewManager.java:230)
at com.reactnativezoom.videosdk.RNZoomViewManager$1.onDisplayChanged(RNZoomViewManager.java:220)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:1774)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.lambda$sendDisplayEvent$0(DisplayManagerGlobal.java:1742)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.$r8$lambda$aO0d1U2yv7-42_0MvY8uEf7AtpE(Unknown Source:0)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate$$ExternalSyntheticLambda0.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
2025-04-09 16:26:06.560 772-772 Layer surfaceflinger
Which React Native Video SDK version?
“@zoom/react-native-videosdk”: “^1.13.10”, (from sample app)
Trying to upgrade to
“@zoom/react-native-videosdk”: “^1.13.12”, or even
“@zoom/react-native-videosdk”: “^2.1.10”,
did not fix the issue
Video SDK Code Snippets
Just running the sample app and launching the app on Samsung Galaxy A54 5G
videosdk-reactnative-quickstart
To Reproduce(If applicable)
Steps to reproduce the behavior:
Clone videosdk-reactnative-quickstart
run yarn
run npx expo start
run npx expo run:android --device
App is build and installed on Samsung Galaxy A54 5G
Open the app - app crash
check logcat error -ZoomVideoSDKVideoHelper.rotateMyVideo(int) on a null object reference
Screenshots
N/A
Troubleshooting Routes
This is happening on the videosdk-reactnative-quickstart
Commenting out the related code with Android studio temporary avoid the crash
Smartphone (please complete the following information):
Thanks for detailing the issue you’re facing and walking through it with me during developer office hours. After looking into it a bit more, this issue might be due to Android’s DisplayManager triggering onDisplayChanged before the Zoom session has started. This would cause the error-causing method to happen too soon and lead to the crash. Adding a null check could possibly help prevent this.
@ekaansh.zoom@ticorrian.heard could you either of you speak more to this issue and provide a fix? The developer is running into this issue when attempting to build the app from this blog.
Hi,
Yes just pulled the last version with
“@zoom/react-native-videosdk”: “^2.1.10”, and the app still crash on Android as soon as app open with the same error I also had to change
Thanks for the update,
However my issue that the sample app crash on Android immediately when app open, I don’t even try to rotate the camera it just crashes soon as the app open
This is a Native Android crash - it may only happen on my test device (Samsung Galaxy A54 5G) or may be a larger issue with Samsung devices in general
If you don’t have access to this or similar device you can try Samsung free to try remote-test-lab service
I pinpoint the crash to native Android code in the SDK:
protected void refreshRotation() {
int displayRotation = display.getRotation();
->> boolean ret = ZoomVideoSDK.getInstance().getVideoHelper().rotateMyVideo(displayRotation);
}
I’m going to use a local patch by commenting out this line to temporary override the crash but will appreciate if Zoom team can investigate and fix this native crash