You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
As we can see in this stack trace provided in mozilla-mobile/fenix#16537, FilePicker is trying to process a PromptRequest that doesn't belong to it, not sure how we entered in that state, but it looks like a race condition were a PromptRequest.File was requested but before it was proceeded an PromptRequest$Alert replaced it. We have to prevent processing invalid request in FilePicker
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)
As we can see in this stack trace provided in mozilla-mobile/fenix#16537,
FilePicker
is trying to process aPromptRequest
that doesn't belong to it, not sure how we entered in that state, but it looks like a race condition were aPromptRequest.File
was requested but before it was proceeded anPromptRequest$Alert
replaced it. We have to prevent processing invalid request inFilePicker
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: