Closed Bug 864294 Opened 12 years ago Closed 12 years ago

Activities database is not automatically recreated if it has been removed

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: davehunt, Unassigned)

Details

In the Gaia UI tests we are experimenting with removing the indexedDB folder in order to return the device to a 'clean' state between tests. This appears to be successful, and all databases are recreated when the B2G process is started, except for the activities database. Steps to reproduce: 1. Flash device: ./flash.sh 2. Stop 'b2g' process: adb shell stop b2g 3. Remove 'data/local/indexedDB/chrome' folder: adb shell rm -r data/local/indexedDB/chrome 4. Start 'b2g' process: adb shell start b2g Contents of data/local/indexedDB/chrome before removal: $ adb shell ls -al data/local/indexedDB/chrome/*.sqlite -rw------- root root 38912 2013-04-22 13:28 226660312ssm.sqlite -rw------- root root 235520 2013-04-22 13:28 2588645841ssegtnti.sqlite -rw------- root root 71680 2013-04-22 13:28 3104902905ascetiitvi.sqlite -rw------- root root 38912 2013-04-22 13:28 3249156127nsetta_ts.sqlite -rw------- root root 38912 2013-04-22 13:28 4045445992aslmar.sqlite -rw------- root root 38912 2013-04-22 13:28 846562544phus.sqlite Contents of data/local/indexedDB/chrome after b2g restart: $ adb shell ls -al data/local/indexedDB/chrome/*.sqlite -rw------- root root 38912 2013-04-22 13:29 226660312ssm.sqlite -rw------- root root 233472 2013-04-22 13:29 2588645841ssegtnti.sqlite -rw------- root root 38912 2013-04-22 13:29 3249156127nsetta_ts.sqlite -rw------- root root 38912 2013-04-22 13:29 4045445992aslmar.sqlite -rw------- root root 38912 2013-04-22 13:29 846562544phus.sqlite
Why is this nomed to block? This is automation-specific only, not user impacting from what I see here.
Removing flag. If the database is removed then certain apps become unusable. I have no scenario that would cause the database to be removed other then forcibly doing so.
blocking-b2g: leo? → ---
Whiteboard: [qa-automation-blocked]
What does our "factory reset" do?
(In reply to ben turner [:bent] from comment #3) > What does our "factory reset" do? Factory reset is not an issue, since it clears everything on the data partition. We then go through the "first run" steps where we create the activities database.
(In reply to Fabrice Desré [:fabrice] from comment #4) > (In reply to ben turner [:bent] from comment #3) > > What does our "factory reset" do? > > Factory reset is not an issue, since it clears everything on the data > partition. We then go through the "first run" steps where we create the > activities database. Is this what our automation should be doing? If so, can you elaborate? I've just attempted a factory reset on my device with an engineering build and now I can't get it to boot or into fastboot mode. Not specifically related to this bug, but if you have any suggestions for how I might recover please ping me.
Doing a factory reset on an eng build is not supported. You just removed all your apps, and we can't recover them from the /system partition. To go in fastboot, remove the battery, put it in place again, and press volume-up + power. To recreate the activities db with the automation, I think the easiest way is to remove the profile directory at /data/b2g/mozilla/XXX.default
If I remove /data/b2g/mozilla/XXX.default b2g fails to start. If I remove everything beneath /data/b2g/mozilla/XXX.default I get a similar issue. However, removing all files (not folders) beneath /data/b2g/mozilla/XXX.default will restart and recreate an activities database. The database is however smaller in size to the original one: -rw------- root root 38912 2013-04-26 07:19 3104902905ascetiitvi.sqlite 38912 vs 71680...
When removing a profile, it's safer to delete all of /data/b2g/mozilla
Thanks Fabrice, that's working for me! I'm assuming that makes this bug invalid?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Whiteboard: [qa-automation-blocked]
You need to log in before you can comment on or make changes to this bug.