Closed Bug 999588 Opened 11 years ago Closed 7 years ago

[OPEN_C] Device defaults to internal memory after resetting even when there is an SD card present

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: marcia, Unassigned)

Details

Seen while running on Open C using: Gaia f0463704888881b8ed1619e8d4b0d851b0e0311b SourceStamp 1d0496e30feb BuildID 20140422040203 Version 31.0a1 STR: 1. Have a .vcf file on the SD card ready for import 2. Reset the device and go through the first run 3. Attempt to import contacts from the "Import Contacts" screen in FTU 4. Select "Memory Card" Expected: Contacts would be imported if SD card is present (Assuming that the only time it would default to internal memory is if we did not have an SD Card). Once you finish the First run and then go into Settings, you see that the reason this is happening is because "Default Media Location" is set to internal instead of SD card. Once I change it SD card, there are no issues importing the .vcf file. Actual: Error message received "Could not import contacts from memory card" .vcf file on card has been used successfully in many other smoketests with no issues. Also pulled out that SD card and testing in Buri and import worked fine with same file. Logcat if needed is in Bug 999507.
Does this reproduce on a 1.4 Open C build?
Keywords: qawanted
Issue is reproducible on today's 1.4 Open C. Importing fails from SD card until the setting for Default Media Location is changed from Internal to SD card. Device: Open C 1.4 MOZ BuildID: 20140423000203 Gaia: 25d53d442cbf17c150575c98979e957ae040e023 Gecko: 2d1b4d36eef9 Version: 30.0a2 Firmware Version: P821A10-ENG_20140219
Keywords: qawanted
Dave - Do you know why this would happen?
Flags: needinfo?(dhylands)
I don't have an Open C, so I can't actually debug this. If I had to guess, I'd say that the FTU code is doing something incorrectly, or using a hard-coded volume name, or something along those lines. There is no "deterministic name" for the external card. When both internal and external volume names exist, then the internal one will be called sdcard. You can enumerate the names of available storage areas by using navigator.getDeviceStorages and looking at the .storageName attribute for each one which is returned. There is a .default attribute (set to true or false) for the one which is currently the default volume.
Flags: needinfo?(dhylands)
Couple of followup QA Requests: 1. Does this happen on the 1.3 Open C base image? 2. Does this reproduce in the Contacts app?
Component: Gaia::Contacts → Gaia::First Time Experience
Keywords: qawanted
(In reply to Jason Smith [:jsmith] from comment #5) > Couple of followup QA Requests: > > 1. Does this happen on the 1.3 Open C base image? This issue does reproduce in the FTU and Contacts app using the 1.3 Open C base image . Once I switched the default storage to the SD card, I was able to import the contacts. > 2. Does this reproduce in the Contacts app? This issue does reproduce in the Contacts app on the 04/24/14 1.4 and Master builds on an Open C. Again, once I switched the default storage to the SD card, I was able to import the contacts. - Open C 1.4 - Device: Open C v1.4 MOZ BuildID: 20140424000203 Gaia: b6a41ee9e2934fe9692da6fb1cb310cb759e9870 Gecko: 2e9abf89c087 Version: 30.0a2 Firmware Version: P821A10-ENG_20140219 - Open C Master - Device: Open C Master MOZ BuildID: 20140424040201 Gaia: d25852a189c9707b144eb5f82d08384eb066c0fd Gecko: c8055a00235d Version: 31.0a1 Firmware Version: P821A10-ENG_20140219
Keywords: qawanted
So it sounds like the importing of contacts always wants to use the external sdcard. This is possible to do. There are two ways that you can read from a specific storage area: 1 - Use the appropriate storage area (from the array of storage areas returned by navigator.getDeviceStorages) and a relative path. 2 - Use any storage area (the default one returned by navigator.getDeviceStorage or any of the ones returned by navigator.getDeviceStorages) and specify an absolute path. The absolute path will be of the form /storageName/relative-path, where storageName matches the .storageName attribute from one of the entries returned from navigator.getDeivceStorages.
I'd recommend that you use the following logic: Call navigator.getDeviceStorages - if the returned array is of length 1, use that entry - otherwise use the second entry in the returned array. getDeviceStorages always puts sdcard as the first entry of the returned array. For devices with internal and external storage, the internal storage will always be called sdcard.
This has been around for multiple releases, so this isn't a blocker.
blocking-b2g: 2.0? → backlog
blocking-b2g: backlog → ---
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.