Open Bug 1933984 Opened 7 months ago Updated 1 month ago

Firefox for Android sends improper value of user-agent header

Categories

(GeckoView :: General, defect)

Firefox 133
All
Android
defect

Tracking

(Not tracked)

People

(Reporter: yasu, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce:

  1. Start Firefox for Android with following tablet.
    https://www.docomo.ne.jp/support/product/d42a/index.html
  2. Access web server that is configured so the value of user-agent header in each HTTP request is recorded.
  3. Check the value of user-agent header that Firefox for Android send.

Actual results:

Web server receives HTTP request with following value of user-anget header.

"Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

IIUC, Android uses Linux as kernel but don't use X11 as GUI. So the value is obviously improper.

Expected results:

The value of user-agent header should be such as following.

"Mozilla/5.0 (Android 12; Mobile; rv:133.0) Gecko/133.0 Firefox/133.0"

In fact, Firefox for Android sends such user-agent header if it runs on smartphone such as Google Pixlel 8 Pro.

The severity field is not set for this bug.
:rsainani, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(rsainani)

Confirming this report as I have noticed this as well while working on the WebCompat Reporter. This is the case on my emulator pixel 8 (API 34), as well as my Samsung A35 (Android 14)

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(rsainani)

This may be a GV bug because when working on WebCompat Reporter, the default user agent string was being returned incorrectly by the GV API getWebCompatInfo so I'm going to move this there but feel free to move this back if I'm wrong

Product: Fenix → GeckoView

IIRC the bug was fixed with Firefox 134. But it happens again with 138 and doesn't change with 138.0.2.

Firefox Android uses desktop mode by default now (bug 1951681).

yasu-san, what's real problem if Firefox use Linux UA?. (ex. any web site is broken layout).

Flags: needinfo?(yasu)

What's the real problem if Firefox uses a Linux UA?

At the least, if it's going to imitate a desktop configuration, it should surely include Wayland, rather than XOrg 11, as its compositor's display protocol? However, this applies to Desktop, too:

Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0

Kato-san,

My real problem is that Firefox Android 137 uses mobile phone mode for some sites whereas 138 uses PC mode for them.
So the cause of my problem seems to the chages of default mode that you explain.
I have disabled setting of "常にPC版サイトを要求する(Always request PC mode site(?)" and now Firefox wokrs as is expected.

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