Closed Bug 1282623 Opened 9 years ago Closed 4 years ago

Unable to use Fennec to access local files

Categories

(Firefox for Android Graveyard :: General, defect, P5)

All
Android
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: botond, Unassigned)

References

Details

STR: 1. Open Fennec 2. Type "file:///" into the URL bar 3. Navigate to a folder that contains an .apk file 4. Tap the .apk file Expected results: The application from the .apk is installed Actual results: A bar appears at the bottom, saying "Unable to download file" This used to work. Similarly, clicking on a video file used to open the file in Video Player, while now it open again shows "Unable to download file".
This sounds like a dupe of bug 1271570.
Works for me. Do you still see this?
Flags: needinfo?(botond)
It's actually even worse now. Now, when I try to navigate my phone filesystem from Fennec, I get an "Access to the file was denied" page each time.
Flags: needinfo?(botond)
Did you grant "storage" permission to Fennec?
Flags: needinfo?(botond)
I can confirm that giving Fennec the "Storage" permission in Settings -> Apps -> Fennec -> Permissions resolves the problem. I don't recall Fennec ever asking for that permission. Should it have?
Flags: needinfo?(botond)
OS: Unspecified → Android
Hardware: Unspecified → All
I think this might be because of bug 1193027, so the question is to what extent it might be safe to relax that policy again? One problem is that before that bug we already had an implementation that attempted to block only "downloads" from the profile directory [1] and apparently for bug 1193027 it was easier to just block local file system downloads completely instead of doing a more targeted fix. [1] https://hg.mozilla.org/mozilla-central/rev/0c24126a81e5#l1.32
This bug isn't a duplicate of Bug 1460853. I cant reopen it so commenting. The scenario I've mentioned in Bug 1460853 is different than this. Please go through it again and reopen. Here the issue is with permissions, but my issue exists on Android Lollipop also which does not have anything to do with runtime permissions. This same scenario works well with Chrome browser on the very same device.
Things got a little side-tracked, but if you ignore comments 3 to 5 and look at comment 0 instead, you'll notice that just like in your bug report, an attempt to access a local file that cannot be displayed within Firefox itself ended with a snackbar saying "Unable to download file". On that basis I'd still say that your bug has the same root cause as this one.
No, still IMO this isn't same as Bug 1460853. Let me explain:- 1. Open Fennec 2. Type "file:///storage/emulated/0/Sample" into the URL bar 3. Tap the test.txt file 4. It will display the text file properly without any error. Had it been same as this one, then it wouldn't have opened the file but would have given the error "Unable to download file" Only when I try to access the file using window.open("file:///storage/emulated/0/Sample/test.txt") from the html then it throws the error "Unable to download file".
See Also: → 1460853
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.