Closed
Bug 1058108
Opened 9 years ago
Closed 9 years ago
[DataStore] 'get' call fails to trigger any promise callbacks when fetching all entries from an empty store.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: aus, Assigned: baku)
References
Details
Attachments
(2 files, 1 obsolete file)
4.70 KB,
patch
|
ehsan.akhgari
:
review+
bajaj
:
approval-mozilla-b2g32+
|
Details | Diff | Splinter Review |
4.50 MB,
video/mp4
|
Details |
[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
Assignee | ||
Comment 1•9 years ago
|
||
> 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'?
Flags: needinfo?(aus)
Reporter | ||
Comment 2•9 years ago
|
||
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)
Assignee | ||
Comment 3•9 years ago
|
||
With this patch the promise is resolved with an empty array.
Attachment #8478436 -
Flags: review?(ehsan)
Flags: needinfo?(amarchesini)
![]() |
||
Comment 4•9 years ago
|
||
That doesn't look right to me. You're resolving with a chrome array, no?
Assignee | ||
Comment 5•9 years ago
|
||
I also changed the other array. This is cleaner, but also with the previous patch it worked fine.
Attachment #8478436 -
Attachment is obsolete: true
Attachment #8478436 -
Flags: review?(ehsan)
Attachment #8478457 -
Flags: review?(ehsan)
Reporter | ||
Comment 6•9 years ago
|
||
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.
Flags: needinfo?(jsmith)
Keywords: qawanted
Updated•9 years ago
|
Attachment #8478457 -
Flags: review?(ehsan) → review+
Comment 7•9 years ago
|
||
Josh - Can you have someone look into this qawanted request?
Flags: needinfo?(jsmith) → needinfo?(jmitchell)
Updated•9 years ago
|
Flags: needinfo?(jmitchell)
QA Contact: jmitchell
Comment 8•9 years ago
|
||
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
Reporter | ||
Comment 9•9 years ago
|
||
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).
Updated•9 years ago
|
status-b2g-v1.4:
--- → affected
Updated•9 years ago
|
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(pbylenga)
Updated•9 years ago
|
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/75805f95cfbe
Reporter | ||
Comment 11•9 years ago
|
||
[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?
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/75805f95cfbe
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 13•9 years ago
|
||
Taking this on 1.4 due to hidden data costs to user.
blocking-b2g: 1.4? → 1.4+
Comment 14•9 years ago
|
||
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-firefox32:
--- → wontfix
status-firefox33:
--- → wontfix
status-firefox34:
--- → fixed
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 15•9 years ago
|
||
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?
Flags: needinfo?(amarchesini)
Updated•9 years ago
|
Attachment #8478457 -
Flags: approval-mozilla-b2g32? → approval-mozilla-b2g32+
Comment 16•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/543cf0f2306d
status-b2g-v2.0M:
--- → affected
Comment 18•8 years ago
|
||
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+]
Flags: needinfo?(ktucker)
Updated•8 years ago
|
QA Whiteboard: [QAnalyst-Triage?][lead-review+] → [QAnalyst-Triage+][lead-review+]
Flags: needinfo?(ktucker)
Comment 19•8 years ago
|
||
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
Comment 20•8 years ago
|
||
Updated•4 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•