Closed
Bug 777259
Opened 13 years ago
Closed 13 years ago
Device Storage returning null object
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: onecyrenus, Assigned: dhylands)
References
Details
Attachments
(1 file)
Environment:
otoro- 7/24/2012 build
gaia app - Music
Device Storage is returning null.
The repro case is to load audio in /sdcard/Music, and then start the Music app
E/GeckoConsole( 106): Content JS ERROR at app://music.thisdomaindoesnotexist.org/js/MediaDB.js:197 in MediaDB: MediaDB(): can't get DeviceStorage object TypeError: navigator.getDeviceStorage(mediaType) is null
This might also not be a device storage error as much as a permsissions error, unsure, but i verified the permissions to device storage are correct in permissions.sqlite
173|music.thisdomaindoesnotexist.org|indexedDB-unlimited|1|0|0
174|music.thisdomaindoesnotexist.org|webapps-manage|1|0|0
175|music.thisdomaindoesnotexist.org|offline-app|1|0|0
176|music.thisdomaindoesnotexist.org|pin-app|1|0|0
177|music.thisdomaindoesnotexist.org|websettings-read|1|0|0
178|music.thisdomaindoesnotexist.org|websettings-readwrite|1|0|0
179|music.thisdomaindoesnotexist.org|content-camera|1|0|0
180|music.thisdomaindoesnotexist.org|webcontacts-manage|1|0|0
181|music.thisdomaindoesnotexist.org|wifi-manage|1|0|0
182|music.thisdomaindoesnotexist.org|desktop-notification|1|0|0
183|music.thisdomaindoesnotexist.org|geolocation|1|0|0
184|music.thisdomaindoesnotexist.org|device-storage|1|0|0
185|music.thisdomaindoesnotexist.org|alarms|1|0|0
Reporter | ||
Updated•13 years ago
|
blocking-basecamp: --- → ?
Reporter | ||
Comment 1•13 years ago
|
||
Verified this is happening with Video App as well, and a similar error is being returned.
Reporter | ||
Comment 2•13 years ago
|
||
logcat output:
I/Vold ( 100): /dev/block/vold/179:1 being considered for volume sdcard
D/Vold ( 100): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 (Checking)
W/SocketClient( 100): write error (Broken pipe)
W/SocketClient( 100): Unable to send msg '605 Volume sdcard /mnt/sdcard state changed from 1 (Idle-Unmounted) to 3 (Checking)'
W/SocketListener( 100): Error sending broadcast (Broken pipe)
Comment 3•13 years ago
|
||
dclarke, does your device have a sdcard installed? If not, then everything is working as expected.
Reporter | ||
Comment 4•13 years ago
|
||
Yes it does. I can adb shell cd /sdcard/Music
ls -al shows many files
Reporter | ||
Comment 5•13 years ago
|
||
Doug are you running the latest otoro build from releases.mozilla ?
Taht would be a good place to start.
Reporter | ||
Comment 6•13 years ago
|
||
Doug are you running the latest otoro build from releases.mozilla ?
that would be a good place to start.
Updated•13 years ago
|
blocking-basecamp: ? → +
Updated•13 years ago
|
Assignee: nobody → doug.turner
Comment 8•13 years ago
|
||
if the volume manager says that the sdcard isn't present, we return a null storage object for all types (video, pictures, music)
Assignee: doug.turner → dhylands
Assignee | ||
Comment 9•13 years ago
|
||
I figured out the problem.
The nsVolumeService class doesn't get instantiated until the very first time that:
do_GetService(NS_VOLUMESERVICE_CONTRACTID)
is called. The nsVolumeService constructor then fires off some IOTHread initialization. If the call to GetVolumeByPath comes in before the iothread has had a chance to finish, then it see no volume.
So I see a few potential solutions:
1 - Have the VolumeManager do a call to do_GetService to have the nsVolumeService instantiated earlier.
2 - Have the nsVolumeService do some type of synchronization so that GetVolumeByPath blocks until the iothread is finished
3 - Move the main thread data out of nsVolumeService and have the main thread data initialized earlier, so that nsVolumeService can access it immediately.
I'm inclined to do #3. Comments?
Comment 10•13 years ago
|
||
4 - You could just add the volume service to app-startup. This would create your service on startup and you don't have to do anything else.
Not sure about the impact on startup perf though.
Assignee | ||
Comment 11•13 years ago
|
||
Attachment #650347 -
Flags: review?(doug.turner)
Comment 12•13 years ago
|
||
Comment on attachment 650347 [details] [diff] [review]
Bug 777259 - Launch VolumeService earlier to prevent races on retrieving Volume information
works great.
Attachment #650347 -
Flags: review?(doug.turner) → review+
Reporter | ||
Comment 13•13 years ago
|
||
Let us know when this makes it into the tree
Assignee | ||
Comment 14•13 years ago
|
||
I pushed it to mozilla-inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a08177931d2
As long as no build failures occur, it should be on mozilla-central tomorrow morning.
Comment 15•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Reporter | ||
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•