Crash when calling method ZoomSDK.getInstance().isInitialized() before ZoomSDK initilization

Hello,
I update the newer SDK, but when I call method ZoomSDK.getInstance().isInitialized(), I get this error.

java.lang.NoClassDefFoundError: com.zipow.videobox.VideoBoxApplication
at com.zipow.videobox.VideoBoxApplication.getNonNullInstance(Unknown Source:0)
at com.zipow.videobox.mainboard.Mainboard.getMainboard(Mainboard.java:121)
at com.zipow.videobox.ptapp.PTApp.isInitialForMainboard(PTApp.java:2435)
at com.zipow.videobox.ptapp.PTApp.getSdkAuthResult(PTApp.java:1894)
at us.zoom.sdk.ZoomSDK.isInitialized(ZoomSDK.java:602)
at com.android.zmdemo.activity.BaseMainActivity.initAndLoginZoom(BaseMainActivity.java:135)
at com.android.zmdemo.activity.BaseMainActivity$12.run(BaseMainActivity.java:843)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

 Caused by: java.lang.ExceptionInInitializerError
    at com.zipow.videobox.VideoBoxApplication.getNonNullInstance(Unknown Source:0)
    at com.zipow.videobox.mainboard.Mainboard.getMainboard(Mainboard.java:121)
    at com.zipow.videobox.ptapp.PTApp.isInitialForMainboard(PTApp.java:2435)
    at com.zipow.videobox.ptapp.PTApp.getSdkAuthResult(PTApp.java:1894)
    at us.zoom.sdk.ZoomSDK.isInitialized(ZoomSDK.java:602)
    at us.zoom.sdk.ZoomSDK.getMeetingService(ZoomSDK.java:817)
    at com.android.zmdemo.util.NotifyDataUtils.getUploadNotifyData(NotifyDataUtils.java:59)
    at com.android.zmdemo.util.ZoomStatusNotifyUtil.uploadStatusNotify(ZoomStatusNotifyUtil.java:36)
    at com.android.zmdemo.activity.BaseCtrlActivity$7.run(BaseCtrlActivity.java:1096)
    at microsoft.aspnet.signalr.client.Connection.onConnected(Connection.java:606)
    at microsoft.aspnet.signalr.client.Connection$12.run(Connection.java:730)
    at microsoft.aspnet.signalr.client.Connection$12.run(Connection.java:709)
    at microsoft.aspnet.signalr.client.SignalRFuture.setResult(SignalRFuture.java:73)
    at microsoft.aspnet.signalr.client.transport.AutomaticTransport$1.run(AutomaticTransport.java:97)
    at microsoft.aspnet.signalr.client.transport.AutomaticTransport$1.run(AutomaticTransport.java:91)
    at microsoft.aspnet.signalr.client.SignalRFuture.setResult(SignalRFuture.java:73)
    at microsoft.aspnet.signalr.client.transport.WebsocketTransport$1.onOpen(WebsocketTransport.java:102)
    at org.java_websocket.client.WebSocketClient.onWebsocketOpen(WebSocketClient.java:267)
    at org.java_websocket.WebSocketImpl.open(WebSocketImpl.java:664)
    at org.java_websocket.WebSocketImpl.decodeHandshake(WebSocketImpl.java:287)
    at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:160)
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:185)
    at java.lang.Thread.run(Thread.java:764)

 Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
    at android.os.Handler.<init>(Handler.java:204)
    at android.os.Handler.<init>(Handler.java:118)
    at com.zipow.videobox.b.<clinit>(BaseVideoBoxApplication.java:31)
    at com.zipow.videobox.VideoBoxApplication.getNonNullInstance(Unknown Source:0) 
    at com.zipow.videobox.mainboard.Mainboard.getMainboard(Mainboard.java:121) 
    at com.zipow.videobox.ptapp.PTApp.isInitialForMainboard(PTApp.java:2435) 
    at com.zipow.videobox.ptapp.PTApp.getSdkAuthResult(PTApp.java:1894) 
    at us.zoom.sdk.ZoomSDK.isInitialized(ZoomSDK.java:602) 
    at us.zoom.sdk.ZoomSDK.getMeetingService(ZoomSDK.java:817) 
    at com.android.zmdemo.util.NotifyDataUtils.getUploadNotifyData(NotifyDataUtils.java:59) 
    at com.android.zmdemo.util.ZoomStatusNotifyUtil.uploadStatusNotify(ZoomStatusNotifyUtil.java:36) 
    at com.android.zmdemo.activity.BaseCtrlActivity$7.run(BaseCtrlActivity.java:1096) 
    at microsoft.aspnet.signalr.client.Connection.onConnected(Connection.java:606) 
    at microsoft.aspnet.signalr.client.Connection$12.run(Connection.java:730) 
    at microsoft.aspnet.signalr.client.Connection$12.run(Connection.java:709) 
    at microsoft.aspnet.signalr.client.SignalRFuture.setResult(SignalRFuture.java:73) 
    at microsoft.aspnet.signalr.client.transport.AutomaticTransport$1.run(AutomaticTransport.java:97)
    at microsoft.aspnet.signalr.client.transport.AutomaticTransport$1.run(AutomaticTransport.java:91)
    at microsoft.aspnet.signalr.client.SignalRFuture.setResult(SignalRFuture.java:73) 
    at microsoft.aspnet.signalr.client.transport.WebsocketTransport$1.onOpen(WebsocketTransport.java:102) 
    at org.java_websocket.client.WebSocketClient.onWebsocketOpen(WebSocketClient.java:267) 
    at org.java_websocket.WebSocketImpl.open(WebSocketImpl.java:664) 
    at org.java_websocket.WebSocketImpl.decodeHandshake(WebSocketImpl.java:287) 
    at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:160) 
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:185) 
    at java.lang.Thread.run(Thread.java:764)

Which Client Android SDK version?
v5.2.42043.1112

To Reproduce(If applicable)

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel 5]
  • OS: [e.g. Android 11]

Additional context
Add any other context about the problem here.

Hi @peterlee9374, thanks for the post.

I have not been able to reproduce this on the latest version of the SDK (v5.4.3.613). Can you please update to the latest version and let me know if you are still experiencing this issue?

Thanks!

Hi Jon,

Thanks for your reply. I have updated the sdk version to (v5.4.3.603), and it still has this issue. But based on my code and these error messages, i found that the method(ZoomSDK.getInstance().isInitialized()) is called in sub-thread, and then it leads to this problem. What i want to ask is whether the new sdk method can only be called in the main thread, and it will make mistakes in the sub-thread?

Thanks!

Hi @peterlee9374 It is recommended that you call on the main thread. Some method, such as ZoomSDK.getInstance().initialize(), must be called on main thread.

Hi donny, thanks a lot for your answer.

Glad we were able to sort this out!

Please let us know if you experience any additional issues. :slightly_smiling_face: