[Blocking Requested - why for this release]: When attempting to fetch all records from an empty datastore, the underlying promise that is returned never gets called and DataStoreImpl throws an exception. We should, at the very least, call onerror and ideally, call onsuccess with an empty array of results.
Component: DOM: IndexedDB → DOM
> When attempting to fetch all records from an empty datastore, the underlying > promise that is returned never gets called and DataStoreImpl throws an > exception. We should, at the very least, call onerror and ideally, call > onsuccess with an empty array of results. How do you fetch all the records? Using 'sync'?
Here's where we fetch all the records via 'get': https://github.com/mozilla-b2g/gaia/blob/master/shared/js/download/download_store.js#L317 This fails everytime when the datastore is empty. As soon as there is one entry everything works as expected.
Flags: needinfo?(aus) → needinfo?(amarchesini)
Created attachment 8478436 [details] [diff] [review] length.patch With this patch the promise is resolved with an empty array.
Attachment #8478436 - Flags: review?(ehsan)
That doesn't look right to me. You're resolving with a chrome array, no?
Created attachment 8478457 [details] [diff] [review] length.patch I also changed the other array. This is cleaner, but also with the previous patch it worked fine.
I believe I've seen this occur on b2g-2.0 as well, I've flagged QA to check against 2.0 and 1.4. STRs: 1. Flash Flame (319M) with latest b2g-2.0 + gaia 2. In the browser, go to http://owd.tid.es/dm/ 3. Download 97MB.rar 4. Tap on the download started notification, it will take you to the downloads list in settings. Expected: Currently active download status. Actual: Empty list. Once there is one successful download, everything works as expected.
Josh - Can you have someone look into this qawanted request?
Flags: needinfo?(jsmith) → needinfo?(jmitchell)
This issue DOES reproduce in Flame 2.0 and Flame 1.4 Actual Results - Blank Download Screen until 1 file has been completely downloaded; resulting in an inability to stop the current download (when it is the first download) Device: Flame 2.0 Build ID: 20140823033754 Gaia: 4c8b5ced1966079086d86dec3098ecf340881306 Gecko: b0545e46d08b Version: 32.0 (2.0) Firmware Version: v123 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 Device: Flame 1.4 Build ID: 20140825062151 Gaia: cf9d74da6653efeb43d9653e81c61aa00e693a67 Gecko: cdcb73d0febc Version: 30.0 (1.4) Firmware Version: v123 User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0
QA Whiteboard: [QAnalyst-Triage?]
Based on comment #8 and as the "downloads" guy for b2g I would suggest blocking 2.0 and 1.4 (or at least landing on 1.4 for flatfish et al).
status-b2g-v1.4: --- → affected
status-b2g-v2.0: ? → affected
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
[Blocking Requested - why for this release]: Without this fix, the first time the user downloads a file, they will be unable to stop the active download because the downloads list will always be empty. This could cause them to incur data charges that they would normally be able to prevent.
blocking-b2g: 2.1? → 1.4?
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Taking this on 1.4 due to hidden data costs to user.
blocking-b2g: 1.4? → 1.4+
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/94a33c8895cc This will need explicit b2g32 approval if it's needed for v2.0 as well.
status-b2g-v1.4: affected → fixed
status-b2g-v2.1: affected → fixed
status-firefox32: --- → wontfix
status-firefox33: --- → wontfix
status-firefox34: --- → fixed
Comment on attachment 8478457 [details] [diff] [review] length.patch NOTE: This flag is now for security issues only. Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 916089 User impact if declined: some apps can be broken. Testing completed: m-c. Fully covered. Risk to taking this patch (and alternatives if risky): None String or UUID changes made by this patch: None
Attachment #8478457 - Flags: approval-mozilla-b2g32?
Attachment #8478457 - Flags: approval-mozilla-b2g32? → approval-mozilla-b2g32+
status-b2g-v2.0: affected → fixed
status-b2g-v2.0M: --- → affected
status-b2g-v2.0M: affected → fixed
This issue is verified fixed on Flame 2.1(KK), 2.0(KK), and 1.4(JB), following STRs on Comment 6. Result: The Download list displays the current downloading status properly. Flame 2.1 Device: Flame 2.1 (319mb)(Kitkat Base)(Full Flash) BuildID: 20141027001201 Gaia: c97463d61f45513a2123b19610386ddbfc916819 Gecko: 4f8c0c021128 Gonk: 6e51d9216901d39d192d9e6dd86a5e15b0641a89 Version: 34.0 (2.1) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0 Flame 2.0 Device: Flame 2.0 (319mb)(Kitkat Base)(Full Flash) BuildID: 20141027000202 Gaia: 2183b4f3ec0eb47ab1f133c31732ec53b08ad253 Gecko: 43bee45176c4 Gonk: 6e51d9216901d39d192d9e6dd86a5e15b0641a89 Version: 32.0 (2.0) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 Flame 1.4 Device: Flame 1.4 (319mb)(Jelly Bean Base) BuildID: 20141027000203 Gaia: bb76c81f83e1e4acc2d2972a451db2bce78c8f34 Gecko: 1bde54b2e7b0 Version: 30.0 (1.4) Firmware: V123 User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0 ===================================================== Leaving verifyme keyword for 2.0M. We do not have any device to check on 2.0M.
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+][lead-review+] → [QAnalyst-Triage?][lead-review+]
status-b2g-v1.4: fixed → verified
status-b2g-v2.0: fixed → verified
status-b2g-v2.1: fixed → verified
QA Whiteboard: [QAnalyst-Triage?][lead-review+] → [QAnalyst-Triage+][lead-review+]
This issue has been verified successfully on Woodduck 2.0 with STRs in Comment 6 . Reproducing rate: 0/5 See attachment: Verify_Woodduck_Downloadlist.mp4 build version: Gaia-Rev 87b23fa81c3b59f2ba24b84f7d686f4160d4e7cb Gecko-Rev d049d4ef127844121c9cf14d2e8ca91fd9045fcb Build-ID 20141125050313 Version 32.0
status-b2g-v2.0M: fixed → verified
You need to log in before you can comment on or make changes to this bug.