Closed Bug 1420145 Opened 7 years ago Closed 6 years ago

Web Extensions can be stuck in a broken state, not working even after disabling and re-enabling

Categories

(WebExtensions :: General, defect, P3)

57 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1464938

People

(Reporter: ecfbugzilla, Unassigned)

References

Details

We've had a number of people complain about Adblock Plus being completely broken for them, something that we were unable to reproduce ourselves until now. I somehow got into this very state with my own browser however (Firefox 57 on Ubuntu) and could debug. Adblock Plus was completely gone, disabling and re-enabling it wouldn't do anything (still worked fine for other extensions). The only relevant error message appeared to be this one from ExtensionParent.jsm:

> No WebExtension found with ID {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}

Adblock Plus was indeed missing from GlobalManager data structures. Further debugging only revealed that Adblock Plus couldn't start up because there was a pending shutdown promise for it.

I went through all the code paths that would end up with an incomplete startup before GlobalManager.init() call or an incomplete shutdown after GlobalManager.uninit() call, and my conclusion is that the only realistic culprit is a hanging Extension.broadcast("Extension:Shutdown") call - one of the content processes didn't reply to the message for some reason. I then killed the content processes and this indeed unstuck everything, Adblock Plus could start up successfully again.

I don't have a way to reproduce this bug but at least this should indicate where the issue might be.
Quite frankly, I don't see why waiting for response is even necessary here, given that the message is processed synchronously. The only case where waiting makes a difference is when one of the recipients errors out and doesn't respond - and this scenario isn't currently being handled in a meaningful way.
Component: WebExtensions: Untriaged → Add-ons Manager
Component: Add-ons Manager → WebExtensions: General
Flags: needinfo?(aswan)
Priority: -- → P3
Product: Toolkit → WebExtensions
The hang described in comment 0 (very delayed thank you to Wladimir for investingating it) was addressed in bug 1464938.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(aswan)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.