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