Closed Bug 1461931 Opened 7 years ago Closed 10 months ago

Linux Desktop ARMv7 User Agent breaks websites

Categories

(Web Compatibility :: Site Reports, defect, P3)

Firefox 60
ARM
Linux

Tracking

(firefox92 affected, firefox112 affected)

RESOLVED FIXED
Tracking Status
firefox92 --- affected
firefox112 --- affected

People

(Reporter: t28427, Assigned: denschub)

References

()

Details

(Keywords: compat, webcompat:needs-diagnosis, Whiteboard: [webcompat:sightline])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux; rv:55.0) Gecko/20170101 Firefox/55.0 Build ID: 20180509234957 Steps to reproduce: Install Firefox 60 on a Linux based ARMv7 "hard float" OS. - this is common for ARM Chromebooks. Browse Google or Amazon (.com/.co.uk) Actual results: Amazon serves a broken version of the page because it detects 'armv7l' on the User Agent string. Amazon is completely unusable, as there is no way to select a desktop version of the site. Google serves a version which looks like a desktop version but with some broken layout elements. Expected results: When I replaced the UA with the same UA but lacks the architecture (armv7l), everything works as in x86 desktops. While I understand this may be more of a web site related bug, the developer reference [1] does mostly show a mobile version of Firefox using a similar user agent: Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0) Gecko/20100101 Firefox/10.0 Fennec/10.0 Most devices that want mobile specific versions have 'Mobile/TV/Tablet' in place of 'X11/Maemo'. So maybe the specifcations page needs an update to change the Maemo string to require 'Mobile'? I never had an issue with Chrome OS which uses the following string: Mozilla/5.0 (X11; CrOS armv7l 9592.96.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.114 Safari/537.36 Commonly used architecture names I tried: armv7 - Amazon breaks. armv7l - Both break. armv7h - Amazon breaks. armv7hf - Amazon breaks. armel - Amazon breaks. armhf - All ok. arm64 - All ok. My kernel reports itself as 'armv7l'. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
Severity: normal → major
Component: Untriaged → Networking: HTTP
Flags: webcompat?
Keywords: compat
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → ARM
Component: Networking: HTTP → Desktop
Flags: webcompat?
Product: Core → Tech Evangelism
Version: 60 Branch → Firefox 60
I'm not sure what to do with this bug exactly -- it's half way between a platform / product issue, and a compat / UA string thing. Andreas, any ideas? This affects Fennec users on CrOS.
Flags: needinfo?(abovens)
Priority: -- → P3
Flags: needinfo?(abovens)
Summary: Linux Dekstop ARMv7 User Agent breaks websites → Linux Desktop ARMv7 User Agent breaks websites
Is there a strong reason why the specific architecture should be included in the UA string?
www.mozilla.org was using the UA string to serve Firefox for Android depending on the architecture (ARMv6, ARMv7 or x86) though it’s no longer needed as all the builds have been moved to Google Play.
Product: Tech Evangelism → Web Compatibility

wontfix or invalid? Is it still happening?

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---

It still isn't working properly. Amazon seems to detect "X11" as a marker for desktop use, while Google seems to be parsing the full UA string:

Mozilla/5.0 (X11; Linux; rv:75.0) Gecko/20200101 Firefox/75.0

This works for both, as it is Linux and omits 'armv7l'. This also works perfectly:

Mozilla/5.0 (Desktop; Linux; rv:75.0) Gecko/20200101 Firefox/75.0

For users this should probably be (temporarily) fixed by patching the UA string but the biggest issue IMHO is the documentation isn't clear on how to distinguish between different versions of FF:

  • Mobile or Tablet is used in place of "Linux x86 arch to indicate different form factors.

  • No consideration for new desktop platforms like AArch32 or AArch64. This is mostly the case for Android and I don't think is useful.

  • Desktop is not mentioned but X11 is used. This could be changed so:

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

Becomes

  • Mozilla/5.0 (Linux; Desktop; rv:10.0) Gecko/20100101 Firefox/10.0

Older Maemo platform would be:

  • Mozilla/5.0 (Linux; Maemo; rv:10.0) Gecko/20100101 Firefox/10.0 Fennec/10.0

Firefox for Fire TV is stranger, since it has no mention on the form factor but is a confusing (Linux; Android v.x.y) format:

  • Mozilla/5.0 (Linux; Android 7.1.2) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/3.0 Chrome/59.0.3017.125 Safari/537.36

Which would be more uniform as:

  • Mozilla/5.0 (Android x.y.z; TV;) ... # This is similar the format used for Firefox OS, which I think is much preferred.

With documentation revised, then these entities can be asked to fix and much simplify the regex that matches platforms.

Please don't close the bug so other people can find it and 'hack' it while it is still broken.

Any updates on this t28427 ?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(t28427)

Needs Triage.

Flags: needinfo?(raul.bucata)
Flags: needinfo?(oana.arbuzov)
Attached image BrokenAmazon.png

Using Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0) Gecko/20100101 Firefox/10.0 Fennec/10.0 UA I was able to reproduce the issue on https://www.amazon.com/

