Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: cursor.getString(nameIndex) must not be null #7983

Closed
Amejia481 opened this issue Aug 5, 2020 · 1 comment
Assignees
Labels
💥 crash E5 Estimation points: 5 <prompts> Component: feature-prompts
Milestone

Comments

@Amejia481
Copy link
Contributor

Amejia481 commented Aug 5, 2020

https://sentry.prod.mozaws.net/operations/firefox/issues/9300523/


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)

┆Issue is synchronized with this Jira Task

@Amejia481 Amejia481 added <prompts> Component: feature-prompts 💥 crash R79 labels Aug 5, 2020
@Amejia481 Amejia481 removed the R79 label Aug 5, 2020
@Amejia481 Amejia481 self-assigned this Aug 5, 2020
@kbrosnan kbrosnan added this to Needs triage in Android: Crash Tracking Aug 5, 2020
@Amejia481 Amejia481 added this to ⏳ Sprint Backlog in A-C: Android Components Sprint Planning Aug 6, 2020
@psymoon psymoon moved this from ⏳ Sprint Backlog to 🏃‍♀️ In Progress in A-C: Android Components Sprint Planning Aug 10, 2020
Amejia481 added a commit to Amejia481/android-components that referenced this issue Aug 12, 2020
Amejia481 added a commit to Amejia481/android-components that referenced this issue Aug 12, 2020
Amejia481 added a commit to Amejia481/android-components that referenced this issue Aug 13, 2020
Amejia481 added a commit to Amejia481/android-components that referenced this issue Aug 13, 2020
bors bot pushed a commit that referenced this issue Aug 17, 2020
8104: Closes issue #7983: Generate a file name when the content provider doesn't provide one. r=pocmo a=Amejia481

When we get an `uri` from a file provider, we were trusting the provider to always provide a valid file name (`DISPLAY_NAME`) that is not always true, as we can see crashes on #7983, now when we can't find the file name, we are trying to generate a file name as it's required for the [file to be updated](https://github.com/mozilla-mobile/android-components/blob/0aff44eb2797c05d7bc28edc9cb0ebc5409371b4/components/browser/engine-gecko-nightly/src/main/java/mozilla/components/browser/engine/gecko/prompt/GeckoPromptDelegate.kt#L541).



Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
@Amejia481
Copy link
Contributor Author

Amejia481 commented Aug 17, 2020

closed by #8104

A-C: Android Components Sprint Planning automation moved this from 🏃‍♀️ In Progress to 🏁 Done Aug 17, 2020
Android: Crash Tracking automation moved this from Needs triage to Closed Aug 17, 2020
@Amejia481 Amejia481 added the E5 Estimation points: 5 label Aug 17, 2020
@Amejia481 Amejia481 added this to the 55.0.0 💨 milestone Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥 crash E5 Estimation points: 5 <prompts> Component: feature-prompts
Development

No branches or pull requests

1 participant