Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screenrant.com: breakage #202

Open
Angelique465 opened this issue Sep 9, 2024 · 45 comments
Open

screenrant.com: breakage #202

Angelique465 opened this issue Sep 9, 2024 · 45 comments

Comments

@Angelique465
Copy link

UBolite version: 2024.9.1.1266 chromium

Issue Link: https://screenrant.com/videos/

All videos are blocked (complete, optimal & basic filtering modes)

@stephenhawk8054
Copy link
Member

Hmm... It works on uBO. I don't see any incompatible filters for this site:

https://github.com/uBlockOrigin/uAssets/blob/b608854c4cff2d1a747bc14da5328754877bfd3b/filters/filters-2024.txt#L3019-L3030

@gorhill
Copy link
Member

gorhill commented Sep 9, 2024

Had to restart the tests to reproduce on my side. So far I can reproduce an issue which is caused by the ##.video cosmetic filter. The issue does not reproduce when using Basic mode.

This exception filter is not being enforced in uBOL: screenrant.com#@#.video, so similar issue as with #181.

There is this filter in EasyList:

ustthenews.com,movieweb.com,screenrant.com,thegamer.com##.video

When we have this filter in uBO filters:

movieweb.com,screenrant.com,thegamer.com#@#.video

Really the fix should be in EasyList, until then toggle blocking mode to Basic. I cannot reproduce an issue in Basic or No filtering modes.

@Angelique465
Copy link
Author

Angelique465 commented Sep 9, 2024

In Basic mode, when you click on some video links on the right (Trending) some of them are not played, but they are played in No Filtering mode.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 9, 2024

Hmm... I thought #181 is about exceptions for generic cosmetic filters. Didn't know exceptions for specific cosmetic filters have issues too.


cc @Yuki2718 I think those ##.video can be removed in EL.

@Yuki2718
Copy link

Yuki2718 commented Sep 9, 2024

IIRC we didn't agree on whether to block or not videos like easylist/easylist@39dc96c I don't see the breakage on https://screenrant.com/videos/ with uBO unless I add @@*$generichide,from=screenrant.com,badfilter and in this case the cause seems not to be ##.video.

@stephenhawk8054
Copy link
Member

I actually didn't see #@#.video being logged in uBO logger with OP's link, but I haven't checked again yet.

@gorhill Do you see the filter being reported in uBO?

@Yuki2718

This comment was marked as outdated.

@stephenhawk8054
Copy link
Member

It's by these filters

##.adsninja-ad-zone
##.w-adsninja-video-player
##.ad-zone:not(.textads)
##.ad-zone-container
##.ad-current

I think they should be defused by ghide already?

Yuki2718 added a commit to easylist/easylist that referenced this issue Sep 9, 2024
@Yuki2718
Copy link

Yuki2718 commented Sep 9, 2024

I think they should be defused by ghide already?

On uBO this is the case, IDK why not on uBOL. Sorry, maybe confused differnt breakage. Tested on uBOL and they're not hidden.

@gorhill
Copy link
Member

gorhill commented Sep 9, 2024

Do you see the filter being reported in uBO?

Yes:

image

Specific URL used to reproduce the issue: https://screenrant.com/video/its-always-sunny-in-philadelphia-needs-to-end/

I get a mostly blank page in uBOL.

Looking at the code again, specific exception filters are not enforced at all, regardless of whether it's generic or specific cosmetic filtering.

@gorhill
Copy link
Member

gorhill commented Sep 9, 2024

In Basic mode, when you click on some video links on the right (Trending) some of them are not played

I cannot reproduce. You say some of them, so if this affects specific videos, we will need more details about which ones so that we can try to reproduce on our side.


Also, please disclose the lists you enabled in uBOL -- this is an important configuration detail.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 9, 2024

Specific URL used to reproduce the issue: https://screenrant.com/video/its-always-sunny-in-philadelphia-needs-to-end/

