Closed Bug 1809221 Opened 2 years ago Closed 2 years ago

Desktop website due to "Tablet" string in the user agent

Categories

(GeckoView :: General, defect, P1)

All
Android
defect

Tracking

(firefox108 unaffected, firefox109+ verified, firefox110+ verified)

VERIFIED FIXED
110 Branch
Tracking Status
firefox108 --- unaffected
firefox109 + verified
firefox110 + verified

People

(Reporter: cpeterson, Assigned: m_kato)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [geckoview:m110])

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/28258.

Steps to reproduce

Visit any webpage in the browser

Expected behaviour

USER-AGENT: Mozilla/5.0 (Android 13, Mobile; rv:110.0_)Gecko/110.0 Firefox/110.0

Actual behaviour

USER-AGENT: Mozilla/5.0 (Android 13, Tablet; rv:110.0_)Gecko/110.0 Firefox/110.0

Device name

Google Pixle 6

Android version

Android 13

Firefox release type

Firefox Nightly

Firefox version

110

Device logs

No response

Additional information

I do not know where to turn for this issue.

Ive been using Firefox Nightly on my Pixel-phones for a year or two now. A couple months ago, Firefox Nightly did an update, and a lot of web pages I visit have been returning strange on my phone. Either the text is way too small, almost like Desktop mode is enabled, or graphs and texted are skewed.

I have tried disabling my apps, which there are only 3: Dark Reader, Bitwarden, uBlock Origin. But it does not solve the issue.

Last night I started to research browser request data and a few websites returned some output on my Pixel 6 phone

USER-AGENT: Mozilla/5.0 (Android 13, Tablet; rv:110.0_)Gecko/110.0 Firefox/110.0

My work phone, a Samsung S21FE, Returns the following on Nightly

USER-AGENT: Mozilla/5.0 (Android 13, Mobile; rv:110.0_)Gecko/110.0 Firefox/110.0

When I switch my Firefox Nightly to Desktop Mode on this webpage, the USER-AGENT returns as

Mozilla/5.0 (x11: Linux x86_64; rv:110.0) Gecko/20100101 Firefox/110.0

Switching back to mobile mode thinks the phone is a tablet.

When I open normal Firefox or Firefox Focus, my user-agent returns as USER-AGENT: Mozilla/5.0 (Android 13, Mobile; rv:108.0_)Gecko/110.0 Firefox/108.0

So everything is fine, but Firefox Nightly thinks my phone is a Tablet... WHY!!!

I have tried looking online from Mozilla white-papers and resetting the user-agent in the browser does not work, nor does it apply to phone browsers. I cant find anything about this online.

Hoping someone here can really help me out. Thank you

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

Makoto, I think this bug might be a regression from your GeckoAppShell.isTablet change in bug 1798617. We never want to send the "Tablet" UA string, even on Android tablets.

But in this particular case, the user sees a "Tablet" UA string on their Google Pixel 6 phone, not a tablet.

Assignee: nobody → m_kato
Severity: -- → S3
Flags: needinfo?(m_kato)
Keywords: regression
Priority: -- → P1
Regressed by: 1798617
Whiteboard: [geckoview:m110]

QA is not able to reproduce this "Tablet" UA on a Google Pixel 6 phone. I asked the bug reporter (on GitHub) to share their about:support info.

Until fixing bug 1798617, tablet detection was always broken.

We returns Tablet UA if tablet device runs on Fennec., but GeckoView doens't
want tablet UA even if tablet device.

So I will remove Tablet UA code on GeckoView.

Also, I keep old code for tablet for other forks such as KaiOS.

Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a598c778b190 Don't use Tablet UA even if Tablet device. r=geckoview-reviewers,necko-reviewers,owlish
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

Comment on attachment 9311498 [details]
Bug 1809221 - Don't use Tablet UA even if Tablet device. r=#geckoview-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: When using Android tablet, UA string has Tablet string and no Mobile string.

When Fennec, it is correct. But GeckoView doesn't want Tablet string.

  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Set up Fenix on Android tablet.
  1. Access https://www.whatsmyua.info/

User agent string has no Tablet string. (Mozilla/5.0 (Androrid <version>; Mobile; rv:109.0) Gecko/110.0 Firefox/110)

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is regression by bug 1798617. This fix is back to version 109 behavior.
  • String changes made/needed: No
  • Is Android affected?: Yes
Flags: needinfo?(m_kato)
Attachment #9311498 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Verified on the latest Nightly 110.0a1 (2023-01-12) and on the latest RC 109.1.0 builds.
Devices used:

  • Google Pixel 4 (Android 13) - As the closest to the one this issue was reported with.
  • Oppo Find X5 (Android 12)
  • Samsung Galaxy Tab S3 (Android 9) - Tablet, where the change can be easily seen as it appears as Tablet on older versions, and as Mobile on the latest Nightly.

Marking the ticket as verified.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Comment on attachment 9311498 [details]
Bug 1809221 - Don't use Tablet UA even if Tablet device. r=#geckoview-reviewers

The original reporter has also verified that today's Nightly is working for them. Approved for 109.0rc2.

Attachment #9311498 - Flags: approval-mozilla-beta? → approval-mozilla-release+

Verified as fixed on the latest RC 109.1.1.
Device used: Samsung Galaxy Tab S3 (Android 9) - Device which appeared as Tablet on 109.1.0, it appears as Mobile on 109.1.1.
Marking as verified on 109.

Duplicate of this bug: 1807209

Re-verified on the latest Beta 110.0b1.
Device used: Samsung Galaxy Tab S3 (Android 9).

See Also: → 1555035
Component: Core → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: