ray-lothian / UserAgent-Switcher

A User-Agent spoofer browser extension that is highly configurable
https://webextension.org/listing/useragent-switcher.html
Mozilla Public License 2.0
923 stars 143 forks source link

When i restart the browser the extension reset. #90

Closed seoexpert58 closed 3 years ago

seoexpert58 commented 4 years ago

Hi.

First great extension :) I use this extension for 1 year and is great but after the last update i notice that something is not ok.

When i restart the browser the extension is reset and is not active i will setup the extension and click Apply (all windows) but when i close the browser and open it again the extension is again reset and is not working. I use this extension of Mozilla Firefox 55.0 version 64 bit

Please can you check what is the problem.

Thank you

Freeedim commented 4 years ago

Hi there!

I agree this is a great add-on, which I have been using a lot to access Skype and Zoom calls from Firefox (always the up-to-date version).

Recently, maybe because of a Firefox update, this add-on won't keep my settings at all. Just closing UserAgent-Switcher pop-up clears the selection, as confirmed by re-opening the pop-up and, by the fact that it does not work as intended on websites and by using the "Test UA" feature.

Cheers

michael-j-oconnor commented 4 years ago

I'm seeing the same issue with Waterfox Classic. There should be option to keep it always enabled, if that's not the intended default already. Some sites cookie the "unsupported" browser", so it's more of a pain to make work than just re-enabling UserAgent-Switcher and reloading the page.

ray-lothian commented 4 years ago

go to about:debugging#/runtime/this-firefox and press the inspect button for this add-on. run

chrome.runtime.reload()

on the console tab and see if you get an error when the extension restarts. If not share the output of

    chrome.storage.managed.get({
      ua: ''
    }, rps => {
      if (!chrome.runtime.lastError && rps.ua) {
        console.log({
          ua: rps.ua
        });
      }
      else {
        console.log(undefined, undefined, 'DCSI');
      }
    });

Have you guys activated the "Consider Containers" option? Have you tried to remove the extension and reinstall it?

Freeedim commented 4 years ago

Hi Ray,

When going to about:debugging#/runtime/this-firefox, UserAgent Switcher's panel displays the following warning: Reading manifest: Warning processing storage: An unexpected property was found in the WebExtension manifest.

After running chrome.runtime.reload() in the console, then selecting a user agent in the add-on's pop-up gives the following error message in the console:

sendRemoveListener on closed conduit {a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}.824633830624 ConduitsChild.jsm:108
    _send resource://gre/modules/ConduitsChild.jsm:108
    _send self-hosted:1039
    removeListener resource://gre/modules/ExtensionChild.jsm:644
    removeListener resource://gre/modules/ExtensionChild.jsm:867
    onChanged chrome://extensions/content/child/ext-storage.js:337
    removeListener resource://gre/modules/ExtensionCommon.jsm:2518
    revoke resource://gre/modules/ExtensionCommon.jsm:2540
    close resource://gre/modules/ExtensionCommon.jsm:2545
    unload resource://gre/modules/ExtensionCommon.jsm:910
    unload resource://gre/modules/ExtensionPageChild.jsm:261
    unload resource://gre/modules/ExtensionPageChild.jsm:298
    destroyExtensionContext resource://gre/modules/ExtensionPageChild.jsm:482
    observe resource://gre/modules/ExtensionPageChild.jsm:395

The output of the bit of code you provide (run right after the previous runtime reload) is:

undefined undefined DCSI                                                             debugger eval code:10:17
undefine

"Consider containers" or uninstalling/reinstalling change nothing.

Hope it helps a bit...

Cheers!

michael-j-oconnor commented 4 years ago

Same here. My FF is too old for about:debugging to work, but I see this when not using Containers in the slightest.

To be clear, I simply want it to default to "on" when the browser starts. There's options that control which behavior you want when it's on -- blacklist/whitelist/custom -- but seemingly no explicit option within the "Options" setting to say "enable at start". I have to click an icon to enable after restart, I'll forget, hit the damn website that actually cookies the "unsupported browser" verdict, and it's a pain.

Honestly, I think the default should be "off" at restart" unless someone like me wants otherwise. In my case, I use "custom mode" for a few irritating sites and leave 99.9% alone.