You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that when I register a Firestore event listener in the background script, not only does it prevent the background script from being terminated, but on all browsers, including Firefox MV3, whenever I make a change in the Firestore database, the attached event listener will fire instantly
It's worth exploring how the Firebase team managed to do this and apply the same technique to make a dev server for Firefox
I believe that this is the function
Not sure how this would help with the last TODO of #230 though... Is this about adding support to dev mode for Firefox MV3? If so, how would this help us?
The problem is that localhost is blocked by the CSP in Firefox.
I'm not sure of the mechanics that the Firebase SDK uses to connect between the client and the server, but the team worked it out such that as soon as as soon as a ping is sent from the server, the client can respond
If a similar mechanism could be implemented in WXT, it can enable restarting parts of the extension similar to how you made WXT do it in Chrome MV3
Activity
aklinker1 commentedon Nov 13, 2024
They use a websocket. Websockets are known to keep the background service worker alive. But there are other ways as well, like what WXT does for development: https://github.com/wxt-dev/wxt/blob/main/packages%2Fwxt%2Fsrc%2Fvirtual%2Futils%2Fkeep-service-worker-alive.ts
Not sure how this would help with the last TODO of #230 though... Is this about adding support to dev mode for Firefox MV3? If so, how would this help us?
The problem is that localhost is blocked by the CSP in Firefox.
avi12 commentedon Nov 13, 2024
I'm not sure of the mechanics that the Firebase SDK uses to connect between the client and the server, but the team worked it out such that as soon as as soon as a ping is sent from the server, the client can respond
If a similar mechanism could be implemented in WXT, it can enable restarting parts of the extension similar to how you made WXT do it in Chrome MV3
aklinker1 commentedon Apr 28, 2025
The problem isn't the web socket, WXT uses a web socket too. The problem is that WXT's websocket is on localhost, which Firefox blocks the extension from connecting to. Hence https://bugzilla.mozilla.org/show_bug.cgi?id=1864284
Gonna create a separate issue to track this, someone else just opened a Firefox MV3 bug.