Uassets: AdGuard Base filters break HydraX

Created on 27 Jan 2020  路  19Comments  路  Source: uBlockOrigin/uAssets

URL(s) where the issue occurs

https://9anime.ru/watch/koisuru-asteroid.zjo3 (or pretty much any site that uses HydraX)

Describe the issue

This probably isn't the right place for reports like these, but since this issue isn't happening with AdGuard's ad blocker, I thought this would be the right place for it (the unbreak list exists for a reason, right?).

Here's the issue: the player never loads. All you get is the loading spinner thing and no play button. Apparently, blocking the domain that loads some randomly named file (madsimz.com) causes the player to never get past the loading part. This is probably related to the whole anti-adblock thing (see #6851).

Here are the 2 filters that are causing it (for some reason, the first one loads first, but when added to the my filters list with ,badfilter added to it, the second one loads):

||madsimz.com/*.js$important,domain=hydrax.net|playhydrax.com

/^https?:\/\/([a-z0-9]{8,10}\.)?[a-z0-9]{5,14}\.(com|bid|online|top|club)\/([a-z0-9]{2}\/){3}[a-f0-9]{32}\.js$/$script,3p

The second one is probably just a catch-all for sites that match whatever that mess of a filter is.

Screenshot(s)

I don't see how a screenshot could show this issue. If I were to add a screenshot of a loading video player, you could easily pass it off as slow internet taking it's time to do things. Hopefully what I have above is enough.

Versions

  • Browser/version: Firefox Beta 73.0b7
  • uBlock Origin version: 1.24.2

Settings

  • Default filters (up to date) + AdGuard Base

Notes

What I added in the other part is probably enough.

Most helpful comment

I think that in case like that, you can "ping" me, so I will just disable a problematic rule for uBO users.
Please note that after commit, update will be available after about 1 hour.

All 19 comments

That regex is also in Easylist Spanish

@llacb47 can you reproduce with default list and + AdGuard Base?

The player loads fine on my end using Chromium and Firefox.

FYI, just did some testing on this matter with the most recent revisions.

The ||madsimz.com/*.js$important,domain=hydrax.net|playhydrax.com filter is actually ||madsimz.com/*.js$empty,important,domain=hydrax.net|playhydrax.com and uBlock Origin doesn't do a good job showing the translation. The problem is that uBlock Origin's extension appears to handle the "empty" flag differently between Firefox & Chrome.

On Chrome: "Empty" results in an outcome similar to AdGuard's with a 200 OK response

On Firefox: "Empty" doesn't appear to have the same result, instead you'd need use noopjs to have the same outcome. (At least, in this specific case.)

It's probably a bad idea to keep using $empty tags at this point, anyways, because support for them being auto-translated to $redirect tags may be dropped in the near-ish future.


On point 2 the RegEx filter /^https?:\/\/([a-z0-9]{8,10}\.)?[a-z0-9]{5,14}\.(com|bid|online|top|club)\/([a-z0-9]{2}\/){3}[a-f0-9]{32}\.js$/$script,3p does appear to affect the aforementioned domain if you have to declare badfilter on the previous part.

But it doesn't (appear?) to affect the outcome if any other filter manages to declare madsimz.com with a noopjs instead of empty.

On my Firefox 72.0.2 (default + AGBL) the video loads fine and somehow no connection to madsimz.com was attempted, tested from France, Japan, and US IP.

video loads fine and somehow no connection to madsimz.com

I also don't see any connection to madsimz on my end.

I can reproduce the breakage. $empty implementation in Adguard is probably different than in uBO.

Badfiltering ||madsimz.com/*.js$empty,important,domain=hydrax.net|playhydrax.com,badfilter resumes the functionality.

@Yuki2718 & @okiehsch I'm not sure why neither of you have any noted connections loaded from Madsimz. Ensure that you're having a video attempt to load off the HydraX server on the aforementioned site example if you're doing testing.

Also make a note that the HydraX video player is loaded as an iFrame so Madsimz's request originates from Hydrax.net and not 9Anime.ru

Here's a screenshot of the load sequence via the uBlock Origin Logger with a $empty rule in place or if madsimz is fully blocked..
https://i.imgur.com/GMhrpNj.png

And here's a screenshot of the load sequence when it's set as noopjs
https://i.imgur.com/dqqxa4C.png

Note: uBlock Origin's logger marks any empty / noop[Type] request as two separate requests. One is just shown as the URL being blocked but this will follow up by listing the "redirect" type.

I can reproduce the breakage. $empty implementation in Adguard is probably different than in uBO.

Badfiltering ||madsimz.com/*.js$empty,important,domain=hydrax.net|playhydrax.com,badfilter resumes the functionality.

The $empty tag implementation appears to be the very similar between both uBlock Origin & Adguard, as they both convert the $empty tag into a "$redirect=" tag.

However, it appears that uBlock Origin uses a type of "empty" which states "only network requests which are meant to return a text response will be redirected to an empty response body".

While AdGuard converts this into "nooptext" instead a generic "empty" type.


Side note: I can 100% confirm that uBlock Origin converts $empty to $redirect=empty in both Chrome & Firefox extensions but the issue only occurs in the Firefox implementation. This may have to do with differences in how Firefox reports the media type versus how chrome reports it.

And, as the aforementioned documentation states... uBlock Origin will not block media types which aren't text when the redirect media type is set to empty. (The file being blocked is JavaScript)

so empty will not work for resources such as images, media, or other binary resources.

That's why the breakage is occuring.

@uBlock-user is there an open issue about that?

I can reproduce and adding
||madsimz.com^$script,redirect=noopjs,domain=hydrax.net
will block the ad-domain without breaking the video player.

None so far.

and adding
||madsimz.com^$script,redirect=noopjs,domain=hydrax.net
will block the ad-domain without breaking the video player.

@mapx- already added *$script,redirect-rule=noopjs,domain=hydrax.net so no need to add another filter for that purpose.

@Yuki2718 & @okiehsch I'm not sure why neither of you have any noted connections loaded from Madsimz. Ensure that you're having a video attempt to load off the HydraX server on the aforementioned site example if you're doing testing.

Also make a note that the HydraX video player is loaded as an iFrame so Madsimz's request originates from Hydrax.net and not 9Anime.ru

You're right, I should have chosen HydraX and reload the page. Now all phenomena discussed are reproduced.

I added ||madsimz.com^$3p to uBO-filters all scripts originating from that domain in the context of hydrax.net will automatically redirect because of the existing filter
*$script,redirect-rule=noopjs,domain=hydrax.net

That will not fix the breakage if one uses AdGuard Base.

Tho I couldn't $badfilter the AG rule due to $important option,
||madsimz.com/cc/*.js$important,script,redirect=noopjs,domain=hydrax.net
fixed it as it's more specific.

[EDIT] or is it just because User filters has priority over subscription? Even
||madsimz.com/*.js$important,script,redirect=noopjs,domain=hydrax.net
fixed.

Tho I couldn't $badfilter the AG rule due to $important option,

$badfilter works fine on $important, thats how I'm doing in my own filterlist.

Tho I couldn't $badfilter the AG rule due to $important option,

$badfilter works fine on $important, thats how I'm doing in my own filterlist.

Whoops, I just forgot to include $empty in the original rule for badfilter. Won't that be added to Unbreak as AGBL is not enabled by default?

Won't that be added to Unbreak as AGBL is not enabled by default?

Yes, otherwise we would have to add fixes for all other filterlists too which are not enabled by default. For breakage caused by Adguard filter you will have to add the fix to my filters yourself.

I added mine to my filterlist - https://github.com/uBlock-user/uBO-Personal-Filters/commit/375b4c55fc44e4bd0de528db99805c5295ec60e5

Won't that be added to Unbreak as AGBL is not enabled by default?

Yes, otherwise we would have to add fixes for all other filterlists too which are not enabled by default. For breakage caused by Adguard filter you will have to add the fix to my filters yourself.

Got it, ty!

I think that in case like that, you can "ping" me, so I will just disable a problematic rule for uBO users.
Please note that after commit, update will be available after about 1 hour.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jose1971AB picture Jose1971AB  路  3Comments

ghost picture ghost  路  3Comments

Htin picture Htin  路  4Comments

efih picture efih  路  4Comments

krystian3w picture krystian3w  路  3Comments