Closed Bug 793243 Opened 12 years ago Closed 12 years ago

Eng builds (VARIANT=) fail to show homescreen on otoro

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dhylands, Assigned: fabrice)

Details

Attachments

(2 files, 1 obsolete file)

If you do a VARIANT= (i.e. eng build) for otoro, then the homescreen fails to load, if the phone was just flashed using ./flash.sh

Using "./flash.sh gecko" with the same image works.

The problem boils down to code somewhere trying to create the /system/b2g/webapps directory. On a boot after ./flash, /system is on a RO filesystem, so creating that directory is guaranteed to fail.

I see the following messages in logcat (the nsLocalFile::CreateAndKeepOpen: create of '/system/b2g/webapps' failed: 30 line was a print added in my tree):

nsLocalFile::CreateAndKeepOpen: create of '/system/b2g/webapps' failed: 30
[JavaScript Error: "DOMApplicationRegistry: Could not parse JSON: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsILocalFile.create]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: line 67"  data: no]" {file: "resource://gre/modules/Webapps.jsm" line: 364}]
nsLocalFile::CreateAndKeepOpen: create of '/system/b2g/webapps' failed: 30
[JavaScript Error: "[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsILocalFile.create]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: line 67"  data: no]" {file: "resource://gre/modules/FileUtils.jsm" line: 67}]

and later on, I see:

[JavaScript Error: "DOMApplicationRegistry: Could not read from /system/b2g/webapps/webapps.json : [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIChannel.asyncOpen]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource://gre/modules/NetUtil.jsm :: NetUtil_asyncOpen :: line 165"  data: no]" {file: "resource://gre/modules/Webapps.jsm" line: 371}]
Attached file Backtraces
Attachment #663486 - Attachment mime type: text/x-log → text/text
Attachment #663486 - Attachment mime type: text/text → text/plain
Attached patch patch (obsolete) — Splinter Review
getFile() calls getDir() with shouldCreate = true...
Assignee: nobody → fabrice
The patch gets rid of the 3rd warning in logcat, but I still don't applications populated on the homescreen until I do: ./flash.sh gecko.

If I do the following:

./flash.sh
and then do 
adb remount
right after the time is set, then I get apps populated.
Attached patch patch v2Splinter Review
Better patch, with a missing call to registerAppsHandler() in some cases.

I tested with:
- VARIANT=user
- no VARIANT
- linux desktop build

They all started and rebooted fine.
Attachment #663520 - Attachment is obsolete: true
Attachment #663620 - Flags: review?(dhylands)
Comment on attachment 663620 [details] [diff] [review]
patch v2

Review of attachment 663620 [details] [diff] [review]:
-----------------------------------------------------------------

Yep - I also tested VARIANT= and it works for me too!
Attachment #663620 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/mozilla-central/rev/f6472d712439
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: