Closed Bug 1806675 Opened 1 year ago Closed 1 year ago

Freeze `rv:` segment in the User Agent string to `rv:109.0` on android too, to avoid erroneous IE11 detection

Categories

(GeckoView :: Core, defect, P1)

Firefox 110
Unspecified
Android

Tracking

(firefox108 unaffected, firefox109 unaffected, firefox110+ fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox108 --- unaffected
firefox109 --- unaffected
firefox110 + fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

()

Details

(Whiteboard: [geckoview:m110])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1805967 +++

See bug 1805967. At least https://github.com/webcompat/web-bugs/issues/115403 is also reproducible on mobile. However, changing the rv bit of the UA string on mobile caused test failures. So in bug 1805967 we restricted to desktop for now because it's the primary source of issues. In this bug we'd like to evaluate extending the fix to mobile, too.

The test failure is based around the getDefaultUserAgent API returning a build-time configured string. It's not really clear to me (as someone not super familiar with mobile) whether the right fix is:

  • changing the test to string-replace to get the "right" default value from that API
  • changing the test in some way to pre-define the pref so that the default returned by gecko matches the expectation from the API
  • changing the geckoview API to reflect the forced 'rv' value rather than just the hardcoded string
  • something else

I'd like feedback from mobile folks as to how to proceed.

Component: Mobile → Core
Product: Web Compatibility → GeckoView

Chris, do you know who's around atm or is first back on January who could help decide on which option described in comment 0 should be pursued for mobile?

Flags: needinfo?(cpeterson)
No longer blocks: 1805407

[Tracking Requested - why for this release]:

We should track this bug for Fenix and Focus 110 because websites are mistaking Firefox 111 for IE11.

(In reply to :Gijs (he/him) from comment #1)

Chris, do you know who's around atm or is first back on January who could help decide on which option described in comment 0 should be pursued for mobile?

I'll find an Android engineer to help.

I don't know why GeckoView hard codes the UA string at compile time instead of asking Gecko for the UA string at run time.

Severity: -- → S2
Flags: needinfo?(cpeterson)
Priority: -- → P1
Whiteboard: [geckoview:m110]

Christian recommends that we fix the GeckoView API for consistency instead of changing the test. To fix the API, you just need to hard code rv:109 in the USER_AGENT_GECKOVIEW_MOBILE strings in the BuildConfig settings here:

https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/mobile/android/geckoview/build.gradle#55-56

The hardcoded UA string was added in bug 1512997.

Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1512997

(In reply to Chris Peterson [:cpeterson] from comment #3)

Christian recommends that we fix the GeckoView API for consistency instead of changing the test. To fix the API, you just need to hard code rv:109 in the USER_AGENT_GECKOVIEW_MOBILE strings in the BuildConfig settings here:

https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/mobile/android/geckoview/build.gradle#55-56

The hardcoded UA string was added in bug 1512997.

OK. I'll put up a patch in a sec. However, I'll note that I made the forced 'rv' bit a pref so we could, if we found show-stopping issues, overwrite the pref with a normandy rollout or similar (on desktop). I guess that wouldn't help Android anyway (normandy is built on remote settings which AIUI we don't support on fenix/geckoview?), but it's worth noting that if something messes with that pref the hardcoded buildconfig setting and the gecko UA string could still get out of sync.

Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/281afe47e2e4
fixate rv portion of UA string to 109.0 on android, too, r=csadilek,geckoview-reviewers,amejiamarmol,m_kato
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Depends on: 1806690
See Also: → 1818889
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: