The extension failed to load properly. It might not be able intercept network requests

3,362 views
Skip to first unread message

Benson

unread,
Feb 14, 2023, 8:39:09 PM2/14/23
to Chromium Extensions
Hi All,

I encounter below warning after extension update automatically (will not happen from manual update) and I can't find any error in developer console of service worker.I would like to know the root cause and how to resolve it, thank you very much.


The extension failed to load properly. It might not be able intercept network requests


Thanks,
Benson

wOxxOm

unread,
Feb 15, 2023, 2:04:29 AM2/15/23
to Chromium Extensions, Benson
This warning is shown when some of the static "declarative_net_request" rules defined in the extension's manifest.json couldn't be compiled or when the index file got corrupted on the disk. Try reinstalling the extension. I don't know how to debug which rules failed. This API is still semi-implemented so maybe there's no way other than the good old divide-and-conquer debugging aka binary bisection: remove half the rules and retry, then recursively do the same on the part that doesn't work.

Oliver Dunk

unread,
Feb 15, 2023, 5:31:32 AM2/15/23
to wOxxOm, Chromium Extensions, Benson
++woxxom, this can show if a ruleset fails to load.

It can also show if the number of rules you're using exceeds one of the limits. It's hard to say if that's the case without more information but it is another thing to look for.

Hopefully one of those helps!
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
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/8f0ee9db-5753-4dba-a192-9bbd30afe094n%40chromium.org.

Mykola Batashov

unread,
Jun 26, 2023, 7:57:01 AM6/26/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Benson, wOxxOm

Hi all.
We are facing a similar issue where the error occurs only when updating the extension in the Chrome Web Store with a build containing updated rules.
Our rules do not exceed the limit of 30 thousand. The rules work correctly if you install the extension or reinstall it.

After the user receives an error, the feature that requires these rules stops working. Turning off/on does not help.
The button that Chrome shows next to this error does not help.

Also, unfortunately, there is no way to reproduce this error locally during development or debugging, even using this tool.


Could someone have some recommendations on how to fix it?
Thank you!

середа, 15 лютого 2023 р. о 11:31:32 UTC+1 Oliver Dunk пише:

wOxxOm

unread,
Jun 26, 2023, 8:36:16 AM6/26/23
to Chromium Extensions, Mykola Batashov, Oliver Dunk, Chromium Extensions, Benson, wOxxOm
Your case sounds like it's caused by an antivirus or a faulty connection (if the profile is on a network drive) or a bad sector on the physical drive. It could be also a bug in Chrome's code for the extension updater e.g. if it starts indexing before the files were actually written.

Mykola Batashov

unread,
Jun 27, 2023, 10:22:46 AM6/27/23
to Chromium Extensions, wOxxOm, Mykola Batashov, Oliver Dunk, Chromium Extensions, Benson
Thank you very much for the possible reasons given,
Yesterday I analyzed the analytics for the feature and I can say that:
1. The problem is global for users
2. It is clearly visible that the problem appears after the release of a new version
3. There was a period when there were no problems (before we migrated to manifest 3)
4. This problem is also present in Edge

Therefore, I think these reasons are not relevant:
- antivirus or a faulty connection
- bad sector on the physical drive

It seems that there are only two possible reasons:
1. Crash in the browser when updating rulesets (and I can't influence it in any way)
2. Some rules cause a crash (but it is logical to expect a crash when installing the extension, so I don’t know)

понеділок, 26 червня 2023 р. о 14:36:16 UTC+2 wOxxOm пише:

Oliver Dunk

unread,
Jul 4, 2023, 9:45:12 AM7/4/23
to Mykola Batashov, Chromium Extensions, wOxxOm, Benson
Hi Mykola,

Thanks for sharing that information and for trying to reproduce this with the update testing tool.

Given that you've ruled out all of the ways we'd usually try and reproduce something, this seems tricky to resolve (not that we shouldn't still try).

Out of interest, are you able to reproduce this on each update? Or did it just happen once?

Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB

Mykola Batashov

unread,
Jul 4, 2023, 12:48:34 PM7/4/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, wOxxOm, Benson, Mykola Batashov

Hello,
Looking ahead, I have fixed the issue and was waiting for analytics to confirm it definitively.

I managed to reproduce the issue using the extension update testing tool.
During the first attempt, I didn't fulfill all the preconditions:

  • I wasn't logged in (which means the rulesets were not enabled).
  • I clicked on the ‘Update’ button instead of closing/reopening the browser (which suggests that the problem likely occurs on browser startup + extension update to a new version).

The reason is that the rulesets are disabled by default in the manifest, they are enabled when the user is authorized and the feature is activated.
Most likely, there is a conflict between the disabled rulesets in the manifest and the enabled rulesets in the browser during the update.

I fixed it by enabling our rulesets in the manifest, and the problem is no longer reproduced.
Additionally, based on the analytics, I can confirm that users are updating without any issues + this fix helps users who had it and now the feature works for them.

So I think it's a Chromium issue,
Oliver, maybe we need to report an issue to them?

PS. Oliver, thanks for the tool

вівторок, 4 липня 2023 р. о 15:45:12 UTC+2 Oliver Dunk пише:

Oliver Dunk

unread,
Jul 5, 2023, 6:24:07 AM7/5/23
to Mykola Batashov, Chromium Extensions, wOxxOm, Benson
Hi Mykola,

Really glad to hear that the tool was useful!

If you can reproduce this, that definitely sounds like a bug.

Please do file a bug at https://bugs.chromium.org/p/chromium/issues/list. If you're able to provide a simpler test extension that reproduces it, along with some steps, that would be really helpful too.

Thanks,

Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB

Cameron Eckelberry

unread,
3:49 PM (3 hours ago) 3:49 PM
to Chromium Extensions, Oliver Dunk, Chromium Extensions, wOxxOm, Benson, Mykola Batashov
We just noticed this bug intermittently today on our latest MV3 beta. 
Unfortunately, we haven't figured out a stable way to reproduce it.
I saw https://issues.chromium.org/issues/40285683?pli=1 is closed.
Are there any other bugs open on this? Or should we open a new one?

Reply all
Reply to author
Forward
0 new messages