Port_Authority
Port_Authority copied to clipboard
[BUG] Crashes Firefox. IndexedDB corruption?
I believe I'm experiencing the same issue as these reports: https://github.com/ACK-J/Port_Authority/issues/18, https://github.com/ACK-J/Port_Authority/issues/19, https://github.com/ACK-J/Port_Authority/issues/20 but I've been able to partially reproduce the issue.
In the user profile folder, there are two files in the IndexedDB storage that cause a crash when they are present in the directory %USERPROFILE%\AppData\Roaming\Mozilla\Firefox\Profiles\l7oajxa5.nightly\storage\default\moz-extension+++0e9f146b-ad34-4208-bd97-b2042b1fa6d4^userContextId=4294967295\idb\3647222921wleabcEoxlt-eengsairo.files The files are named "14 and "15" which contain binary data that seems like Snappy compressed JSON containing the strings "blocked ports" and "blocked hosts" respectively. When these files are transferred between profiles, they consistently cause Firefox to crash. When deleted, the issue is fixed. I've uploaded these two files for debugging purposes: corrupt data.zip
I don't know how these files got there or how they became corrupted, but it may indicate an issue with Firefox itself rather than the add-on. From some brief digging, this directory should not be accessible to extensions at all, and WebExtensions should not be able to crash Firefox anyways.
Tested on Firefox 99.0 and 101 nightly. PortAuthority version 1.1.1
Yea I have not been able to find the root of this bug for some time. Thank you for doing some extra digging, I will look into it when I get a chance!
I came across this bug earlier today it was rather annoying trying to find out what was the cause of the crashing. (Didn't know safe-mode was a thing before today, figuring out what was going on before finding it out was a hassle)
Don't have any new information besides that after deleting those files firefox stopped crashing when Port Authority was enabled.
@Arzte I know, this has been an annoying bug for everyone (including me) for a while. I believe I know a potential solution to the problem. I will have free time in the next week to update the extension. I'm sorry about the delay on this
@ACK-J If you are somehow able to reproduce this bug, may I highly suggest reporting it to Mozilla as well? IndexedDB corruption and WebExtensions being able to crash the browser may be signs of much more sinister issues in Firefox itself.
Meanwhile for anyone else having issues, as a workaround, try going into Firefox safe mode to uninstall and re-install the add-on, which should clear extension data.
Good to see there's progress on this. I just ran into this bug a second time and deleting the numbered files fixed it. The first time was on Firefox 88.0.1 on Ubuntu 16.04, this time Firefox 105.0 (64-Bit), Ubuntu 20.04.
I have pushed a new version of PortAuthority that I believe will fix this issue. @nevubm @HifeFish @Arzte If you experience firefox still crashing please report it here!
It's been a while without any more reports of crashes. I believe this has been fixed but feel free to reopen if it occurs again.
I've submitted a Bugzilla issue as there still seems to be users who are experiencing this crash https://github.com/ACK-J/Port_Authority/issues/31
https://bugzilla.mozilla.org/show_bug.cgi?id=1854000
There's an update on the bugzilla that might be worth looking at. https://bugzilla.mozilla.org/show_bug.cgi?id=1854000#c3
(Apologies for not replying, but I've so far not had any further crashes since deleting those files)