[snap] Adapt chromium user agent to avoid "not supported browser"

Bug #1868117 reported by Michel-Ekimia on 2020-03-19
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Medium
Olivier Tilloy

Bug Description

Currently some websites like netflix.com and web.whatsapp.com does not recognize chromium Ubuntu as chrome because of the different user agent.

We need to find a way like vivaldi to avoid such problems for casual users.

Current snap chromium UA :

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/80.0.3987.132 Chrome/80.0.3987.132 Safari/537.36

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Olivier Tilloy (osomon) wrote :

I know this isn't an out-of-the-box solution for regular users, but I'll mention it for the sake of completeness: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg works well for netflix.com.

Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
Olivier Tilloy (osomon) on 2020-04-27
tags: added: snap
summary: - Adapt chromium user agent to avoid "not supported browser"
+ [snap] Adapt chromium user agent to avoid "not supported browser"

Agreed, it works for Netflix, but it does not work for Teams and some other sites. There, one has to go to the Developer tools > More tools > Network conditions and change the UA there.

Merely removing "snap Chromium/<version>" fixes the issue.

I guess that the UA switcher extension doesn't change the UA in JavaScript or something like that.

Pretty much every incompatibility-related issue is solved by spoofing the user agent and removing the "snap Chromium/<version>" part, simply claiming to be normal Chrome. There is not really any point in differentiating between Chromium and Chrome, but it breaks many websites, and it's also a nasty feature for browser fingerprinting.

Identifying as Chromium will only annoy users and have them install the proprietary Chrome browser instead, so "Netflix works" and "they can join their meeting".

In order to work around such issues, Vivaldi has already decided to just use Chrome's user agent, because otherwise things broke for no obvious reasons:

https://vivaldi.com/blog/user-agent-changes/

Moreover, Google has decided to semi-deprecate user agents altogether in upcoming Chrome releases:

https://www.zdnet.com/article/google-to-phase-out-user-agent-strings-in-chrome/
https://9to5google.com/2020/01/14/google-deprecate-chrome-user-agent-string-privacy/

So with these upcoming changes in Chrome, can Chromium in Ubuntu please follow suit, and no longer differentiate from whatever string Google will use for Chrome?

Justin (vissenvijver) on 2020-05-08
Changed in chromium-browser (Ubuntu):
status: Confirmed → In Progress
status: In Progress → Confirmed
Changed in chromium-browser (Ubuntu):
status: Confirmed → Triaged
Justin (vissenvijver) wrote :

Agree. This Chromium snap package is installed, even when users install chromium-browser from the Ubuntu repositories. Please allow users to stick to the default open source Ubuntu repositories; don't steer them away to the proprietary Chrome browser.

Severe usability problems with popular websites caused by a custom user agent will result in the opposite.

Michel-Ekimia (michel.ekimia) wrote :

You are offtopic here , the same problems happens in 18.04 with the repo version of chromium.

it is just that we try to focus on snap, but we shall backport this use agent patch on repo version

I think everyone agrees that the 'Chromium/<version>' part is the main problem. The snap also adds 'snap', which is an additional problem, but only removing 'snap' wouldn't help.

The deb version adds 'Ubuntu' in the OS part, which the snap does not. I'm unsure if that is much of a problem. Firefox on Ubuntu also adds 'Ubuntu' after 'X11', and that doesn't seem to break many things.

Olivier Tilloy (osomon) on 2020-05-26
Changed in chromium-browser (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Olivier Tilloy (osomon)

Will this be in the next stable channel snap update?

Olivier Tilloy (osomon) wrote :

Once chromium 84 becomes stable, in ~ 6 weeks time.

Olivier Tilloy (osomon) wrote :

Chromium 84.0.4147.89 is now in the stable channel (amd64 for now, other architectures are still building).

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers