Skip to content
This repository has been archived by the owner. It is now read-only.

Can't launch simulator on 64-bit Linux #105

Closed
benfrancis opened this issue Nov 16, 2012 · 20 comments

Comments

@benfrancis
Copy link

commented Nov 16, 2012

STR:

  • Open Firefox
  • Install version of extension for Linux
  • Tools -> Web Developer -> Firefox OS Simulator
  • Press the button to start the simulator

Expected:

  • B2G Desktop launches

Actual:

  • The button transitions back to "Stopped" and I see "Addon-message: isRunning" in the console.

Tried on both Firefox (release channel) and Nightly on 64-bit Ubuntu.

Worked fine on OS X.

@benfrancis

This comment has been minimized.

Copy link
Author

commented Nov 16, 2012

It looks like this might be caused by a broken B2G Desktop build, I have filed https://bugzilla.mozilla.org/show_bug.cgi?id=812484

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Nov 18, 2012

I don't see this problem on my Fedora 17 64-bit test VM. When I press the button to start the Simulator, it starts up successfully.

The Simulator is actually using a build off the Aurora branch, but when I download the most latest Central nightly, the one to which you link from bug 812484, and run it directly, it also works.

I did a bit of searching and found bug 723487, which is full of people having this problem for various Mozilla apps (mostly Firefox and Thunderbird, presumably because those are the two most popular ones). But it isn't clear that there's a single reason for it, since folks in that bug report various workarounds.

I also noticed this blog post in which a Debian user solved this problem with Firefox by installing ia32-libs-gtk, although the post doesn't state the bit depth of the user's system.

@maciekmp

This comment has been minimized.

Copy link

commented Nov 19, 2012

The same issue on OpenSuse OS 12.2 64bit. After click button to run it returns to position "Stopped"

@Audo

This comment has been minimized.

Copy link

commented Nov 20, 2012

I have the same issue on Ubuntu 10.10 x86_64.

@cyan92128505

This comment has been minimized.

Copy link

commented Nov 21, 2012

The same issue on OpenSuse OS 12.2 32bit. After click button to run it returns to position "Stopped"

@fsoft72

This comment has been minimized.

Copy link

commented Nov 21, 2012

Same problem here on Linux Mint 64bit and Debian Weezy 64bit

@ghost ghost assigned mykmelez Nov 21, 2012
@hobbidhobbin

This comment has been minimized.

Copy link

commented Nov 25, 2012

same problem Ubuntu 10.04 64bit firefox 17.0

Update -error console
[
info: r2d2b2g: Simulator.onMessage toggle
info: r2d2b2g: linux64/b2g/b2g-bin terminated with 65280
//or occasionally after restarting firefox
info: r2d2b2g: Simulator.onMessage toggle
info: r2d2b2g: linux64/b2g/b2g-bin terminated with 0
]
In instances where it terminates with 0 (after it has returned to stopped once) it will stay on running although the simulation does not appear.

-Terminal
[
//Here's the problem from my terminal
//command I ran
'/home/[my_name]/.mozilla/firefox/i26je937.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/b2g.bin'
//output
XPCOMGlueLoad error for file /home/[my_name]/.mozilla/firefox/i26je937.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/libxpcom.so
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM
]

I did check, and a 52.8mb file called libxul.so is the the directory /home/[my_name]/.mozilla/firefox/i26je937.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Nov 26, 2012

I just tried this with a new install of Ubuntu 12.10 64-bit (Linux ubuntu 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:26:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux), and I was unable to reproduce the problem. Clicking the toggle button started B2G Desktop successfully, and I was then able to use it.

I notice a couple reports here mention older versions of Ubuntu (10.04, 10.10). Perhaps the age of the system is a factor?

Another possibility is that the code that detects whether you're running a 32-bit or 64-bit installation is failing.

For folks who are having problems: what does the Error Console say after the button returns to "Stopped"? There should be a message like the following:

info: r2d2b2g: linux64/b2g/b2g-bin terminated with 0

(But the signal code should be something other than "0".)

If you know how to find your Firefox profile, it might also be interesting to see what happens when you run B2G directly by doing something like the following:

~/.mozilla/firefox/jx97r2hn.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/b2g-bin -profile ~/.mozilla/firefox/jx97r2hn.default/extensions/r2d2b2g@mozilla.org/profile

(Note that the path provided to the -profile flag may have to be absolute.)

@fsoft72

This comment has been minimized.

Copy link

commented Nov 27, 2012

Hi mykmelez,

just did some tests starting from your hints and this is what I got (I am using a Linux Mint Debian Edition, 64bit with 'Wheezy' repositories).

