The extension failed to load properly in our latest update

709 views
Skip to first unread message

Mr Sia

unread,
Oct 24, 2023, 3:40:17 AM10/24/23
to Chromium Extensions
In our latest update, we made a modification to one of our rule files. After the update was published, we encountered an ERROR in Chrome. Unfortunately, this error led to the loss of 10,000 users.

In version 1.4.3, we initially had 33,000 lines of rules. To address the problem, we reduced the number of rules to 30,000 lines in an attempt to fix it. However, this update still resulted in the same error. I've attached a screenshot of the exact error message for reference:

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

Would someone be able to offer guidance on how to identify and resolve this issue?
sblock error 2.png

Oliver Dunk

unread,
Oct 24, 2023, 4:38:23 AM10/24/23
to Mr Sia, Chromium Extensions
Hi,

Sorry to hear this.

Do you see the same error even after restarting the browser? If so, it'd be great if you could share a link to the extension so we can take a look.

Either way, I'd be curious to know if you see anything in the console for the service worker. That can sometimes contain clues here.

Thanks,
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/10a49708-fced-4099-b178-7aa381499293n%40chromium.org.

Mr Sia

unread,
Oct 24, 2023, 9:09:06 AM10/24/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Mr Sia
Hello, Oliver, and thank you for your quick response.

Yes even after closing and reopening Chrome, the error persists. But, you can resolve this issue by disabling the extension and then re-enabling it.
The service worker is not giving any errors.
Also the issue only arises following an automatic extension update. Installing an extension directly from the Chrome Web Store for the first time does not trigger any errors.

I attempted to simulate this issue again in test mode using an unpacked file.

Test 1: In the first test, I used the latest version of my extension, then loaded it into Chrome and closed the chrome and than deleted the `_metadata` folder, which seems to be related to cache rules, after reopening Chrome, no issues occurred. So, I repeated the previous steps with the difference that I updated one of the rules and changed the name of one of the domains inside it to something else. This time, after reopening Chrome, I received the exact same error, and the worker service also had an error labeled "Uncaught (in promise) Error: Internal error." This was strange because I know that when you update a rule and put it in the store, there should be no problem.

Test 2: This time, I installed an older version of my extension and, after closing Chrome, I deleted all files except the `_metadata` folder and replaced the new version's files with the old ones. After reopening Chrome, the worker service gave an error labeled "Uncaught (in promise) Error: Invalid ruleset id: default_0." However, Chrome itself did not display any errors. This is puzzling since I don't have any rules in the new version's files, neither in the manifest file nor in the code, with the ID "default_0," and even the file for these rules has been removed in the new version.

Test 3: To make sure if the issue is related to my code or not, I performed a test with an empty extension that has no code. In this case, the extension didn't encounter any errors as long as I didn't delete the `_metadata` folder. However, when I deleted that folder and repeated the same steps as in the first and second tests, Chrome threw an error again, but the worker service did not.

Note: In all the tests, after clearing the errors and refreshing the extension, the errors did not reappear, and there were no further issues. This makes it difficult to understand the source of the problem. Is it possible that Chrome is caching rules, preventing us from changing the IDs or files of rules that are set by default? However, I couldn't find any information about this behavior in Chrome's documentation.

Extension URL:
https://chrome.google.com/webstore/detail/sblock-super-ad-blocker/cmdgdghfledlbkbciggfjblphiafkcgg
sblock error.png

Oliver Dunk

unread,
Oct 24, 2023, 9:19:38 AM10/24/23
to Mr Sia, Chromium Extensions
Thanks so much for taking the time to write up all of that extra context.

We were actually discussing a similar bug in the mailing list recently: https://bugs.chromium.org/p/chromium/issues/detail?id=1492980. Does this sound like it might match up with your issue?

If so, it would be great if you could leave a comment saying that you are also affected and describing the specific impact for your extension. We generally advise against +1 comments, but if you make sure to provide some detail, that would be helpful. In particular if there is any difference between your tests and the ones described there.

Also, just to confirm - you mentioned losing 10,000 users. Am I right to assume these are users that have left the extension disabled, or uninstalled it following the issue, vs. users that actually had the extension removed for them? I know that neither is good, but just want to understand exactly what you're seeing.

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB
Message has been deleted

Mr Sia

unread,
Oct 24, 2023, 5:22:35 PM10/24/23
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Mr Sia
It seems that we also have this issue, and we perform the on/off toggling as part of the service worker initialization process to trigger a refresh.
Clearly, the error I observed during testing is the same bug you reported, but I was able to conduct more precise tests using the testing tools you introduced in this topic, I realized that this problem arises when we have a rule that we have activated, but that rule is not present in the next version. To better understand, I have attached my test files.

Yes, we lost 10,000 users. When this error occurred, Chrome displayed a red error flag at the top. When users clicked on it, they were redirected to the extension and noticed that the SBlock extension had an error. As a result, many users chose to either disable or uninstall our extension, thinking that it was no longer functioning, which led to a loss of almost 10,000 to 12,000 users.

It seems I am unable to attach a zip file. I have uploaded the file to Google Drive. Here is the link:

Anu Kuruvilla

unread,
Oct 24, 2023, 6:25:32 PM10/24/23
to Mr Sia, Chromium Extensions, Oliver Dunk
We faced similar issue. Our extension had all rulesets disabled by default in manifest and rulesets are enabled once user login to extension. Now, an update to such logged in scenarios resulted in similar issue. We fixed by keeping ruleset enabled by default.

--
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.

Oliver Dunk

unread,
Oct 25, 2023, 5:03:05 AM10/25/23
to Anu Kuruvilla, Mr Sia, Chromium Extensions
Thanks both for the extra context.

As mentioned, if either of you are able to star the bug and leave a comment with some of what you have said here that would be helpful for the engineering team.

Since that bug is open, that would be the best place to track this going forward. I've made sure the team is aware and hopefully they will be able to take a look soon. Sorry again for the issues this has caused up to now.

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB
Reply all
Reply to author
Forward
0 new messages