react-native-google-cast/react-native-google-cast

App Crash: NullPointerException Attempt to invoke virtual method 'int com.google.android.gms.cast.MediaStatus.getPlayerState()' on a null object reference

taschik opened this issue · 0 comments

Describe the bug
We notice the following crash happening quite regularly on Android devices.

java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.gms.cast.MediaStatus.getPlayerState()' on a null object reference
    at com.jwplayer.cast.b.a(SourceFile:18)
    at com.jwplayer.cast.e.onStatusUpdated(SourceFile:57)
    at com.google.android.gms.cast.framework.media.zzbo.zzm(com.google.android.gms:play-services-cast-framework@@20.1.0:6)
    at com.google.android.gms.cast.internal.zzap.zzaa(com.google.android.gms:play-services-cast@@20.1.0:1)
    at com.google.android.gms.cast.internal.zzap.zzQ(com.google.android.gms:play-services-cast@@20.1.0:74)
    at com.google.android.gms.cast.framework.media.RemoteMediaClient.onMessageReceived(com.google.android.gms:play-services-cast-framework@@20.1.0:1)
    at com.google.android.gms.cast.zzbn.run(com.google.android.gms:play-services-cast@@20.1.0:4)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7918)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

To Reproduce
I am not able to reproduce but see it happening to hundreds of our Android users using Android OS 9-13

Expected behavior
Not to crash.

Checklist:

  • I have followed Installation and Setup
  • My problem is not described in Troubleshooting
  • I believe the bug is in the React Native Google Cast library, not in the Google Cast SDK. Otherwise please use the official Google Cast Support as I'm not able to help with native SDK issues.
  • I have searched existing issues and have not found a similar one