Closed Bug 911751 Opened 11 years ago Closed 11 years ago

B2G desktop build launches 'headless'

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

x86
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davehunt, Assigned: fabrice)

References

Details

The latest nightly mozilla-central B2G desktop are failing to launch. When running the Gaia UI tests it appears that they pass, however the application is never present on the screen, as if it's running headless.

When running from the command line I get the following in the console:

$ ./B2G.app/Contents/MacOS/b2g-bin --profile=~/Desktop/B2G.app/Contents/MacOS/gaia/profile/
1378125752109	Marionette	INFO	MarionetteComponent loaded
1378125752117	Marionette	INFO	marionette enabled via build flag and pref
1378125752164	Marionette	INFO	marionette-server.js loaded
1378125752183	Marionette	ERROR	exception: NS_ERROR_FAILURE, Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIServerSocket.initSpecialConnection]
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://browser/content/shell.js :: shell.homeURL :: line 185"  data: no]
************************************************************
Error loading: resource://gre/modules/devtools/server/transport.js: ReferenceError: `Components` is not available in this context.
Functionality provided by Components may be available in an SDK
module: https://jetpack.mozillalabs.com/sdk/latest/docs/ 

However, if you still need to import Components, you may use the
`chrome` module's properties for shortcuts to Component properties:

Shortcuts: 
    Cc = Components.classes 
    Ci = Components.interfaces 
    Cu = Components.utils 
    CC = Components.Constructor 
Example: 
    let { Cc, Ci } = require('chrome');
 - Loader/load/descriptors<.Components@resource://gre/modules/commonjs/toolkit/loader.js:243
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js -> resource://gre/modules/devtools/server/transport.js:8
loadSubScript@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:29
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:59
evaluate@resource://gre/modules/commonjs/toolkit/loader.js:223
load@resource://gre/modules/commonjs/toolkit/loader.js:257
require@resource://gre/modules/commonjs/toolkit/loader.js:359
@resource://gre/modules/devtools/dbg-server.jsm:23

Error while initializing devtools: ReferenceError: `Components` is not available in this context.
Functionality provided by Components may be available in an SDK
module: https://jetpack.mozillalabs.com/sdk/latest/docs/ 

However, if you still need to import Components, you may use the
`chrome` module's properties for shortcuts to Component properties:

Shortcuts: 
    Cc = Components.classes 
    Ci = Components.interfaces 
    Cu = Components.utils 
    CC = Components.Constructor 
Example: 
    let { Cc, Ci } = require('chrome');

@resource://gre/modules/devtools/server/transport.js:8
loadSubScript@resource://gre/modules/devtools/server/main.js:29
@resource://gre/modules/devtools/server/main.js:59
@resource://gre/modules/devtools/dbg-server.jsm:23
The only change I can see in the mentioned pushlog related to the failure message is bug 910184. :jryans any idea if your change could have caused this?
Flags: needinfo?(jryans)
Yes, this was caused by bug 910184.  I apologize for the trouble.  Nothing appeared out of order with the try push for it.

In any case, there is a fix waiting to be landed on bug 911127.  I'll dupe this to that one.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(jryans)
Resolution: --- → DUPLICATE
Hmm, actually, I think there may be two unrelated issues here.

My patch in bug 910184 did cause the "Error loading: resource://gre/modules/devtools/server/transport.js: ReferenceError: `Components` is not available in this context." error, and that is what is fixed in bug 911127.

However, I was always able to get the B2G desktop UI to appear while diagnosing these issues.  Perhaps a different change caused it to go headless?
Status: RESOLVED → REOPENED
Flags: needinfo?(dave.hunt)
Resolution: DUPLICATE → ---
I tested the tinderbox regression range you gave above in comment #2, and it doesn't seem correct, at least on my system.  The last good that you listen in there is still bad for me, as far as the headless issue is concerned.

I found a slightly earlier regression range for the headless issue:

Last good:
https://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-central-macosx64_gecko/1377774122/
http://hg.mozilla.org/mozilla-central/rev/8451e35a8a50

First bad:
https://ftp.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-central-macosx64_gecko/1377783930/
http://hg.mozilla.org/mozilla-central/rev/91672bee9a77

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8451e35a8a50&tochange=91672bee9a77
You're right, I was too focused on the error I saw and didn't notice that the headless issue actually preceded it. Thanks for the updated regression range.
Flags: needinfo?(dave.hunt)
Summary: B2G desktop build fails to launch → B2G desktop build launches 'headless'
Looks like it's caused by bug 894927 :(
Depends on: 894927
This has been fixed in today's nightly with the backout of bug 894927.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.