Flags: needinfo?(raul.bucata)
Flags: needinfo?(oana.arbuzov)

Are there any updates t28427 on the issue with the latest version?

My ARMv7 laptop is currently in need of repair, so I don't know what is exported as user agent.

Testing w/ altered user agent still shows the same problem but I don't know if there have been changes to FF that would alter the default UA string.

Flags: needinfo?(t28427)

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --

Hi,

I tested and this bug is still the same on both Google and Amazon. Only changing the user agent makes them serve desktop versions of the sites.

Reporter, is the issue still reproducible?

Flags: needinfo?(t28427)

Hi,

Sorry, still the same. I have tried to do as accurate bug report as I could and even proposed solutions on comment #5.

This hasn't been fixed in any way, so why is this still being flagged as needinfo? Unless there are changes, this will persist. IMHO it makes no sense to have the CPU arch listed and having X11 instead of just "Desktop".

Best regards

Flags: needinfo?(t28427)
Assignee: nobody → dschubert
Status: NEW → ASSIGNED

ni? myself to figure out the right Bugzilla bug where we froze the platform.

Flags: needinfo?(dschubert)

Ah yes, bug 1861847 it is. I'll close this.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago10 months ago
Depends on: 1861847
Flags: needinfo?(dschubert)
Resolution: --- → FIXED

This is not related to 1861847!

The new documentation seems to be reasonable on how to distinguish the user agent for mobile and desktop ARM browsers.
Still, there is mention that Linux Desktop is "X11, Linux arch", there is no indication of "Desktop" form factor like for Android browsers.

I think this should be fixed, it doesn't matter if it is X11, Wayland or Windows. It should be "Desktop" form factor, which would also not help fingerprinting:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

Should become:

Mozilla/5.0 (Windows NT 10.0; Desktop ?arch?; rv:125.0) Gecko/20100101 Firefox/125.0

Linux desktop would instead be:

Mozilla/5.0 (Linux; Desktop ?arch?; rv:125.0) Gecko/20100101 Firefox/125.0

This is consistent to what is shown for Android. I wouldn't want the arch or OS versions for fingerprinting reasons. There are modern ways to know what fonts you can expect AFAIK.
Arch seems completely useless and a massive fingerprint for users that are on experimental architectures/platforms.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

I will say that if you are deprecating UA String, this doesn't matter anymore. From what I can see, the previous comment is valid but now relates to sending the proper client hints about form factor.

Your initial issue statet hat the armv7 architecture string is what breaks Amazon. The bug I closed this against changed Firefox behavior so that regardless of which architecture you're running on, the architecture in the UA string is always x86_64. Hence the original issue is no longer the issue - armv7 in the UA string can't break Amazon because armv7 is no longer in the UA string. If you have a different issue, then please report a different issue, and don't just reopen this one.

there is no indication of "Desktop" form factor like for Android browsers.

