Closed Bug 1059897 Opened 10 years ago Closed 10 years ago

TypeMismatchError when listing files from sdcard

Categories

(Firefox OS Graveyard :: Simulator, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 996619

People

(Reporter: nazar, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 (Beta/Release) Build ID: 20140804060850 Steps to reproduce: Try to enumerate files on sdcard: areas = navigator.getDeviceStorages('sdcard') cursor = areas[0].enumerate() cursor.onerror = function () {console.log(this.error)} Actual results: DOMError { name: "TypeMismatchError", message: "" } No files listed (obviously I know about cursor.onsuccess, I've removed it for simplification). Expected results: No error, listed files.
Can you attach a link to the code or an archive of the app you are building? Do you request the device-storage permission in your manifest?
Flags: needinfo?(nazar)
My app is https://github.com/nazar-pc/CleverStyle-Music Currently it uses music storage, but I want to swich to sdcard in order to add new features. However, even executing mentioned piece of code in console I get error. Of course I've added permission request to manifest file, otherwise I'd get another type of error. I'm on Ubuntu x64 with latest available version of Firefox OS 2.0 Simulator 2.0.20140814.
Flags: needinfo?(nazar)
Any updates? This is truly critical bug that makes it impossible to work with SDCard at all!
I will check this out soon, if Alex doesn't beat me to it.
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
Isn't it related to bug 996619? We never tried to really fix for good sdcard support on desktop.
Flags: needinfo?(poirot.alex)
Indeed, as Alex says, it's related to bug 996619. I was able to get things working by creating the "fake-sdcard" directory mentioned in that bug. Nazar, does it work for you if you do that?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jryans) → needinfo?(nazar)
I encounter this error while trying to run Firetext (https://marketplace.firefox.com/app/firetext) on the latest simulator (Firefox OS 2.2).
Yes, fake-sdcard works fine, but that was not obvious)
Flags: needinfo?(nazar)
(In reply to Nazar Mokrynskyi from comment #8) > Yes, fake-sdcard works fine, but that was not obvious) Yeah, agreed. We should probably pre-create that directory in the simulator to avoid the error (and document it).
Status: NEW → RESOLVED
Closed: 10 years ago
No longer depends on: 996619
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.