Web request blocking support

1,027 views
Skip to first unread message

Muhammad Najam Sheraz

unread,
Jun 9, 2022, 2:35:31 AM6/9/22
to Chromium Extensions
Any body knows, how long chrome extension is going to give support of Web Request blocking API in managed environments.

Regards
Najam Sheraz

Juraj M.

unread,
Jun 9, 2022, 6:44:12 AM6/9/22
to Chromium Extensions, najams...@gmail.com
The blocking API is missing in Manifest V3, so I would say MV2 deadline applies, so for managed environments it could be June 2023:

Simeon Vincent

unread,
Jun 27, 2022, 10:23:57 PM6/27/22
to Juraj M., Chromium Extensions, najams...@gmail.com
This comment from an old thread is still the plan of record.

The current plan is that extensions that are force-installed via the ExtensionInstallForcelist [or ExtensionSettings] policy will be able to access the blocking capabilities of the webRequest API. In the future additional policies may also grant this capability, but none are currently planned.

Simeon - @dotproto
Chrome Extensions DevRel


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/aeec32a2-55b9-45cd-973d-ab343a89cde8n%40chromium.org.

Muhammad Najam Sheraz

unread,
Jun 28, 2022, 3:00:57 AM6/28/22
to Chromium Extensions, Simeon Vincent, Chromium Extensions, Muhammad Najam Sheraz, juraj....@gmail.com
currently, I have to self-host my mv3 extension with web request blocking to be used in the install force list, is it possible to host it on the chrome web store as it gives an error using web request blocking permission,and is there any way to host my extension with this permission on web store.

Simeon Vincent

unread,
Jul 13, 2022, 6:33:56 PM7/13/22
to Muhammad Najam Sheraz, Chromium Extensions, juraj....@gmail.com
is it possible to host it on the chrome web store as it gives an error using web request blocking permission,and is there any way to host my extension with this permission on web store.

Can you clarify what you mean by "it gives an error using web request blocking"? What is erroring and what does the error say?

On the extension platform side, there are two messages that come to mind that you may be referring to, both of which appear in the the chrome://extensions/?errors=<EXTENSION_ID> page for an extension.

First, if your extension includes the webRequestBlocking permission in it's manifest, you will see a message that says "'webRequestBlocking' requires manifest version of 2 or lower". This message is a warning, not an error; it doesn't prevent your extension from installing or running.

Second, if you attempt to register a blocking webRequest listener in the root scope of your extension's service worker, you may see an error message that says "Unchecked runtime.lastError: You do not have permission to use blocking webRequest listeners. Be sure to declare the webRequestBlocking permission in your manifest." This error will only appear when a Manifest V3 extension in Chrome is not force installed and attempts to register a blocking webRequest listener.

While this is a legitimate error – the event registration did fail – it should not prevent the extension's service worker from installing as expected. Unfortunately it's not currently possible to 

This error is logged asynchronously, so it will not block the registration of your service worker. Unfortunately, since event listeners must be registered on the first turn of the event loop, there's no way to avoid this error (crbug.com/1344312). That said, you can use chrome.permissions to asynchronously detect that the extension doesn't have the "webRequestBlocking" permission and use this signal to react as appropriate.

Simeon - @dotproto
Chrome Extensions DevRel

Yuan Ho

unread,
Sep 15, 2022, 6:25:43 AM9/15/22
to Chromium Extensions, Simeon Vincent, Chromium Extensions, juraj....@gmail.com, najams...@gmail.com
It's hard to debug when the extension is loaded from unpacked. Is there a chrome launch flag which can make chrome treat extensions loaded unpacked as force installed extension? Thanks.

wOxxOm

unread,
Sep 15, 2022, 11:56:30 AM9/15/22
to Chromium Extensions, tian...@gmail.com, Simeon Vincent, Chromium Extensions, juraj....@gmail.com, najams...@gmail.com
As long as Chromium team ignores our pain, you'll have to build your own Chromium with the restriction lifted or patch chrome binary, for example: https://github.com/Ceiridge/Chrome-Developer-Mode-Extension-Warning-Patcher/issues/82
Reply all
Reply to author
Forward
0 new messages