UserAgent-Switcher icon indicating copy to clipboard operation
UserAgent-Switcher copied to clipboard

Custom mode doesn't seem to work anymore

Open vrad-exe opened this issue 1 year ago • 4 comments

I use this extension's "custom" mode in Firefox to override the user agent sent to Gmail to be Chrome, since Google arbitrarily locks all other browsers out of offline sync functionality despite it being supported fine. However, as of somewhat recently this randomly stopped working, with Gmail now refusing to enable offline mode unless I open the extension and select a Chrome user agent manually. I haven't touched the extension settings at all (except changing the Chrome UA to a newer version in an attempt to fix the issue), so I have to assume this broke with an extension or browser update.

This is the specific custom json I use:

{
  "google.com": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 GLS/100.10.9939.100",
  "microsoft.com, office.com, skype.com, bing.com": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1788.0"
}

If I copy and paste the exact same Chrome UA into the extension popup and apply it manually, it works fine

vrad-exe avatar Sep 27 '24 19:09 vrad-exe

For me it seems to only work after opening the extension's settings. This needs to be done every time the browser is restarted. Some times it won't work until I click Save or until I do a ctrl+f5 on the tab with the wrong UA

Leah96xxx avatar Feb 01 '25 22:02 Leah96xxx

For me it seems to only work after opening the extension's settings. This needs to be done every time the browser is restarted. Some times it won't work until I click Save or until I do a ctrl+f5 on the tab with the wrong UA

Same, made an duplicate #240, closing that!

sofiedotcafe avatar Feb 17 '25 18:02 sofiedotcafe

Yep, I only have one specific website that I need my user agent switched on, and after following the correct syntax for inputting the website and useragent string into custom mode and saving, nothing happens. Very frustrating.

BTubbs200 avatar Feb 19 '25 19:02 BTubbs200

Yep, I only have one specific website that I need my user agent switched on, and after following the correct syntax for inputting the website and useragent string into custom mode and saving, nothing happens. Very frustrating.

Try https://github.com/ray-lothian/UserAgent-Switcher/issues/240#issue-2858537070, bit of an workaround but should work.

I have even found the UA customization option being more usable in the "try in mobile" mode in the dev-tools than this extension.

sofiedotcafe avatar Feb 24 '25 10:02 sofiedotcafe

This is still broken. Running console.log(navigator.userAgent) shows a regular firefox user agent, ignoring the custom mode settings.

vrad-exe avatar Sep 05 '25 06:09 vrad-exe

I noticed the same issue. Unfortunately, none of the workarounds mentioned seem to work for me...

hanjo avatar Nov 12 '25 13:11 hanjo

What is the color of the toolbar button when you use the above custom JSON? Do you get any error on the console? What is the extension version

ray-lothian avatar Nov 15 '25 05:11 ray-lothian

When using the provided JSON on Gmail (mail.google.com), the toolbar icon appears half orange and half blue. There are a few user agent related messages appearing in the console which all look like this just with different URLs:

[user-agent leaked] using async method https://mail.google.com/mail/u/0/#inbox

vrad-exe avatar Nov 18 '25 00:11 vrad-exe

@vrad-exe how about a Google's search page?

Gmail (and some progressive web apps) relies heavily on service workers, which cache the app shell and serve it instantly from the browser's cache. This means no initial network request is sent to the server when the page loads, making it difficult for this extension to detect or interact with the page in the usual way.

I am aware of this limitation and are working on improved support for service worker-based sites like Gmail. Better compatibility is coming soon!

ray-lothian avatar Nov 18 '25 12:11 ray-lothian