Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

java.lang.ClassCastException: mozilla.components.concept.engine.prompt.PromptRequest$Alert cannot be cast to mozilla.components.concept.engine.prompt.PromptRequest$File #16537

Closed
Amejia481 opened this issue Nov 12, 2020 · 1 comment
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. E5 Estimation Point: about 5 days

Comments

@Amejia481
Copy link
Contributor

Amejia481 commented Nov 12, 2020

High volume in nightly

https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/5919259/

java.lang.ClassCastException: mozilla.components.concept.engine.prompt.PromptRequest$Alert cannot be cast to mozilla.components.concept.engine.prompt.PromptRequest$File
    at mozilla.components.feature.prompts.file.FilePicker$onActivityResult$1.invoke(FilePicker.kt:3)
    at androidx.core.app.AppOpsManagerCompat.consumePromptFrom(AppOpsManagerCompat.java:5)
    at androidx.core.app.AppOpsManagerCompat.consumePromptFrom$default(AppOpsManagerCompat.java:1)
    at mozilla.components.feature.prompts.file.FilePicker.onActivityResult(FilePicker.kt:1)
    at mozilla.components.feature.prompts.PromptFeature.onActivityResult(PromptFeature.kt:1)
    at org.mozilla.fenix.browser.BaseBrowserFragment$onActivityResult$1.invoke(BaseBrowserFragment.kt:3)
    at mozilla.components.support.base.feature.ViewBoundFeatureWrapper.withFeature(ViewBoundFeatureWrapper.kt:1)
    at org.mozilla.fenix.browser.BaseBrowserFragment.onActivityResult(BaseBrowserFragment.kt:1)
    at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:7)
    at android.app.Activity.dispatchActivityResult(Activity.java:7454)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4384)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4433)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1836)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6702)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=203721, result=-1, data=null} to activity {org.mozilla.fenix/org.mozilla.fenix.App}: java.lang.ClassCastException: mozilla.components.concept.engine.prompt.PromptRequest$Alert cannot be cast to mozilla.components.concept.engine.prompt.PromptRequest$File
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4391)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4433)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1836)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6702)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

┆Issue is synchronized with this Jira Task

@Amejia481 Amejia481 added the 🐞 bug Crashes, Something isn't working, .. label Nov 12, 2020
@Amejia481 Amejia481 self-assigned this Nov 12, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Nov 12, 2020
@kbrosnan kbrosnan added b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info and removed needs:triage Issue needs triage labels Nov 12, 2020
@Amejia481 Amejia481 added the E5 Estimation Point: about 5 days label Nov 16, 2020
@Amejia481
Copy link
Contributor Author

Related issue #16537, we put a patch on ac 67.0.0. This is not a fix, it will prevent the crash, but some functionality could be broken for some pages, a permanent solution, will be addressed on #8989

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. E5 Estimation Point: about 5 days
Projects
None yet
Development

No branches or pull requests

2 participants