chromecast-java-api-v2 icon indicating copy to clipboard operation
chromecast-java-api-v2 copied to clipboard

ClassException: Channel.isAppAvailable (Channel.java:472)

Open grolschie opened this issue 5 years ago • 6 comments

Hi. I've been using your library for quite a while now with very little issue. However, I notice one of my users had this error in Android's error reporting:

java.lang.ClassCastException: 
  at su.litvak.chromecast.api.v2.Channel.isAppAvailable (Channel.java:472)
  at su.litvak.chromecast.api.v2.ChromeCast.isAppAvailable (ChromeCast.java:237)
  at [appname].CastFragment.handlerTask (CastFragment.java:706)
  at [appname].CastFragment.access$2500 (CastFragment.java:53)
  at [appname].CastFragment$16.run (CastFragment.java:602)
  at java.lang.Thread.run (Thread.java:818)

I wasn't sure if I should report it or not as I wouldn't have any idea on how to replicate this. Using library version: 0.11.2.

grolschie avatar Apr 27 '20 22:04 grolschie

It seems that for some reason chromecast device sends something different than "GET_APP_AVAILABILITY" response for the request. To figure out what happens please send the log file with "DEBUG" level messages to see the exact request/response.

vitalidze avatar Apr 28 '20 08:04 vitalidze

Hi. I am unable to replicate this because the above is all that appeared in the anonymized log in Android Vitals. The Chromecast device is the built-in Chromecast Audio (1.21.76349) on a Sony STR-DN1080 AV receiver.

I thought I'd post this anyway, just in case it was useful - but feel free to close this bug report.

grolschie avatar Apr 28 '20 23:04 grolschie

It is definitely useful. But still, is there a way to somehow enable the debugging messages for that particular Android app? Or this will flood your logs?

vitalidze avatar May 01 '20 11:05 vitalidze

Hi. Unfortunately developers are meant to disable logging and debugging before publishing to Google Play. The snippet I posted is all that was shown me in the Google Play developer's console, but often I get more info than that. Fortunately (or unfortunately for this report), I have only seen this error the one time.

grolschie avatar May 04 '20 04:05 grolschie

I haven't seen this exception in Android Vitals since.

grolschie avatar Nov 07 '20 23:11 grolschie

Update: over a year later and I haven't seen it since.

grolschie avatar Dec 25 '21 21:12 grolschie