firefox os simulator always shows gecko rev 18 in user agent



Firefox OS
4 years ago
4 years ago


(Reporter: bkelly, Unassigned)



Firefox Tracking Flags

(Not tracked)





4 years ago
It appears the user agent is incorrect in the simulator.  Steps to reproduce:

1) Install v1.2 or v1.3 simulator.
2) Open about:app-manager and launch simulator
3) Open browser within simulator
4) Navigate to

Observe that it says the following for both v1.2 and v1.3:

  Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

Shouldn't this be updated to 26 for v1.2 and 28 for v1.3?


4 years ago
Component: Developer Tools: App Manager → Simulator
Product: Firefox → Firefox OS

Comment 1

4 years ago
A couple of possibilities:

* Adjust to the paired version number of Firefox Desktop
  If Firefox DSK = 26.0 then UA is "Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0"

* Create a user-agent switcher for different versions of Mobile/Tablet
  * "Mozilla/5.0 (Mobile; rv:$VERSION) Gecko/$VERSION Firefox/$VERSION"
  * "Mozilla/5.0 (Mobile; nnnn; rv:$VERSION) Gecko/$VERSION Firefox/$VERSION"
  * "Mozilla/5.0 (Tablet; rv:$VERSION) Gecko/$VERSION Firefox/$VERSION"
  * "Mozilla/5.0 (Tablet; nnnn; rv:$VERSION) Gecko/$VERSION Firefox/$VERSION"

with $VERSION depending on the release version number of Firefox OS.

Opera on its Mobile Emulator had predefined profiles for different known devices which would adjust both the screen size information, and the HTTP headers. It was very practical. You had also the possibility to define your own profiles.
Alex, do you know what is causing the user agent version to be pinned to 18 like this?

I am happy to look into the fix, if you can clue me in on why this is happening at all.
Flags: needinfo?(poirot.alex)
See in r2d2b2g/prosthesis/defaults/preferences/prefs.js

Note that I haven't uplifted these prefs to b2g,
so that by default, if we don't uplift any of those,
Simulator 1.4, built out of mozilla-central will have same behavior than b2g desktop.
I didn't really knew about this file until today!
I haven't looked at simulator User agent behavior either.

I'd be pleased to accept any patch against r2d2b2g,
but I may not be able to spawn new xpis until I get back home on 24th and get access to a mac.
Flags: needinfo?(poirot.alex)


4 years ago
This bug has been noted on the App Manager docs page[1], so we should should clean that up once this is resolved.

Keywords: dev-doc-needed
I've deployed updated builds of Simulator 1.2 (6.0pre9) and 1.3 (7.0pre9) for all platforms that resolve this issue.

I verified that the correct user agent is shown with all new builds.

This will be handled differently for future Simulator builds, but I am pretty sure it is also covered there too.
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 6

4 years ago

Could you add links to the commits and/or patches?
So that we do not lose the paper trail. 
Flags: needinfo?(jryans)
Cool - I've removed the note about this bug from
I meant to link the commits before, but GitHub was down at the time...

Anyway, here you go:

Flags: needinfo?(jryans)
You need to log in before you can comment on or make changes to this bug.