Closed
Bug 856905
Opened 11 years ago
Closed 11 years ago
IndexedDB throws "Unknown Error" in Podcasts reference app
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 856921
People
(Reporter: tofumatt, Unassigned)
Details
So I've been working on a Podcasts reference app that grabs a podcast feed, downloads its audio with systemXHR, then stores audio files in IndexedDB. It works fine on desktop, but with seemingly large files on the simulator saving things to IndexedDB fails. Worse, it fails with an "Unknown error", giving me basically no insight into what's happening. A zip of the app is here: http://cl.ly/1G3q0D3J1Z3m Alternatively, you can build/test the app: `git clone --recursive git://github.com/mozilla/high-fidelity.git` and run `make build`. After that you should be able to add the app in www-built/ to the simulator as a packaged app. --- Steps to reproduce: 1. Install "Podcasts" app as privileged app 2. Connect to simulator/phone with remote debugging 3. Open podcasts 4. Search for "ogg" in search pane 5. Subscribe to a podcast (I usually use Linux something something ogg version) 6. Download an episode Expected result: Podcast is saved to IndexedDB and is playable. NOTE: This WORKS on Firefox for desktop, at least in Aurora/Nightly, assuming systemXHR is enabled/forced with an add-on. Actual result: IndexedDB throws an "Unknown error". These podcast files are often in excess of 50MB, but I was under the impression that there was no limit on the size of storage an app could use if it has the storage permissions in its manifest, so I'm lost as to what's happening.
Reporter | ||
Comment 1•11 years ago
|
||
The code doing the IndexedDB work, by the way, is pretty basic. You can view it here: https://github.com/mozilla/high-fidelity/blob/master/www/js/datastore.js
Comment 2•11 years ago
|
||
Ben - Didn't we change the rules on storage requirements on apps recently?
Flags: needinfo?(bent.mozilla)
Reporter | ||
Comment 3•11 years ago
|
||
Strange, I didn't see anything in the permissions documentation mentioning that.
Comment 4•11 years ago
|
||
(In reply to tofumatt [:tofumatt] from comment #3) > Strange, I didn't see anything in the permissions documentation mentioning > that. For context, read bug 856032. I should mean to say that there was a known bug with this working so well, so I'm wondering if this issue is related to that.
Reporter | ||
Comment 5•11 years ago
|
||
Interesting. For what it's worth though, the app fails to store on first launch. Not sure if it's still falling prey to the quota bug mentioned, but it just never gets to save the large file. It should be noted that it saves the podcast cover images just fine with the exact same code path (use systemXHR to get a binary blob and save said blob to IndexedDB using the exact same method), so I assume it's a size issue. The audio files are 50mb+ while the images are often just a few hundred kb, if that.
Reporter | ||
Comment 6•11 years ago
|
||
Turns out this was caused by me mistakenly removing the "storage" permission from my app. Still, this means Qutoa errors are displaying as Unknown errors, so the base issue still stands: exceed the default quota in indexeddb for apps without the storage permission and you get "Unknown error", which is bad and should be more specific/helpful.
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(bent.mozilla)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•