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

[Bug] Crash when downloading Image #6439

Closed
csadilek opened this issue Nov 4, 2019 · 8 comments
Closed

[Bug] Crash when downloading Image #6439

csadilek opened this issue Nov 4, 2019 · 8 comments
Assignees
Labels
b:crash 🐞 bug E8 eng:qa:verified Feature:Download needs:ac P1

Comments

@csadilek
Copy link
Contributor

@csadilek csadilek commented Nov 4, 2019

We're getting this new relatively frequent crash:
https://sentry.prod.mozaws.net/operations/fenix-nightly/issues/6580864/

java.lang.IllegalArgumentException: Failed to find configured root that contains ...
    at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:15)
    at mozilla.components.feature.prompts.MimeType$Image$1.invoke(MimeType.kt:2)
    at mozilla.components.feature.prompts.MimeType$Image.buildIntent(MimeType.kt:5)
    at mozilla.components.feature.prompts.FilePicker.handleFileRequest(FilePicker.kt:19)
    at mozilla.components.feature.prompts.PromptFeature.onPromptRequested$feature_prompts_release(PromptFeature.kt:4)
    at mozilla.components.feature.prompts.PromptFeature$start$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:7)
    at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifAnyChanged$$inlined$filter$1$2.emit(Collect.kt:15)
    at mozilla.components.feature.prompts.PromptFeature$start$1$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:5)

┆Issue is synchronized with this Jira Task

@csadilek csadilek added 🐞 bug b:crash labels Nov 4, 2019
@sblatz sblatz self-assigned this Nov 4, 2019
@sblatz sblatz added the P1 label Nov 4, 2019
@vesta0 vesta0 added this to Prioritized Bug Backlog in Fenix Sprint Kanban Nov 4, 2019
@sblatz sblatz added Feature:Download needs:ac labels Nov 11, 2019
@sblatz sblatz added this to Top 10 in Fenix:AC Bugs Nov 12, 2019
@sblatz sblatz removed their assignment Nov 12, 2019
@jonalmeida jonalmeida assigned Amejia481 and sblatz and unassigned sblatz Nov 12, 2019
@sblatz
Copy link
Contributor

@sblatz sblatz commented Nov 12, 2019

This may be fixed in the newest version of AC, but we haven't gotten new snapshot for Fenix, so maybe it's just because we haven't gotten a new snapshot.

@sblatz sblatz moved this from Top 10 to In Progress in Fenix:AC Bugs Nov 12, 2019
@cpeterso
Copy link

@cpeterso cpeterso commented Nov 13, 2019

Corresponding Bugzilla bug filed from crash-stats: https://bugzilla.mozilla.org/show_bug.cgi?id=1595804

@sblatz
Copy link
Contributor

@sblatz sblatz commented Nov 13, 2019

Let's keep a pulse on this over the next few days but it seems to have disappeared?

@Amejia481 Amejia481 moved this from ⏳ Sprint Backlog to 🏃‍♀️ In Progress in A-C: Android Components Sprint Planning Nov 14, 2019
@Amejia481
Copy link
Contributor

@Amejia481 Amejia481 commented Nov 14, 2019

I think the issue is still there, I able to reproduce it on master, the issue happens when the input has an image mime type.

STR:

  1. Go https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
  2. Toggle Desktop site (to be set ON).
  3. Tap browser button below the label "Choose a profile picture".

I'm taking a look to how to fix it. I will keep you update.

@Amejia481
Copy link
Contributor

@Amejia481 Amejia481 commented Nov 15, 2019

I think the main issue rely on feature-prompts and Fenix providers has the same authorities properties: android:authorities="${applicationId}.fileprovider"

Feature prompts
https://github.com/mozilla-mobile/android-components/blob/master/components/feature/prompts/src/main/AndroidManifest.xml

        <provider
            android:authorities="${applicationId}.fileprovider"
            android:name="androidx.core.content.FileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

Fenix

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

@Amejia481
Copy link
Contributor

@Amejia481 Amejia481 commented Nov 15, 2019

Found the source of the issue the android:name="androidx.core.content.FileProvider" property is the same is both case and it should be unique.

@Amejia481
Copy link
Contributor

@Amejia481 Amejia481 commented Nov 20, 2019

This will fixed after #6699 lands

@sblatz sblatz added the eng:qa:needed label Nov 22, 2019
@project-bot project-bot bot moved this from Prioritized Bug Backlog to Ready for QA in Fenix Sprint Kanban Nov 22, 2019
@lobontiumira
Copy link

@lobontiumira lobontiumira commented Nov 25, 2019

Verified as fixed on the latest Nightly 11/25 (#13290608) with Google Pixel 3 (Android Q), and Huawei P9 Lite (Android 7).

Fenix:AC Bugs automation moved this from In Progress to Done Nov 25, 2019
@project-bot project-bot bot moved this from Ready for QA to Sprint 11.2 Done in Fenix Sprint Kanban Nov 25, 2019
@lobontiumira lobontiumira added eng:qa:verified and removed eng:qa:needed labels Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:crash 🐞 bug E8 eng:qa:verified Feature:Download needs:ac P1
Development

No branches or pull requests

5 participants