hackademix / noscript

The popular NoScript Security Suite browser extension.
https://noscript.net/
GNU General Public License v3.0
848 stars 90 forks source link

Randomly causes Firefox to stop loading web pages #269

Open eyedELhands opened 1 year ago

eyedELhands commented 1 year ago

This has already been reported on the forums here: https://forums.informaction.com/viewtopic.php?f=7&t=26494

I've been having the same problem for months now. Which means I've updated Firefox I-don't-know-how-many-times while I've been having this issue. Only way to fix it is to either disable NoScript or restart Firefox. Even disabling then re-enabling NoScript fails to solve it, as once NoScript is enabled again, it stops web pages from loading again. Is there anyway to flush and refresh NoScript so that it restarts "clean"?

hackademix commented 1 year ago

Is there anyway to flush and refresh NoScript so that it restarts "clean"?

Of course: NoScript Options>Reset.

eyedELhands commented 1 year ago

I meant without erasing all my preferences and site permissions. I guess the "clean" was misleading...I meant is there a way to restart NoScript as if I had just restarted Firefox so that when this bug stops Firefox from working, I just have to restart NoScript and not Firefox. And judging by your response, the answer to that is no.

hackademix commented 1 year ago

I meant is there a way to restart NoScript

Yes, disabling and re-enabling an add-on is functionally equivalent to a "restart", and it seems it didn't work for you.

If we did not try this yet, I'd suggest to do a NoScript Options>Export and send me the file (which you can use also to restore your settings later, should you want to try my first reset suggestion).

eyedELhands commented 1 year ago

Tried exporting > resetting > importing and no, it didn't work. Also tried resetting without importing, that didn't work either. Also disabling globally failed to fix this.

Here are the 2 debugs.

The one labeled DEBUG - WHILE FROZEN is from when it wasn't working and I reset and did not import my old settings, so NoScript was reset entirely to default.

The one labeled DEBUG - WORKING AGAIN is from after I restarted Firefox, again without importing old settings, so NoScript was still reset to default.

For both debugs, I used google.com to test NoScript, since that's one of the sites whitelisted by default, and it only worked after Firefox was restarted.

DEBUG - WORKING AGAIN.txt DEBUG - WHILE FROZEN.txt

Rhialto commented 1 year ago

I seem to have this problem too.

It started some months ago, and it got more and more frequent. Recently, Firefox would break (as in "web pages stop loading, even cached ones, but special URIs like resource://gre/modules/ExtensionChild.jsm keep working") within a minute. This makes Firefox totally unusable, unfortunately.

jospezial commented 1 year ago

Me too. Since some months. Firefox-bin nightly now at 109, linux x86-64, Xserver. When the freeze happens then new opened tabs are not visible on the tab bar. I can switch between them with ctrl+tab and see that it switches in window title bar and task bar. If I click "about firefox" in help menu suddenly the content of the website is shown as it should but content not click- or scrollable. The "about firefox" window then sometimes does not show the fox logo.

While writing this comment I had the same freeze of view even with disabled noscript extension. I was able to blindly use ctrl+a and ctrl+c to copy this. Maybe ublock or another extension suffers from the same bug. Or it is really a bug of firefox. But with disabled noscript extension it now took longer to get the freeze. Nothing special shown debugging firefox with gdb. Will try with all extension disabled but that will be non fun.

jospezial commented 1 year ago

The firefox chronic window also works strange then.

Now I had that freeze with all extensions disabled.

phaolo2 commented 1 year ago

Oh, I have the exact same issue since months too! Firefox v107, but also many versions before, since it took me a while to identify the culprit (at first it looked like internet or browser issues). I'm still on Windows 7, by the way.

Disabling Noscript resumes the tab loading, but of course it's not a good solution. Only restarting the browser works, but it takes a while for Firefox to close when it's in this status. I'm not sure which conditions cause it exactly, tho.

hackademix commented 1 year ago

I think I've managed to see (but not to reproduce) this issue a couple of time now, and I've observed that when it happens the background process of any extension is simply gone. This affects all the extensions, but some in more visible ways than others. For instance, if both NoScript and uBlock have their popup menu completely empty and unoperable. Even built-in extensions, like the screenshots button, stop working.

This is particularly evident for NoScript users because NoScript, for security reasons, falls back to blocking as much as possible when something gets broken (in this case, cannot retrieve its global settings because the background process is gone).

I'm trying to implement a work-around (trying to restart NoScript as soon as you click its toolbar icon if the background process cannot be reached), but also to open a bug in Mozilla's tracker because this breaks all the webextensions.

hackademix commented 1 year ago

Please check NoScript 11.4.14rc1, thanks.

jospezial commented 1 year ago

I did not have that issue since Firefox-bin nightly linux x86-64 from about a week ago. Maybe mozilla fixed it.

Rhialto commented 1 year ago

This is good news, even if you haven't solved the problem. A bug report where the issue cannot be seen by the author is soooo frustrating for both parties. We're no longer in that state, hooray!

jtotht commented 1 year ago

Couldn’t migrating to event pages be a less hackish solution? It doesn’t work in ESR or in the Tor browser yet (or in outdated Firefoxes), but AFAIK this simply means that these older Firefox versions will emit a warning and keep the background page persistent, just like if it wasn’t marked non-persistent.

mrx23dot commented 1 year ago

I have similar issue, after a while Noscript decides to go crazy and blocks every domain, tabs just keep on loading forever. I disable Noscript everything works great. Then I restart firefox and noscript works again.

How to debug this? Is there a log? Browser restart seems to do something that addon enable switch is not. (maybe heap overflow?) using v11.4.16

Same issue happen 2nd day too, after reboot it worked for a while. Disabling noscript solved it again.

mrx23dot commented 1 year ago

I still have this problem on Firefox/110.0 and I'm able to reliably reproduce it, current logging level doesn't say much.

I don't remember other addons stopped working. Also why would disabling noscript start background process again if it's a browser bug. Could we add a heartbeat log message like every 5secs if addon is active? Or a one shot timer that complains if background process is gone. I still saw noscript's garbage collection message on console, I don't think that would show up without without bg process.

Blocking by default is a good thing.

Update:

phaolo2 commented 1 year ago

Uh oh, the issue is back in full force since the latest updates. Tab loading freezes again and I have to restart the browser. Please check this again :(

clsid2 commented 1 year ago

When this happens to me, one of the Firefox processes is hanging. So when restarting Firefox, it complains it is already running, allowing me to terminate the previous instance.

Zapeth commented 1 year ago

I've also been hit by this issue a few times over the past months, nothing really reproducible though (Firefox ESR 102.x).

I think I've managed to see (but not to reproduce) this issue a couple of time now, and I've observed that when it happens the background process of any extension is simply gone. This affects all the extensions, but some in more visible ways than others. For instance, if both NoScript and uBlock have their popup menu completely empty and unoperable. Even built-in extensions, like the screenshots button, stop working.

I'm not sure this is the same issue, whenever it happened for me all my other extensions still worked as expected.

Considering this issue seems to be difficult to reproduce and the logs haven't been helpful so far for figuring out the root cause, I would suggest adding some additional debug messages in the next version (or a test release) to better trace whats going wrong.

advcomp2019 commented 3 months ago

I am getting this same issue after leaving Firefox open for about a week. I have tried everything to try to fix it.

When I disable NoScript and enable it again, it works just fine for a short time. Only restarting correct it for another week or so.