2

我们收到关于似乎是由 google cast SDK 引起的崩溃的报告。我们不知道如何重现它,只是它发生在生产中。

'com.google.android.gms:play-services-cast-framework:11.6.2'

..这是 crashlytics 的报告:

Fatal Exception: java.lang.IllegalStateException: Not connected to a device
   at com.google.android.gms.internal.zzbbc.zzaey(Unknown Source)
   at com.google.android.gms.internal.zzbbc.isMute(Unknown Source)
   at com.google.android.gms.cast.Cast$CastApi$zza.isMute(Unknown Source)
   at com.google.android.gms.cast.framework.CastSession.isMute(Unknown Source)
   at com.google.android.gms.internal.zzazf.zzaee(Unknown Source)
   at com.google.android.gms.internal.zzazf.onMediaStatusUpdated(Unknown Source)
   at com.google.android.gms.cast.framework.media.uicontroller.UIMediaController.zzaed(Unknown Source)
   at com.google.android.gms.cast.framework.media.uicontroller.UIMediaController.onStatusUpdated(Unknown Source)
   at com.google.android.gms.cast.framework.media.zzn.onStatusUpdated(Unknown Source)
   at com.google.android.gms.internal.zzbbw.onStatusUpdated(Unknown Source)
   at com.google.android.gms.internal.zzbbw.zza(Unknown Source)
   at com.google.android.gms.internal.zzbbw.zzfg(Unknown Source)
   at com.google.android.gms.cast.framework.media.RemoteMediaClient.onMessageReceived(Unknown Source)
   at com.google.android.gms.internal.zzbbi.run(Unknown Source)
   at android.os.Handler.handleCallback(Handler.java:751)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at android.os.Looper.loop(Looper.java:154)
   at android.app.ActivityThread.main(ActivityThread.java:6776)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

有人对此有任何见解吗?日志中的所有内容似乎都是内部内容,在我们的应用程序中没有任何内容。

编辑:这是 com.google.android.gms.internal 发生崩溃的代码。我最好的选择是,在调用var1.isMute()之前,应用程序会失去连接,这又会引发异常“未连接到设备”

protected final void zzaer() {
    CastSession var1;
    if((var1 = CastContext.getSharedInstance(this.zzbhi).getSessionManager().getCurrentCastSession()) != null && var1.isConnected()) {
        RemoteMediaClient var2;
        if((var2 = this.getRemoteMediaClient()) != null && var2.hasMediaSession()) {
            this.zzfbo.setEnabled(true);
        } else {
            this.zzfbo.setEnabled(false);
        }

        if(var1.isMute()) { // This row causes the crash
            this.zzaz(true);
        } else {
            this.zzaz(false);
        }
    } else {
        this.zzfbo.setEnabled(false);
    }
}

编辑:我已将问题提交给谷歌:https ://issuetracker.google.com/issues/72880677

编辑:创建自定义扩展控件并确保静音按钮未绑定到视图似乎可以减轻崩溃。

4

0 回答 0