Closed
Bug 1176018
Opened 9 years ago
Closed 9 years ago
Firefox 41 won't open downloaded files anymore
Categories
(Firefox for Android Graveyard :: Download Manager, defect)
Firefox for Android Graveyard
Download Manager
Tracking
(firefox41+ unaffected, firefox42+ fixed, fennec41+)
RESOLVED
FIXED
Firefox 42
Tracking | Status | |
---|---|---|
firefox41 | + | unaffected |
firefox42 | + | fixed |
fennec | 41+ | --- |
People
(Reporter: ale160382, Assigned: sebastian)
References
Details
Attachments
(2 files, 1 obsolete file)
830.71 KB,
image/jpeg
|
Details | |
1.77 KB,
patch
|
sebastian
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Android; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0 Build ID: 20150617030205 Steps to reproduce: Firefox nightly41 wont open apk downloaded anymore i m absolutely sure that until a week ago Firefox nighty 41 could open apk downloaded it was so convenient over. chrome i could just tap the notification in lollipop and the all file will install . now that wont happen anymore Firefox says no app if found to open all see screenshot.
Updated•9 years ago
|
Summary: Firefox nightly 41 wont open apk anymore → Firefox nightly 41 wont open .apk files anymore
Updated•9 years ago
|
Component: Untriaged → Download Manager
Product: Firefox → Firefox for Android
Version: 41 Branch → unspecified
Reporter | ||
Comment 2•9 years ago
|
||
every app i download from apkmirror.com the only site i trust and i ve ever used for comparison when i state that last week i could install all tapping download complete notification banner
Flags: needinfo?(ale160382)
Assignee | ||
Comment 3•9 years ago
|
||
It seems like this affects more than APK files. In addition to that I'm unable to open PDF files from about:downloads. Beta is not affected.
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Ever confirmed: true
Assignee | ||
Comment 4•9 years ago
|
||
W/GeckoAppShell( 6420): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=file:///storage/emulated/0/Download/history-foxkeh(2).pdf typ=application/pdf flg=0x4000000 (has extras) } W/GeckoAppShell( 6420): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1781) W/GeckoAppShell( 6420): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1501) W/GeckoAppShell( 6420): at android.app.Activity.startActivityForResult(Activity.java:3745) W/GeckoAppShell( 6420): at android.app.Activity.startActivityForResult(Activity.java:3706) W/GeckoAppShell( 6420): at android.support.v4.app.FragmentActivity.startActivityForResult(Unknown Source) W/GeckoAppShell( 6420): at org.mozilla.gecko.GeckoActivity.startActivityForResult(GeckoActivity.java:68) W/GeckoAppShell( 6420): at android.app.Activity.startActivity(Activity.java:4016) W/GeckoAppShell( 6420): at android.app.Activity.startActivity(Activity.java:3984) W/GeckoAppShell( 6420): at org.mozilla.gecko.GeckoActivity.startActivity(GeckoActivity.java:62) W/GeckoAppShell( 6420): at org.mozilla.gecko.GeckoAppShell.openUriExternal(GeckoAppShell.java:1112) W/GeckoAppShell( 6420): at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) W/GeckoAppShell( 6420): at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:385) W/GeckoAppShell( 6420): at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:188)
Assignee | ||
Comment 5•9 years ago
|
||
Regression introduced here: http://hg.mozilla.org/mozilla-central/rev/cb07547fd9ab Previously Intent.CATEGORY_BROWSABLE was only added to Intents that contained an intent:// URI. Now the category is added to all outgoing intents. This seems to break intent resolution for these cases here. NI, Michael: I can't really trace back why exactly this was added for all intents? From the documentation it makes sense somehow: "Activities that can be safely invoked from a browser must support this category.". But it seems to break all kinds of stuff here. We probably want to have this for all intents fired up from website links but not for about:downloads, which happens to be a website too.
Flags: needinfo?(michael.l.comella)
Assignee | ||
Updated•9 years ago
|
Summary: Firefox nightly 41 wont open .apk files anymore → Firefox nightly 41 wont open downloaded files anymore
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment on attachment 8627250 [details] [diff] [review] 1176018_file_uri.patch Review of attachment 8627250 [details] [diff] [review]: ----------------------------------------------------------------- This seems reasonable to me, but we should chat with mcomella when he gets back from PTO to make sure there isn't any nuance we're missing here. ::: mobile/android/base/GeckoAppShell.java @@ +1197,5 @@ > final Intent intent = getOpenURIIntentInner(context, targetURI, mimeType, action, title); > > if (intent != null) { > + // Setting category on file:// URIs breaks about:downloads (Bug 1176018) > + if (targetURI == null || !targetURI.startsWith("file:")) { If targetURI is expected to be null, we would already be vulnerable to an NPE here: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/GeckoAppShell.java#1221 So I don't think we need this null check.
Attachment #8627250 -
Flags: review+
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to :Margaret Leibovic from comment #7) > This seems reasonable to me, but we should chat with mcomella when he gets > back from PTO to make sure there isn't any nuance we're missing here. Yeah, I agree -> leave-open. (In reply to :Margaret Leibovic from comment #7) > If targetURI is expected to be null, we would already be vulnerable to an > NPE here: > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/ > GeckoAppShell.java#1221 Oh, yeah, I'll remove the check.
Keywords: leave-open
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8627250 -
Attachment is obsolete: true
Attachment #8627271 -
Flags: review+
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b7f643093ce7
(In reply to :Sebastian Kaspari from comment #5) > NI, Michael: I can't really trace back why exactly this was added for all > intents? From the documentation it makes sense somehow: "Activities that can > be safely invoked from a browser must support this category.". This was my assumption. > But it seems to break all kinds of stuff here. And what I hoped would not happen - in theory, it shouldn't. If there was a good way to trace where the calls were coming from (i.e. is this from an external URI?), this would be easy but it seems all the calls are funneled through that IntentHelper method (which specifically opens external URIs where my assumption about requiring the BROWSABLE category seemed to make sense). I'm open to suggestions though! :)
Flags: needinfo?(michael.l.comella)
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #13) > If there was a good way to trace where the calls were coming from (i.e. is > this from an external URI?), this would be easy but it seems all the calls > are funneled through that IntentHelper method (which specifically opens > external URIs where my assumption about requiring the BROWSABLE category > seemed to make sense). Yeah, that's how I wanted to solve it too - at first. I guess a proper fix would be to distinguish between links from websites and web UI (mostly about:foo) but I ended up in the same dead-end in IntentHelper. The workaround to exclude file:// uris works for about:downloads and I don't know about any other broken Intents so far. But now a website could still contain links using the file scheme and therefore fire Intents without CATEGORY_BROWSABLE. I can't come up with a scenario where this might be used to exploit something but I would like to avoid it nevertheless.
Assignee | ||
Comment 16•9 years ago
|
||
Argh. It seems like Nightly update downloads are also affected by this - resulting in Nightly not being able to update itself.
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to :Sebastian Kaspari from comment #16) > Argh. It seems like Nightly update downloads are also affected by this - > resulting in Nightly not being able to update itself. Okay, it's not related. That's bug 1179382. Phew. Panic! :)
Comment 18•9 years ago
|
||
This migrated to Aurora now ( taking nightly out from title)
Summary: Firefox nightly 41 wont open downloaded files anymore → Firefox 41 won't open downloaded files anymore
Updated•9 years ago
|
tracking-fennec: ? → 41+
Comment 19•9 years ago
|
||
[Tracking Requested - why for this release]:
status-firefox41:
--- → affected
status-firefox42:
--- → affected
tracking-firefox41:
--- → ?
tracking-firefox42:
--- → ?
Updated•9 years ago
|
Assignee | ||
Comment 20•9 years ago
|
||
NI: Mike: Should we uplift the fix to Aurora or do you think we can come up with a better patch? Maybe uplifting and filing a follow-up to explore ways to improve our intent handling is the best we can do for now?
Flags: needinfo?(michael.l.comella)
(In reply to :Sebastian Kaspari from comment #20) > NI: Mike: Should we uplift the fix to Aurora or do you think we can come up > with a better patch? Maybe uplifting and filing a follow-up to explore ways > to improve our intent handling is the best we can do for now? Let's uplift - whatever better patch we come up with will be more complex and less tested, and thus riskier to uplift. If we're really concerned the BROWSABLE change is breaking more features, we should back it out.
Flags: needinfo?(michael.l.comella) → needinfo?(s.kaspari)
Assignee | ||
Comment 22•9 years ago
|
||
Comment on attachment 8627271 [details] [diff] [review] 1176018_file_uri_v2.patch Approval Request Comment [Feature/regressing bug #]: #1176018 [User impact if declined]: Downloaded files cannot be opened [Describe test coverage new/current, TreeHerder]: Patch has been in Nightly for about a week. [Risks and why]: Low risk, restoring old behavior for handling of file:// uris [String/UUID change made/needed]: -
Flags: needinfo?(s.kaspari)
Attachment #8627271 -
Flags: approval-mozilla-aurora?
(Optimistic Mike:) Over in bug 1173200, file:// urls seem to need special handling (they need explicit mimetypes while other uris do not). Notably, Chrome lets the Downloads Manager handle it's files so maybe it's necessary and we shouldn't feel so bad about all this special-casing.
See Also: → 1173200
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Assignee | ||
Comment 24•9 years ago
|
||
But this still needs an uplift to Aurora/41.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to :Sebastian Kaspari from comment #24) > But this still needs an uplift to Aurora/41. Bugs get marked fixed if they land on m-c - we use the "Tracking flags", specifically "status-firefox41", to track whether or not this has been uplifted. The "tracking-fennec" flag, in conjunction with the auto-fill in the weekly meetings notes, can help you find bugs you have yet to uplift.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Comment 26•9 years ago
|
||
Comment on attachment 8627271 [details] [diff] [review] 1176018_file_uri_v2.patch Low risk, restoring old behaviors. Patch has been in nightly for about a week.
Attachment #8627271 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Blocks: android-intents
Comment on attachment 8627271 [details] [diff] [review] 1176018_file_uri_v2.patch Actually, I'm going to fix the underlying issue that caused this bug for 41 only in bug 1182328.
Attachment #8627271 -
Flags: approval-mozilla-aurora+
Depends on: 1182328
41 fixed by bug 1182328.
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•