I have upgraded my extension’s manifest to v3 and have encountered major issues that will force me to downgrade back to v2 as a direct result.
My extension requires the following listener to always be active and it is not accessible at the content script context, so there is no way for me to try and work around this in v3:
browser.webRequest.onBeforeRequest
There are other permissions as well that have the same problem, but the above one is the most important one to make the extension work properly.
The biggest issue with v3 is this:
- The extension is configured to block and change web requests for website www.example.com
- All works well when a page www.example.com loads for the first time, any configured changes run in the webRequest for any scripts/html loaded in that page
- But after 30s the background script stops running
- As a result, any new requests generated inside the page www.example.com are no longer being captured by the webRequest listener from the background script because it is no longer running
This is a huge problem in v3 and as far as I can find there is no way around this.
I was initially expecting the requests to automatically wake up the listeners, or at the very least if such listeners are in use then the background script stays alive for as long as the listener is active, or while the respective webpage is opened, but it always stops the background script after about 30s.
The only fix for this that I could find so far is to just drop v3 and revert to v2 with persistent background script.
Is this something that will be addressed in v3 anytime soon or will we be denied the ability to run any extension that requires such always active logic?
I am very concerned that such an obvious issue has been left unchecked like this for so long given that v3 has been out for about a year already, or at the very least I hope that I am missing a way to work around this problem and it’s just the available documentation is not either clear enough about it, or that information is not easy to find at this time.
@dotproto hope it’s ok to ping you about this since it is such a concerning limitation for anyone wanting to upgrade to manifest v3 it would be helpful to have the input from an official member.