Bug 206506 - [GTK] Improve user agent quirk for Google Docs and Google Drive
Summary: [GTK] Improve user agent quirk for Google Docs and Google Drive
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-20 09:44 PST by Michael Catanzaro
Modified: 2021-02-17 07:07 PST (History)
4 users (show)

See Also:


Attachments
Patch (8.87 KB, patch)
2020-02-20 11:36 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (10.54 KB, patch)
2020-02-20 14:24 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2020-01-20 09:44:53 PST
I'm getting a warning when viewing docs.google.com with 2.27.3: "This browser is no longer supported"

The Chromium version in UserAgentQuirks.cpp is going to need to be updated (latest tagged version is 81.0.4033.1). This probably ought to be updated before every new release of WebKitGTK or it will just keep breaking again and again.
Comment 1 Carlos Garcia Campos 2020-01-21 06:28:27 PST
I can't reproduce, but I guess it's ok to bump the chromium version in the UA string in any case.
Comment 2 Michael Catanzaro 2020-01-23 14:18:42 PST
Erm, sorry, docs.google.com doesn't even use the Chromium user agent. It uses the macOS user agent. (We should still update the Chromium user agent anyway, of course.)

I'm also not sure what it doesn't like about our macOS quirk. We're sending "Version/13.0 Safari/605.1.15", "Macintosh; Intel Mac OS X 10_15"... this is already the latest Safari (plus our frozen maximum WebKit version). Maintaining the user agent quirks was always my least-favorite task....

Not sure why you can't reproduce.
Comment 3 Michael Catanzaro 2020-02-19 15:39:44 PST
(In reply to Michael Catanzaro from comment #2)
> Not sure why you can't reproduce.

I think the warning only occurs for the first document viewed after signing into your Google account. Reproducer is to click a link to a Google document while not signed into a Google account.
Comment 4 Michael Catanzaro 2020-02-19 16:18:56 PST
OK, in this case:

 * My favorite quirk, the macOS quirk, is no longer working to avoid the unsupported browser warnings, and has resulted in a bunch of complaints from users because Google Docs displays Mac-specific commands when using this quirk.
 * We can't use our fallback Chromium quirk, because Google Docs will try doing Chrome-specific things if it does.

So we need to introduce a Firefox user agent quirk, and hope for the best. It seems to work for me.
Comment 5 Michael Catanzaro 2020-02-19 17:05:59 PST
Well I have a Firefox quirk that works, but it's hard to figure out the right set of URLs to apply it to. Whatever URL is performing the actual user agent check is not one that we currently recognize as a Google domain. I'll have to keep trying here.

I remember this problem was very frustrating last time I work on this quirk.
Comment 6 Michael Catanzaro 2020-02-19 18:59:14 PST
OK, I figured it out. We have to send the fake UA to accounts.youtube.com. Because of course youtube.com is responsible for displaying unsupported browser warnings in Google Docs....
Comment 7 Michael Catanzaro 2020-02-20 11:36:36 PST
Created attachment 391313 [details]
Patch
Comment 8 Michael Catanzaro 2020-02-20 12:21:19 PST
Comment on attachment 391313 [details]
Patch

I must have done something wrong when testing Google Drive. It's still broken.
Comment 9 Michael Catanzaro 2020-02-20 14:24:07 PST
Created attachment 391334 [details]
Patch
Comment 10 WebKit Commit Bot 2020-02-20 23:44:12 PST
Comment on attachment 391334 [details]
Patch

Clearing flags on attachment: 391334

Committed r257128: <https://trac.webkit.org/changeset/257128>
Comment 11 WebKit Commit Bot 2020-02-20 23:44:14 PST
All reviewed patches have been landed.  Closing bug.