RHEL Linux users having trouble starting the Simulator (X server security)

RESOLVED DUPLICATE of bug 1159083

Status

Firefox OS
Simulator
RESOLVED DUPLICATE of bug 1159083
3 years ago
2 years ago

People

(Reporter: jryans, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

From bug 980437 comment 10 and 11:

Same problem here with Red Hat Enterprise Linux 6.5 64-bits using Firefox 30.0

Log when I try to start simulator from app-manager:

21:21:03: Found simulator: Firefox OS 1.3
21:21:03: Starting simulator...
21:21:03: Simulator ready. Connecting.
21:21:03: connecting to localhost:49735
21:21:23: connection timeout. Possible causes: didn't click on 'accept' (prompt).
21:21:23: disconnecting
21:21:23: disconnected

Browse Console info:

"subprocess: getlimit: maxFD=1024" simulator-process.js:36
"subprocess: subprocess started; got PID 20861" simulator-process.js:36
"subprocess: Got msg from stderr: initialising library with libc.so.6" simulator-process.js:36
"subprocess: Got msg from stdout: initialising library with libc.so.6" simulator-process.js:36
"subprocess: Got msg from stderr: waitpid signaled subprocess stop, exitcode=32512" simulator-process.js:36
"subprocess: Got msg from stderr: poll returned HUP" simulator-process.js:36
"subprocess: Got msg from stdout: poll returned HUP" simulator-process.js:36
"subprocess: Pipe stderr closed" simulator-process.js:36
"subprocess: Pipe stdout closed" simulator-process.js:36
"subprocess: Cleanup called" simulator-process.js:36
"subprocess: trying to close stdin" simulator-process.js:36
"subprocess: Closing Stdin" simulator-process.js:36
"linux64/b2g/b2g-bin terminated with 0" simulator-process.js:121
TypeError: this._client is null
Stack trace:
Connection.prototype.disconnect@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/connection-manager.js:186:7
Connection.prototype._onTimeout@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/connection-manager.js:285:5
notify@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/gtcarlos/.mozilla/firefox/abaafnzw.gtcarlos/extensions/aboutTrackers@prospector.labs.mozilla.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/timers.js:40:9
 timers.js:43

It seems that this problem has to do with XOrg not allowing the simulator to use the screen.

It can be "worked-around" by disabling access control of X server by issuing the following:

$ xhost +

That will temporarily disable access control and allow the simulator to connect to the X Server, at least that worked for me. Do note that this might be "a security concern" so make sure you do it only when actually using the simulator.
(Reporter)

Updated

3 years ago
OS: Mac OS X → Linux
(Reporter)

Comment 1

3 years ago
Gustavo, any guess why this issue is not seen on other distros (like Ubuntu for example)?

Is it just that they do not enable this form of X server security be default?
Flags: needinfo?(gus)
Also, what does the command "xhost" report under RHEL?

Comment 3

3 years ago
I'm not sure, I guess it depends on the distro setup. I use OpenSuSE 13.1 and I don't know why but AFAIK the emulator should be able to connect since it is being executed from localhost.

Could it be a SELinux / AppArmor profile issue? I haven't change any of those but I do know they are enabled. At least AppArmor and in it's settings there is a "Remote access to X server disabled" option.
Flags: needinfo?(gus)

Comment 4

2 years ago
I'm having the same problem on Linux 3.19.0-21-generic #21-Ubuntu x86_64 GNU/Linux. I had to `xhost +` to be able to launch a simulator.

This is the console log when it fails :

"Connection status changed: connecting" app-manager.js:97
"B2G terminated with 0" simulator-process.js:83
"Délai de l'opération dépassé : Connecting to Firefox OS 2.0" webide.js:327:4
UI.reportError() webide.js:327
UI.setupBusyTimeout/this._busyTimeout<() webide.js:267

"Connection status changed: disconnecting" app-manager.js:97
"Connection status changed: disconnected" app-manager.js:97
"L'opération a échoué : Connecting to Firefox OS 2.0" webide.js:327:4
UI.reportError() webide.js:327
UI.busyUntil/<() webide.js:308
Handler.prototype.process() Promise-backend.js:870
this.PromiseWalker.walkerLoop() Promise-backend.js:746
this.PromiseWalker.scheduleWalkerLoop/<() Promise-backend.js:688
(Reporter)

Comment 5

2 years ago
A similar sounding issue was fixed in bug 1159083 for desktop Firefox 39 and later.

What version of desktop Firefox do you have?
Flags: needinfo?(wordsbybird)

Comment 6

2 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5)
> A similar sounding issue was fixed in bug 1159083 for desktop Firefox 39 and
> later.
> 
> What version of desktop Firefox do you have?
I'm using v.38
Flags: needinfo?(wordsbybird)
(Reporter)

Comment 7

2 years ago
Can you test in 39 or later to see if you still see the problem there?
Flags: needinfo?(wordsbybird)

Comment 8

2 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #7)
> Can you test in 39 or later to see if you still see the problem there?

I have installed v39 and the simulators work without fine without any extra action.
Flags: needinfo?(wordsbybird)
(Reporter)

Comment 9

2 years ago
Okay, great, then I believe this is a duplicate of bug 1159083.  Please re-open if I have misunderstood.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1159083
You need to log in before you can comment on or make changes to this bug.