Closed
Bug 1007965
Opened 10 years ago
Closed 10 years ago
[B2G][1.4][Flame][Settings] The error message "File not found" appears when trying to open a supported file.
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(blocking-b2g:1.4+, firefox30 wontfix, firefox31 wontfix, firefox32 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)
People
(Reporter: ychung, Assigned: aus)
References
Details
(Whiteboard: [flame-1.4-exploratory][systemsfe][p=5])
Attachments
(4 files, 1 obsolete file)
Description: The error message "File not found" appears when trying to open a supported file. Repro Steps: 1) Updated Flame to BuildID: 20140508000201 2) Download a file from the browser. 3) Select "Settings" from the home screen. 4) Select "Downloads". 5) Select the downloaded file. 6) Select "Open", "Share", or any other options. 7) Observe the message "File not found": "The file wasn't found on the device". Actual: The error message "File not found. The file wasn't found on the device" appears. Expected: The user is able to proceed with the selected option. 1.4 Environmental Variables: Device: Flame 1.4 MOZ BuildID: 20140508000201 Gaia: 4ce973ef0732b0d52cb043210db598aa176b2ce9 Gecko: 16ab7f6b18f8 Version: 30.0 Firmware Version: v10E Repro frequency: 100% See attached: Screenshot, logcat
Reporter | ||
Comment 1•10 years ago
|
||
This issue does not occur in the Open C 1.4. 1.4 Environmental Variables: Device: Open_C 1.4 BuildID: 20140508000201 Gaia: 4ce973ef0732b0d52cb043210db598aa176b2ce9 Gecko: 16ab7f6b18f8 Version: 30.0 Firmware Version: P821A10-ENG_20140410 Base: FFOS_US_EBAY_P821A10V1.0.0B06_LOG_DL
Reporter | ||
Updated•10 years ago
|
Whiteboard: [flame-1.4-exploratory]
Reporter | ||
Comment 2•10 years ago
|
||
This issue does not occur in the Buri 1.4. 1.4 Environmental Variables: Device: Buri 1.4 MOZ BuildID: 20140502000201 Gaia: 7b2b82d72cbdd1c7e0f4542cb3390802e65f473e Gecko: 50be03cea340 Version: 30.0 Firmware Version: v1.2-device.cfg
Comment 3•10 years ago
|
||
So it's a vendor bug, but why? Dave - Do you know?
Component: Gaia::Settings → Vendcom
Flags: needinfo?(dhylands)
Whiteboard: [flame-1.4-exploratory] → [flame-1.4-exploratory][POVB]
Comment 4•10 years ago
|
||
Flame is shipped with v1.3. this is agree in the contract. for anything happened on v1.4, we need to make sure it's not FxOS related. please investigate internally first btw, please help to provide more detailed about download file information, e.g., which file, where to download (because I cannot reproduce it with my Flame on v10F-3 OEM + v1.4 gaia/gecko)
Component: Vendcom → Gaia::Settings
Flags: needinfo?(ychung)
Whiteboard: [flame-1.4-exploratory][POVB] → [flame-1.4-exploratory]
Reporter | ||
Comment 6•10 years ago
|
||
I downloaded mp3, jpg, vcf, zip files to the SD card. When I attempted to open zip files, the "Unable to open" message was displayed as usual. The mp3 files worked fine from the Music app, but not from the Downloads.
Flags: needinfo?(ychung)
Comment 7•10 years ago
|
||
We saw this problem during the bug bash as well. With pictures, we saw this error occur if you opened the file from the settings app. However, if you tried to do a pick activity from the gallery app, then you would see the file. Which makes me think that this isn't a vendor problem - instead, it's an issue that occurs due to differences in how storage is setup across different devices.
Comment 8•10 years ago
|
||
So, this may depend on exactly how the Download app or settings app is opening device storage. If you use navigator.getDeviceStorage('sdcard') then you can open any file with any extension. If, on the other hand, you use any other type (than 'sdcard') then you can only open files which have an extension supported by that type. The list of extensions for each type can be found here: http://dxr.mozilla.org/mozilla-central/source/toolkit/content/devicestorage.properties?from=devicestorage.properties#1 I do hope that the download app is, in fact, using device storage. If it isn't then that may also explain the problem (since newer versions of android have tighter security and you can no longer access files directly).
Flags: needinfo?(dhylands)
Updated•10 years ago
|
Whiteboard: [flame-1.4-exploratory] → [flame-1.4-exploratory][systemsfe]
Comment 9•10 years ago
|
||
Gregor, Can you please review?
blocking-b2g: 1.4? → 1.4+
Flags: needinfo?(anygregor)
Comment 10•10 years ago
|
||
download related, change component to gaia system. please re-assign if not the case, thanks.
Component: Gaia::Settings → Gaia::System
Comment 11•10 years ago
|
||
Aus, can you take a look here?
Flags: needinfo?(anygregor) → needinfo?(aus)
Assignee | ||
Comment 12•10 years ago
|
||
I know exactly what's going on with this bug. I'll take care of it this week.
Assignee: nobody → aus
Status: NEW → ASSIGNED
Flags: needinfo?(aus)
Target Milestone: --- → 2.0 S2 (23may)
Assignee | ||
Comment 13•10 years ago
|
||
So, what's happening here is that the DownloadHelper object we're using to open the file relies on the fact that the path to the "downloads" folder should have "sdcard" as it's parent. This is *not* the case for the flame. On the flame the parent folder is "sdcard0". This causes this bit of code here (https://github.com/mozilla-b2g/gaia/blob/master/shared/js/download/download_helper.js#L105) to extract the incorrect relative path to fetch the blob from Device Storage to take action on the content (view, listen, watch, etc). This occurs because it gets passed in 'sdcard' which it finds but then, fails to cut out the rest of the folder name. It is my understanding that the Device Storage API name "sdcard" is an opaque identifier that doesn't necessarily map to one exact physical location. Because of this, I think we should actually change the Downloads API Download Object to also return the storage name and relative path from storage root where the download resides *as well as* the full path in case an application requires it. This will allow the helper to fetch the blob easily for all content (and for other applications, too!)
Assignee | ||
Comment 14•10 years ago
|
||
:dhylands, are my assumptions correct in comment 13? (https://bugzilla.mozilla.org/show_bug.cgi?id=1007965#c13)
Flags: needinfo?(dhylands)
Comment 15•10 years ago
|
||
In DeviceStorage, fully qualified names look like: /storageName/relativePath/filename The storageName is "virtual". Its assumed to be a volume name and the volume mount point is substituted to come up with the real filename. You can see the volume mount points by doing: > adb shell vdc volume list In C++ code, you can do: http://dxr.mozilla.org/mozilla-central/source/dom/devicestorage/nsDeviceStorage.cpp?from=nsDeviceStorage.cpp#832 and volMountPoint will have the volume mount point. Note: That reading/writing to the volumes requires root access.
Flags: needinfo?(dhylands)
Assignee | ||
Comment 16•10 years ago
|
||
I'm also considering having the Download object simply have a blob that is set when the download completes. This may be the best way to go but I need to check first what implications this may have on low resource devices.
Assignee | ||
Comment 17•10 years ago
|
||
After reading through our Blob / File implementation I've decided it's probably best to only supply the Storage Name and Path on said Storage instead of providing a Blob. The Blob has buffers it allocates via an input stream to read from the file itself. We might as well avoid this until we know we're going to do something with it.
Assignee | ||
Comment 18•10 years ago
|
||
Attachment #8425892 -
Flags: review?(fabrice)
Assignee | ||
Comment 19•10 years ago
|
||
Attachment #8425898 -
Flags: review?(crdlc)
Assignee | ||
Updated•10 years ago
|
Whiteboard: [flame-1.4-exploratory][systemsfe] → [flame-1.4-exploratory][systemsfe][p=3]
Assignee | ||
Comment 20•10 years ago
|
||
Try Run: https://tbpl.mozilla.org/?tree=Try&rev=f5c1ea80ca2b
Comment 21•10 years ago
|
||
Comment on attachment 8425892 [details] [diff] [review] Patch - v1 - Provide DeviceStorage information as part of Download properties. Review of attachment 8425892 [details] [diff] [review]: ----------------------------------------------------------------- r=me with nits addressed. Boris, do you mind r+'ing the webidl changes? thanks! ::: dom/downloads/src/DownloadsAPI.js @@ +326,5 @@ > }); > > + // When the path changes, we should update the storage name and > + // storage path used for our downloaded file in case our download > + // was re-targetted to a different storage and/or filename. can that really happen except on first call to _update() ? @@ +346,5 @@ > + // Finally, create the relative path of the file that can be used > + // later on to retrieve the file via DeviceStorage. Our path > + // needs to omit the starting '/'. > + this.storageName = preferredStorageName; > + this.storagePath = nit: trailing whitespace. @@ +414,5 @@ > }, > > + _updateWithStorageInformation: function(aDownload) { > + > + }, That's unused, right?
Attachment #8425892 -
Flags: review?(fabrice)
Attachment #8425892 -
Flags: review?(bzbarsky)
Attachment #8425892 -
Flags: review+
Comment 22•10 years ago
|
||
Comment on attachment 8425892 [details] [diff] [review] Patch - v1 - Provide DeviceStorage information as part of Download properties. r=me on the webidl bits
Attachment #8425892 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 23•10 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #21) > Comment on attachment 8425892 [details] [diff] [review] > Patch - v1 - Provide DeviceStorage information as part of Download > properties. > > Review of attachment 8425892 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with nits addressed. > > Boris, do you mind r+'ing the webidl changes? thanks! > > ::: dom/downloads/src/DownloadsAPI.js > @@ +326,5 @@ > > }); > > > > + // When the path changes, we should update the storage name and > > + // storage path used for our downloaded file in case our download > > + // was re-targetted to a different storage and/or filename. > > can that really happen except on first call to _update() ? In theory, as things flow currently, it shouldn't happen but there's no harm in supporting that case since we would have to check if we need to initialize storageName and storagePath anyway. > > @@ +414,5 @@ > > }, > > > > + _updateWithStorageInformation: function(aDownload) { > > + > > + }, > > That's unused, right? Whoops! Yes, I'll remove that.
Assignee | ||
Comment 24•10 years ago
|
||
Try run looks good as well, just need to make sure it builds on JB Debug and KK Debug (looks like infra failure). I'll post the final patch real soon! Thanks guys!
Assignee | ||
Comment 25•10 years ago
|
||
Review comments addressed. r+ from fabrice and bz carries.
Attachment #8425892 -
Attachment is obsolete: true
Attachment #8426515 -
Flags: review+
Assignee | ||
Comment 26•10 years ago
|
||
Try run looks good! JB and KK debug builds are fine. Final patch is ready to land.
Keywords: checkin-needed
Assignee | ||
Comment 27•10 years ago
|
||
Push to b2g-inbound: https://hg.mozilla.org/integration/b2g-inbound/rev/f8c15df3a068 Leaving open until Gaia changes land.
status-b2g-v1.4:
--- → affected
status-b2g-v2.0:
--- → fixed
Assignee | ||
Comment 28•10 years ago
|
||
Apologies, my initial push to b2g-inbound had a bad commit message (it didn't fit on one line). I backed out that commit and have committed a new revision with the correct commit message. b2g-inbound: https://hg.mozilla.org/integration/b2g-inbound/rev/b81d99f8e27e
Assignee | ||
Updated•10 years ago
|
Keywords: leave-open
Assignee | ||
Updated•10 years ago
|
Whiteboard: [flame-1.4-exploratory][systemsfe][p=3] → [flame-1.4-exploratory][systemsfe][p=5]
Comment 31•10 years ago
|
||
Comment on attachment 8425898 [details] [review] Pull Request - DownloadHelper should use new storageName and storagePath properties. DownloadStore should save storageName and storagePath for later use. LGTM, good job! Thanks a lot
Attachment #8425898 -
Flags: review?(crdlc) → review+
Assignee | ||
Comment 32•10 years ago
|
||
Gaia commit (master): https://github.com/mozilla-b2g/gaia/commit/69790f4d8f787b8f4dbda4a9eb2c03bff254b3eb
Assignee | ||
Comment 33•10 years ago
|
||
Gaia commit (v1.4): https://github.com/mozilla-b2g/gaia/commit/7709936aeb21859d1607dbd038489493803bb085 Gecko patch will land on b2g30 this evening.
Assignee | ||
Comment 34•10 years ago
|
||
And now you can open downloads on the flame, woohoo!
Comment 35•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/0c8e7c2ea9ec
You need to log in
before you can comment on or make changes to this bug.
Description
•