userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Constantly have to disable and re-enable user scripts

Open theesfeld opened this issue 2 years ago • 6 comments

almost every time I load safari, my scripts don't run. I have to go to settings - extensions - and uncheck and recheck the user scripts extension, then reload the page and everything works.

theesfeld avatar Jan 16 '24 17:01 theesfeld

Not surprising this happens in Safari...(Too many peculiar "idiosyncrasies"

I'm sorry, but I really don't know what's going on, so I can't help.

The one suggestion would be to refer to #409 see if there are any logs when the problem occurs, even if it's not an error message.

ACTCD avatar Jan 17 '24 00:01 ACTCD

If you are unable to add more valid information, we will close the issue in a few days as it cannot be reproduced and investigated.

ACTCD avatar Jan 29 '24 09:01 ACTCD

I am running into the exact same issue; disabling and re-enabling the extension seems to fix it.

One potential clue I noticed is that, when this is happening, the toolbar count and the extension popover will disagree. So for example, clicking the toolbar icon will show that a script has matched:

Screenshot 2024-02-01 at 4 05 28 PM

but the toolbar icon itself will not show any matches:

Screenshot 2024-02-01 at 4 06 53 PM

Adding alerts to my Userscripts confirms that they're just not getting run at all even though the extension seems to know there is a match. Upon toggling the extension on and off, the toolbar icon again shows the match count:

Screenshot 2024-02-01 at 4 08 58 PM

And the script runs as normal.

Will try to see if there's anything interesting in the logs next time it happens.

acoffman avatar Feb 01 '24 22:02 acoffman

Could you describe which extension and Safari versions you use?

When the issue occurs, try checking the background page in "Develop" menu. Does it have an unload flag? Just like background page (unloaded).

Try installing the latest beta version to see if you can reproduce the same issue.

ACTCD avatar Feb 02 '24 03:02 ACTCD

Safari Version 17.3 (19617.2.4.11.8) Userscripts Version 4.4.5 from the App Store.

I haven't figured out a deterministic way to make the issue occur but next time it does I'll make sure to take a look at the background page and see.

I'll go ahead and try out the beta version as well, thanks!

acoffman avatar Feb 02 '24 15:02 acoffman