@gorhill Yes, the videos inside each article actually need the .video exceptions. However, the one I'm confused is OP's link (https://screenrant.com/videos/) in which I don't see any .video elements in the DOM.

@gorhill
Copy link
Member

gorhill commented Sep 9, 2024

Right, I don't have cosmetic filtering issue at https://screenrant.com/videos/. I cannot reproduce the other issue "when you click on some video links on the right (Trending) some of them are not played" at that URL on my side.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 9, 2024

Right, I don't have cosmetic filtering issue at https://screenrant.com/videos/

Yeah, that's what I don't understand why the issue occurs with that link even though I only see network and scriptlet filters being logged in uBO. The blocked and redirected links looked the same when I compared both network devtools.

@Angelique465
Copy link
Author

In Basic mode, when you click on some video links on the right (Trending) some of them are not played

I cannot reproduce. You say some of them, so if this affects specific videos, we will need more details about which ones so that we can try to reproduce on our side.

Also, please disclose the lists you enabled in uBOL -- this is an important configuration detail.

https://app.screencast.com/Tp4vWj8HobBQy

Ther's no particular settings in UBol, installed and used as it is.

@stephenhawk8054
Copy link
Member

I'm scratching my head now. I added these

@@||adsninja.ca^
@@*$ehide,domain=com|net|ca|org|io|tech|gt|ad.gt|com.vn|mx|me
@@*$3p,1p,to=com|net|ca|org|io|tech|gt|ad.gt|com.vn|mx|me
com,net,ca,org,io,tech,gt,ad.gt,com.vn,mx,me#@#+js()

to both ublockorigin.github.io_uAssets_thirdparties_easylist.txt and ublockorigin.github.io_uAssets_filters_filters.min.txt but the video in https://screenrant.com/videos/ still doesn't appear. Is ehide available on uBOL? If not, how can I disable all cosmetic filtering in a site?

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 10, 2024

I think I found the issues. It's caused by these 2 filters:

~howtogeek.com,~makeuseof.com,~xda-developers.com##.ad-zone:not(.textads)

androidpolice.com,cbr.com,collider.com,dualshockers.com,gamerant.com,howtogeek.com,makeuseof.com,movieweb.com,screenrant.com,thegamer.com,xda-developers.com##+js(set, Object.prototype.ads.nopreroll_, true)

in which the 1st is the one hiding the video (the scriptlet one is just causing video unable to play, not hiding video player). I guess

@@*$ghide,domain=androidpolice.com|cbr.com|collider.com|dualshockers.com|gamerant.com|howtogeek.com|movieweb.com|makeuseof.com|screenrant.com|thegamer.com|xda-developers.com

can't affect ~howtogeek.com,~makeuseof.com,~xda-developers.com##.ad-zone:not(.textads) ?


It works if I switch to

~androidpolice.com,~cbr.com,~collider.com,~dualshockers.com,~gamerant.com,~howtogeek.com,~makeuseof.com,~movieweb.com,~screenrant.com,~thegamer.com,~xda-developers.com##.ad-zone:not(.textads)

stephenhawk8054 added a commit to uBlockOrigin/uAssets that referenced this issue Sep 10, 2024
stephenhawk8054 added a commit to uBlockOrigin/uAssets that referenced this issue Sep 10, 2024
@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 10, 2024

So, about ##.video situation, how can we solve the issue if EL does not remove the filter ustthenews.com,movieweb.com,screenrant.com,thegamer.com##.video ?

It's also similar to the cases in which we don't know when the regional lists fix the issue.

@gorhill
Copy link
Member

gorhill commented Sep 10, 2024

I will have to add support for specific exceptions.

Also, elemhide is a combination of generichide and specifichide, and specifichide is not looked up in uBOL.

@Yuki2718
Copy link

I can reproduce full breakage on https://screenrant.com/video/its-always-sunny-in-philadelphia-needs-to-end/ so at least will remove screenrant.com##.video

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

@Yuki2718 These sites have the same breakage so I think they can be removed too

https://movieweb.com/video/depravity-movie-trailer/
https://www.thegamer.com/video/someone-should-make-a-game-that-s-all-character-creator/

@gorhill Sorry, so just to confirm, ~example.com##.ads will be considered as specific cosmetic filter and ghide won't work for other sites right?

stephenhawk8054 added a commit to uBlockOrigin/uAssets that referenced this issue Sep 11, 2024
Yuki2718 added a commit to easylist/easylist that referenced this issue Sep 11, 2024
@Yuki2718
Copy link

I think ~example.com##.ads is a generic filter.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

Yeah, ghide works in uBO with ~howtogeek.com,~makeuseof.com,~xda-developers.com##.ad-zone:not(.textads) but somehow it doesn't work on uBOL, so I'm not sure if that filter is assessed differently on uBOL or not.

@gorhill
Copy link
Member

gorhill commented Sep 11, 2024

ghide exception should work with ~howtogeek.com,~makeuseof.com,~xda-developers.com##.ad-zone:not(.textads). On my side the filter hiding the content is ##.video from EasyList's justthenews.com,movieweb.com,screenrant.com,thegamer.com##.video.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

The broken link is https://screenrant.com/videos/. This one doesn't have .video elements in the DOM.

@gorhill
Copy link
Member

gorhill commented Sep 11, 2024

I don't see instance of .textads at https://screenrant.com/videos/.

@stephenhawk8054
Copy link
Member

It's not .textads. The item being hidden is .ad-zone:not(.textads)

@gorhill
Copy link
Member

gorhill commented Sep 11, 2024

Oops ok. Still, I am really confused here, as I am trying to investigate @@...ghide not working for generic cosmetic filters -- I cannot think of why this would not work for ~howtogeek.com,~makeuseof.com,~xda-developers.com##.ad-zone:not(.textads).

I also cannot find instance of elements matching .ad-zone at either https://screenrant.com/videos/ or https://screenrant.com/video/its-always-sunny-in-philadelphia-needs-to-end/.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

Hmm... Weird, I can see it with uBO picker in https://screenrant.com/videos/

image

Devtools also shows it

image

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

So currently if I build uBOL locally with current filters, https://screenrant.com/videos/ works as expected.

But after I modify ##.ad-zone:not(.textads) (in mv3-data folder) to ~example.com##.ad-zone:not(.textads), that element is hidden again. The stylesheet in the devtools panel shows user agent stylesheet is hiding it:

image

@gorhill
Copy link
Member

gorhill commented Sep 11, 2024

Looks like I am being served a different DOM:

image

Using default lists, etc. Same result when I tried through a U.S. VPN.


Hmm... "No-Ads mode"?

image

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 11, 2024

Can you try Singapore VPN? That's the latest VPN I tested.

@gorhill
Copy link
Member

gorhill commented Sep 11, 2024

Same result with a Singapore VPN, including after clearing all browser data, including when I disable uBO and no extension enabled. 🤷

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 12, 2024

@gorhill Can you test this example:

  1. Build uBOL locally and add these filters manually (to ublockorigin.github.io_uAssets_filters_filters.min.txt file)
~github.com##.post-content
@@||rpgbot.net^$ghide
  1. Access https://rpgbot.net/video-games/baldurs-gate-3/spells/minor-illusion/
  2. The .post-content element is hidden on my side

image

@gorhill
Copy link
Member

gorhill commented Sep 12, 2024

Right, I meant to test with ~github.com##body and @@||example.com^$ghide then I forgot. I can reproduce with these filters.


Ok the issue is because in uBOL, at extension compile time, a filter such as ~example.com##body is converted to equivalent of *##body + example.com#@#body, and * as hostname is currently still deemed a specific filter, hence why @@||github.com^$ghide doesn't work.

@Angelique465
Copy link
Author

uBlock Origin Lite version 2024.9.12.1004 Chromium
Settings: Basic | Optimal | Complete
Link: https://screenrant.com/videos/

Videos are still intermittently hided. To show and play a CTRL-F5 is needed (I previously clean the cache in browser)

See this video: https://app.screencast.com/9MwsMaq8CerdJ

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 13, 2024

I can't reproduce with 2024.9.12.1004

image


Ah ok, it's because I access https://screenrant.com/videos directly.


It happens with uBO in chromium too. I can't reproduce with Firefox.

@Angelique465
Copy link
Author

Angelique465 commented Sep 13, 2024

uBlock Origin Lite version 2024.9.12.1004 Firefox version 130.0 (64bit) official
Settings: Basic | Optimal | Complete
Link: https://screenrant.com/videos/

I can confirm it works fine in Firefox, although FF refuses to install the XPI file (not signed component) so I had to install it manually via about://debugging -> This Firefox. But the option page is not automatically shown and UBol starts in Complete mode. Is it normal?


Note that in Firefox Ubol seems to not catch anything in https://screenrant.com/videos/ and in all relative links (no catches are reported in badge)

@stephenhawk8054
Copy link
Member

Ok in chromium I need

@@||a.ad.gt/api/v1/u/matches/$script,domain=screenrant.com
@@||cdn.adsninja.ca/adsninja_worker$script,domain=screenrant.com

stephenhawk8054 added a commit to uBlockOrigin/uAssets that referenced this issue Sep 13, 2024
@stephenhawk8054
Copy link
Member

@Angelique465
Copy link
Author

Angelique465 commented Sep 13, 2024

uBlock Origin Lite version 2024.9.13.622 Chromium
Link: https://screenrant.com/videos/ and child links

Cache clean. Mode: Complete
Still videos are intermittently hided. Sometimes refreshing the page allows the video to be shown, refreshing the page (when a video is normally shown), always hides the video again.
CTRL-F5 normally always shows hidden videos
Something regarding cache? Rules not or wrongly applied when page is refreshed (with the Chrome's "refresh button") ?

https://app.screencast.com/drvfj1d5sdah9

Same behaviour in Basic/Optimal modes too

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 13, 2024

Hmm... Ok I suspect this is service worker issue

||screenrant.com^$csp=worker-src 'none'

@Angelique465 Can you open chrome://serviceworker-internals in new tab and search (Ctrl + F) if there's any screenrant.com appearing?

@Angelique465
Copy link
Author

No screenrant.com in chrome://serviceworker-internals

stephenhawk8054 added a commit to uBlockOrigin/uAssets that referenced this issue Sep 13, 2024
@stephenhawk8054
Copy link
Member

@Angelique465 Can you test this: https://github.com/stephenhawk8054/uBOL-test/releases/tag/uBOLite_test.chromium_2024.9.13.749

@Angelique465
Copy link
Author

Angelique465 commented Sep 13, 2024

IT WORKS!!!
@stephenhawk8054 Chapeau!

https://app.screencast.com/MYr9LdraojMcH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants