mozilla-mobile / android-components

⚠️ This project moved to a new repository. It is now developed and maintained at: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
2.02k stars 472 forks source link

prompt.Choice[] cannot be cast to prompt.Choice #6687

Closed st3fan closed 4 years ago

st3fan commented 4 years ago

https://sentry.prod.mozaws.net/operations/firefox-beta/issues/7843411

java.lang.ClassCastException: mozilla.components.concept.engine.prompt.Choice[] cannot be cast to mozilla.components.concept.engine.prompt.Choice
    at mozilla.components.feature.prompts.PromptFeature.onConfirm(PromptFeature.kt:25)
    at -$$LambdaGroup$js$CAs0Y7NWl2_rHUSA2p5MNFfDxg0.onClick(java-style lambda group:3)
    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:3)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6316)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)

┆Issue is synchronized with this Jira Task

rocketsroger commented 4 years ago

Looks like the frequency of this is very low. However, there are also other similar cases with very low frequency as well. I'll catch the exception and send a crash reporting with breadcrumb. Once we have the breadcrumb we can figure out which case is causing the crash.

rocketsroger commented 4 years ago

I'll continue to monitor this for a week to see if the patch works. If it works, I'll use the information to find the root cause.

kbrosnan commented 4 years ago

Looks like this is fixed. Not seeing any crashes on 78 or 79.