Redirect conflict with uBlock Origin
Type: other
This extension failed to redirect a network request to https://s7.addthis.com/js/300/addthis_widget.js#pubid=tenthamendment because another extension (uBlock Origin) redirected it to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/web_accessible_resources/af3c919ee9a3d97f5dedaf2f8bec146a.javascript?secret=qqesz4qhqw5h.
Looks like a surrogate redirect conflict?
@gorhill
I think @Bisaloo's observation above is what should be looked into by Chromium devs: when an extension redirect to an external resource while another extension redirect to a local one, the redirection to the local resource should be seen as a blocked network request and no conflict warning should be raised -- as is currently done with data: URI,[1] and also for the same reason there is no conflict raised when an extension redirect while another block (block always win).
[1] So this explains why the conflict surfaced lately, it was silently ignored when uBO was relying on data: URI.
me to having this issue mine is https://pastebin.com/raw/J4aKNF8H
I get this issue on http://onemileatatime.boardingarea.com
This is the error I'm getting related to this issue as well. https://i.imgur.com/EofRHzR.png
IMHO this is a spec issue. Browsers or extensions need to handle the cases, where multiple extensions try to access the same API/resource at the same time.
I now have the inverse error: uBlock Origin complains that another extension (HTTPS Everywhere) redirected first: "uBlock Origin This extension failed to redirect a network request to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/web_accessible_resources/f6f25816c1c5ce3d465f4cd083539931.javascript?secret=gp6gzphd2wtw because another extension (HTTPS Everywhere) redirected it to https://widgets.outbrain.com/outbrain.js."
bartovan, the same thing happened to mine. I'm guessing some update to one or both of the extensions caused this change.
uBlock Origin This extension failed to redirect a network request to chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/w
I have been having this issue for weeks. I keep seeing it after I finish browsing.
Everyone: there is no need at this point to add a new comment simply to say you are getting the problem or to report the now-familiar This extension failed to redirect a network request to chrome-extension://.... Please instead thumbs-up the original comment if you are also getting the problem or want to show support for this issue.
I just want to point out the exact opposite happens to me where HTTPS everywhere "succeeds" in redirecting browser traffic over uBlockOrigin - but creates a clash that Chrome consider a failure/error: what I see is documented in here
To add to my previous comment: no one needs to add a comment to report an error happening in either direction, that is, This extension failed to redirect a network request to https://... or This extension failed to redirect a network request to chrome-extension://.... Please see @gorhill 's comment above at https://github.com/EFForg/https-everywhere/issues/14961#issuecomment-376127444 for a description of the problem.
I don't want to discourage people from showing their support for this issue, but rather, there is no need at the moment for anyone else to spend their time providing detailed information
Consider starring this Chromium issue if you want a fix, I added a comment at the end: https://bugs.chromium.org/p/chromium/issues/detail?id=111700#c31
I think it is worth noting the uBO change that is causing this, is actually a workaround for this chrome bug. Which has implications for other projects (like PB). So please also chime in there to get this fixed.
@gorhill as a temporary resolution to this problem, can you let HTTPS Everywhere know that uBlock Origin is installed via onMessageExternal, and I will selectively disable the conflicting rulesets. We would have to determine in advance which URLs are potentially problematic, but this is known, correct? Meaning, it isn't dynamic, it's a static set of widget URLs which are locally proxied?
@Hainish See https://github.com/EFForg/https-everywhere/issues/14961#issuecomment-375473293 for a comment from @gorhill about getting a list of URLs.
@Hainish This is not as simple as just providing a list of URLs. The redirection is decided based on two things:
- Whether the network request is meant to be blocked
- Whether the network request matches a pattern in one of the directives in the redirection database
For the first one, this is decided at webRequest.onBeforeRequest listener time. The exact same network request may be blocked most of the time, but then allowed on a handful of sites (those sites broken by the act of blocking). It's decided in real-time, not in a declarative way.
The second point is that a redirection is decided according to a pattern in the URL, so a list of URLs does not work here. For example, a redirection directive with pattern */b/ss/*&aqe=, which is meant to redirect to a local pixel image.
@gorhill do you have statistical data on how often each of these patterns are matched in uBlock Origin? I'm wondering if we can avoid conflicts in a comprehensive but not complete way. We may be able to avoid the vast majority of conflict events in this way.
@Hainish If @gorhill doesn't have statistical data, then at least based on the comments here and https://github.com/gorhill/uBlock/issues/3639 , specific handling for Google Analytics would take care of a lot of cases.
Is there any way to stop the (!) icon appearing at the very least for us end users? I'm getting this constantly and it's so frustrating.
I added a partial revert of the fix to https://github.com/gorhill/uBlock/issues/2823 (which is what the redirection to "web accessible resources" was fixing). uBO will avoid to redirect to a "web accessible resource" and instead redirect to a data: URI when the two following conditions are present:
- uBO is running in a Chromium-based browser
- The URL to redirect is a non-secure
http:one (i.e. one which HTTP-Everywhere will likely want to redirect)