Closed
Bug 964598
Opened 11 years ago
Closed 11 years ago
firefox os simulator always shows gecko rev 18 in user agent
Categories
(Firefox OS Graveyard :: Simulator, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bkelly, Unassigned)
References
()
Details
(Keywords: dev-doc-needed)
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 whatsmyuseragent.com 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?
Updated•11 years ago
|
Component: Developer Tools: App Manager → Simulator
Product: Firefox → Firefox OS
![]() |
||
Comment 1•11 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. See https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference#Firefox_OS_version_number 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)
Comment 3•11 years ago
|
||
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)
![]() |
||
Updated•11 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. [1]: https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Using_a_Firefox_OS_Simulator_Add-on
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.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
![]() |
||
Comment 6•11 years ago
|
||
Ryan, Could you add links to the commits and/or patches? So that we do not lose the paper trail. Thanks.
Flags: needinfo?(jryans)
Comment 7•11 years ago
|
||
Cool - I've removed the note about this bug from https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager.
I meant to link the commits before, but GitHub was down at the time... Anyway, here you go: 1.2: https://github.com/mozilla/r2d2b2g/commit/2519993272406781c89089f2564e6a5cccdc879b 1.3: https://github.com/mozilla/r2d2b2g/commit/7386810a75d79483ca0530e4280d91c8e97f8527
Flags: needinfo?(jryans)
You need to log in
before you can comment on or make changes to this bug.
Description
•