~/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/b2g-bin -profile ~/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/profile
XPCOMGlueLoad error for file /home/fabio/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/libxpcom.so:
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

Please, note that I am using Firefox installed in a custom directory "/opt/firefox" and not the one shipped with the distribution.

Since, it seems that r2d2b2g is "just" a full firefox installation, I also tried running b2g directly:

fabio@fabio:~/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g$ ./b2g
Starting b2g-bin
Running: /home/fabio/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/b2g-bin -profile /home/fabio/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/gaia/profile
XPCOMGlueLoad error for file /home/fabio/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/resources/r2d2b2g/data/linux64/b2g/libxpcom.so:
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by libxul.so)
Couldn't load XPCOM.

I think the most interesting part is the GLIBC_2.14 version required. My system has 2.13.
As far as I know, the only distro that ships 2.14 nowadays is Ubuntu 12.10

Let me know if I can help you more.

Ciao!

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2012

Thanks @fsoft72, that was very helpful! Based on your comment, I looked at the build logs and found out that B2G Desktop nightlies for Linux (both 32-bit and 64-bit) are being built on Fedora 16 systems with glibc 2.14, so they don't run on installations with older versions of glibc.

Mozilla's Firefox nightlies for Linux, on the other hand, are built on CentOS systems with glibc 2.12, so they work on many more installations. So this problem can be solved (for the vast majority of users experiencing it) by building B2G Desktop on the same systems that Firefox is built on.

I filed bug 815805 to make that happen.

@jhford

This comment has been minimized.

Copy link

commented Nov 29, 2012

Fedora 16 and above also ship with glibc2.14.

I have produced a build on Centos 6, in the same environment that our Firefox nightlies are produced. Are people able to run this build on their systems? There isn't a working gaia packaged in with this build.

http://people.mozilla.org/~jford/b2g-20.0a1.en-US.linux-x86_64.tar.bz2

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2012

@jhford I tested your build on a CentOS 6 LiveDVD, to work around issues you and I both experienced testing on CentOS running in VMs. And it worked! Today's regular central nightly crashes, but if I point your build to the nightly build's Gaia profile, it starts up just fine and behaves as expected.

So it looks like building on CentOS 6 did indeed resolve the glibc compatibility issue, at least for anyone using a version of Linux with glibc 2.12 or newer.

@fsoft72

This comment has been minimized.

Copy link

commented Nov 30, 2012

@mykmelez good news! I am not very much into nightly testa, ma could you please give me some hints on how to test the whole thing? Also, running a firefox nightly will overwrite my firefox settings?

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2012

@fsoft72: Running a Firefox nightly won't overwrite your settings, but there's no need to do so in any case. Instead, just download @jhford's build of B2G and try to run it, pointing it to the profile that comes with your copy of the Simulator. So something like this:

~/Downloads/b2g/b2g-bin -profile ~/.mozilla/firefox/mn54q25i.default/extensions/r2d2b2g@mozilla.org/profile

(replacing ~/Downloads/b2g/b2g-bin with the path to the build on your system)

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Dec 1, 2012

I just uploaded a new version of the Simulator, 1.0rc1, that should address this problem for most Linux installations. If you've had this problem, try installing the latest version, and let me know how it works for you!

latest version of Simulator for Linux

@mykmelez mykmelez closed this Dec 1, 2012
@benfrancis

This comment has been minimized.

Copy link
Author

commented Dec 3, 2012

w00t! Works for me.

What changed? Did you switch it to a 32-bit build or is it using new builds created on Cent OS that work?

@mykmelez

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2012

It's using new builds created on CentOS!

@jhford

This comment has been minimized.

Copy link

commented Dec 4, 2012

Releng had to back out this change because other changes deployed at the same time had bad interactions. This patch lost, and was backed out.

I have submitted a new patch and Releng might be able to test it tomorrow, if they do it should deploy this week.

@kkdeep

This comment has been minimized.

Copy link

commented Jan 2, 2013

Simulator is not working on my linux machine. I'm using ubuntu 12.10 & the Firefox version is 17.0.1. The addon is 1.1pre1. Even after clicking on toggle button nothing is happening except "Running" message. Please have a look at screenshot & correct me if i'm not following the proper steps. http://screencloud.net/v/jiGL .

@peshoicov

This comment has been minimized.

Copy link

commented Feb 21, 2014

In case you're running FirefFox 26 or greater - you should use the AppManager instead of the normal FireFox OS Simulator.

https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
10 participants
You can’t perform that action at this time.