Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

GeckoPromptDelegate: IllegalStateException: cursor.getString(nameIndex) must not be null #7990

Closed
pocmo opened this issue Aug 5, 2020 · 1 comment
Labels
🐞 bug Something isn't working good first issue Good for newcomers <prompts> Component: feature-prompts

Comments

@pocmo
Copy link
Contributor

pocmo commented Aug 5, 2020

Looks like we are reading from a Cursor and that value can be null.

java.lang.IllegalStateException: cursor.getString(nameIndex) must not be null
    at kotlin.jvm.internal.ArrayIteratorKt.checkExpressionValueIsNotNull(ArrayIterator.kt:1)
    at mozilla.components.browser.engine.gecko.prompt.GeckoPromptDelegate.toFileUri(GeckoPromptDelegate.kt:9)
    at mozilla.components.browser.engine.gecko.prompt.GeckoPromptDelegate.access$toFileUri(GeckoPromptDelegate.kt:1)
    at mozilla.components.browser.engine.gecko.prompt.GeckoPromptDelegate$onFilePrompt$onSelectSingle$1.invoke(GeckoPromptDelegate.kt:3)
    at mozilla.components.feature.prompts.file.FilePicker.handleFilePickerIntentResult$feature_prompts_release(FilePicker.kt:16)
    at mozilla.components.feature.prompts.file.FilePicker$onActivityResult$1.invoke(FilePicker.kt:5)
    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:7797)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:5071)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:5120)
    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:2199)
    at android.os.Handler.dispatchMessage(Handler.java:112)
    at android.os.Looper.loop(Looper.java:216)
    at android.app.ActivityThread.main(ActivityThread.java:7625)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=72649, result=-1, data=Intent { dat=content://media/external/file/37162 typ=application/vnd.openxmlformats-officedocument.wordprocessingml.document flg=0x3 }} to activity {org.mozilla.firefox/org.mozilla.fenix.HomeActivity}: java.lang.IllegalStateException: cursor.getString(nameIndex) must not be null
    at android.app.ActivityThread.deliverResults(ActivityThread.java:5078)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:5120)
    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:2199)
    at android.os.Handler.dispatchMessage(Handler.java:112)
    at android.os.Looper.loop(Looper.java:216)
    at android.app.ActivityThread.main(ActivityThread.java:7625)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

https://sentry.prod.mozaws.net/share/issue/c04f0f67693a4a369668becb55fe6ab7/

┆Issue is synchronized with this Jira Task

@pocmo pocmo added 🐞 bug Something isn't working good first issue Good for newcomers <prompts> Component: feature-prompts labels Aug 5, 2020
@Amejia481
Copy link
Contributor

I also filed this bug an hours ago on #7983 I will start using sentry comments 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working good first issue Good for newcomers <prompts> Component: feature-prompts
Projects
None yet
Development

No branches or pull requests

2 participants