No user agent on no platform in no browser includes "Desktop" on desktops. We also can't just add it, because any change to the UA string breaks half of the internet, and we're not gonna do that.

Status: REOPENED → RESOLVED
Closed: 10 months ago10 months ago
Resolution: --- → FIXED

Look, I was requesting for comment because as in comment #5, this was way beyond architecture breaking sites. They read the docs and there is a mess on Linux platforms.

The UA string of Firefox itself is broken down into four components:

Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion

Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today.
platform describes the native platform the browser is running on (e.g. Windows, Mac, Linux or Android), and whether or not it's a mobile phone. Firefox OS phones say "Mobile"; the web is the platform. Note that platform can consist of multiple "; "-separated tokens. See below for further details and examples.

But Linux is "Mozilla/5.0 (X11; Linux x86_64; rv:10.0)". So platform here is "window manager".

On Fire TV it is: "Mozilla/5.0 (Linux; Android 7.1.2)", so extremely inconsistent. Per UA itself, one doesn't know if this is a phone or a desktop.

No, "Desktop" does not break sites. As per #5, I've used "Mozilla/5.0 (Desktop; Linux; rv:75.0)" to get the correct versions served to me.

So, my question is, I can open a bug if this is to be fixed and if it can be looked into. Thanks.

(In reply to t28427 from comment #20)

Look, I was requesting for comment because as in comment #5, this was way beyond architecture breaking sites. They read the docs and there is a mess on Linux platforms.

That comment was written way before we froze the architecture, so the extra context was missed. Ultimately, though, that's the reason why I and all other Mozilla staff push hard for one bug per topic. Everything else becomes a mess here.

(In reply to t28427 from comment #20)

No, "Desktop" does not break sites.

Please excuse the snark, but: you saying this just shows that you haven't worked in Web Compatibility. :)

I agree with you in saying that the UA string is a mess. In an ideal world, it would look way different (or it might not even exist). The problem with the UA string, however, is that literally every single time we make even a tiny change to it, sites break. And it really doesn't matter how small the change is. When the Firefox version number rolled from 99 to 100, it broke sites because webdevs used broken RegExps that only ever expected two numbers. A recent change to the Android UA string to include the Linux identifier as well (see bug 1860417) to fix a known issue ended up breaking Google (see bug 1895513).

Replacing X11 with Desktop might look easy, and it might work for the sites you tested it on, but no change to the UA string is ever "easy", without risk, or without breakage. Web Developers use the UA string in very unexpected ways all the time, and I am 100% confident there are multiple sites that use the X11 identifier as a criteria for Linux Desktop, and I'm 100% confident that things will break if we change that.

(In reply to t28427 from comment #20)

So, my question is, I can open a bug if this is to be fixed and if it can be looked into. Thanks.

Amazon.com works fine on a Linux desktop with the current Linux UA string, and you haven't provided any other examples of broken sites with the current UA, so at least as far as this bug is concerned, I consider that there's nothing to be fixed.

If you have a case where the current Linux User Agent string is breaking a site, you can report that as a broken site into the Web Compatibility :: Site Reports Bugzilla component. We'll look into that and find a way to resolve the issue - usually that is by shipping a UA override to specifically that broken site, because that allows us to limit the scope of breakage. But if we notice enough breakage, we consider a global UA change.

If you want to propose that we globally replace X11 with Desktop, the Core :: Networking: HTTP Bugzilla component would be the right place to make that proposal. You are always free to make such a proposal, but make sure to include good motivations for this change. "It would make more sense" is not a good reason alone, because as I've outlined, this has the chance of breakage. If you want to argue for making it easier for developers to detect desktop devices, maybe (Desktop; X11; Linux x86_64; rv:125.0) would be another possible proposal - that would still match existing X11 checks, but also include Desktop. However, that change also has the risk of breakage, of course.

It could be worth a discussion either way if you feel strongly about this, but I will be honest and just warn you that we might not be super likely to consider a change to the UA string unless we know about existing breakage with the current UA string that might get fixed with a different UA string.

Whiteboard: [webcompat:sightline]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: