ghostery / ghostery-extension

Ghostery Browser Extension for Firefox, Chrome, Opera, Edge and Safari
Mozilla Public License 2.0
1.37k stars 139 forks source link

Ad-blocking no longer works on Opera ("Error: Internal error" while updating DNR lists) #1554

Open philipp-classen opened 5 months ago

philipp-classen commented 5 months ago

TL;DR: If you are on Opera and Ad-Blocking does not work, try to uninstall and reinstall Ghostery.


On Opera, a profile can enter a corrupt state where the DNR lists cannot be enabled:

dnr.js:49 DNR - Error while updating lists: Error: Internal error.

This is the API call that fails: https://github.com/ghostery/ghostery-extension/blob/5fca91b48721da0071286f33fa6001f0ae2e102a/extension-manifest-v3/src/background/dnr.js#L42

The internal error could be reproduced by this statement as well:

await chrome.declarativeNetRequest.updateEnabledRulesets({  enableRulesetIds: 'ads' });

It appears to be a bug in the browser. The only workaround that we have found is to uninstall the extension and reinstall it. The DNR rules are static rules (part of the release). Since we failed to reproduce it yet with a fresh profile, it might be triggered by an extension update.

Opera: 109.0.5097.45 (Arch Linux)

philipp-classen commented 5 months ago

Could be this bug: https://issues.chromium.org/issues/40285683 (fixed one month ago in Chrome Canary)

Note: Opera is a Chromium fork, so I assume it could be affected by the bug. On Chrome and Edge (the other Chromium platforms), Ghostery is still using Manifest V2. That is why it affects only Opera (and possibly Yandex?!) at the moment.

philipp-classen commented 5 months ago

For those who are affected: until it is fixed in the browser, there is nothing that you can do instead of uninstalling and reinstalling the extension.

On a broken profile, I got now a situation where the page https://www.idealo.de/ is unusable (a modal dialog being over the whole page, making it non-interactive). But this problem does not occur on the other Opera profile, where I did reinstall the extension.

philipp-classen commented 4 months ago

Since we just a release: on my broken, updating the adblocker engine forced a reset.

Based on that knowledge, I expect that if Opera ships the bugfix (from the Chromium code base), the problem should eventually vanish, even without user action.

(But to avoid confusion: I did not say that the problem is now solved. That my profile is working now only proves that it can recover from that corrupted state. However, as long as Opera has the bug, each extension update also risks to corrupt profiles. It is out of our control; but since it is fixed on Chromium now, I expect it to eventually become a non-issue.)

philipp-classen commented 3 months ago

Closing it now, since it is likely enough that the fix has been propagated to all browsers that are Chromium forks.

Should the error (Error while updating lists: Error: Internal error.) still occur, we can reopen.

philipp-classen commented 3 months ago

Reopening because of https://github.com/ghostery/ghostery-extension/issues/1653#issuecomment-2168337684

philipp-classen commented 3 months ago

Adding Chrome and Edge, but it may affect all Chromium forks, not only Opera.

Background: Opera was the first platform where we rolled out Ghostery 10 (Manifest V3). Thus, Opera used to be the only version that could be hit by the browser bug.