Open boromirmonk opened 4 months ago
same
It seems to works for me.
||creativeservice-production.scdn.co/mp3-ad/$media,redirect=noop-1s.mp4:10,from=open.spotify.com
We had many issues opened for spotify: https://github.com/uBlockOrigin/uAssets/issues?q=is%3Aissue+open.spotify.com
Maybe we should put a megathread for this site?
Maybe we should put a megathread for this site?
Also I see a lot of comments on reddit.com, so let's create one megathread.
I suggested a different approach to the Spotify Web Client ads taken from the desktop adblock "BlockTheSpot" linked here:
https://github.com/uBlockOrigin/uAssets/issues/22231
Essentially the desktop client is is a browser engine that downloads, executes and renders the same files from the same web-server as the web client runs on.
So, using their method, you can not only disable ad distribution completely, but also enable other features that usually only premium members get access to.
Unfortunately I was not aware of this issues existence.
uBO blocking works by filters. Specific solutions for specific sites that need deeper modifications to the scripts require dedicated scripts for it, which can only be updated when the whole extension updates. It's better to leave those solutions to dedicated extensions.
but also enable other features that usually only premium members get access to.
FYI: That's out of scope, we don't fix paywalls to features. Only the ads will be blocked.
@ItsProfessional That's fine.
@stephenhawk8054 Yeah, but does uBO not have the ability to inject scripts?
If so, could you inject something that changes the default state of a JS boolean or change some site specific code?
Take a look at the issue I posted to see what I mean, they essentially just wait for the browser engine to read a certain file and then patch it up.
@gettysburg Scripts injection works by using a set of pre-defined scriptlets: https://github.com/gorhill/uBlock/wiki/Resources-Library
We don't write arbitrary long scripts for specific sites. As I said, that can only be maintained and updated when the whole extension updates. It cannot be updated frequently like filters whenever the site changes something.
they essentially just wait for the browser engine to read a certain file and then patch it up.
We want to avoid code manipulation (i.e. patches) to the site's scripts whenever possible, as this is basically RCE.
I see this request
I'll update
||2mdn.net^$media,redirect=noop-1s.mp4:10,domain=open.spotify.com
Anyone knows if using *$media,redirect-rule=noop-1s.mp4:10,domain=open.spotify.com
caused any issues in the past?
I see this request
Screen
![image](https://private-user-images.githubusercontent.com/66517106/300237396-ee5a892e-c987-444e-88b7-6f24faba010c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDY0NTc4MjAsIm5iZiI6MTcwNjQ1NzUyMCwicGF0aCI6Ii82NjUxNzEwNi8zMDAyMzczOTYtZWU1YTg5MmUtYzk4Ny00NDRlLTg4YjctNmYyNGZhYmEwMTBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTI4VDE1NTg0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4MjVlNGYwZWZmMThjOTI2NWU2ZDQzZjRiMGNjZjE3Y2NiZjdlMzQwOWIwMDcyNjQxZjMxZDg5MDlkNDg5YmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.j06BgQe-n_580q4IbaWLMIQ_uozD7wRbXhygqgvGlqE)I'll update
||2mdn.net^$media,redirect=noop-1s.mp4:10,domain=open.spotify.com
I have the same as before.
Yeah, the ads connections look quite random. Sometimes I got scdn.co
, few times I saw 2mdn.net
Can anyone test if this filter can stop any media
ads from appearing?
open.spotify.com##+js(trusted-replace-fetch-response, /\,\{"metadata":\{"uri":"spotify:ad:.+?:"AD"\}/, , track-playback)
As i mentioned in #22258, i didn't have any issues with visual adds showing up but the songs would start skipping, and whats really irritating is that it doesn't happen every time
@Luminous-Journey Can you do these steps (follow strictly the step order, don't mix the steps orders, or skip any steps):
Unfortunately, while i was attempting to troubleshoot, the bug fixed itself and now i cant record it until it happens again, and who knows when that will be, but when it does i will do as recommended
and when i say fixed itself, i mean it stopped happening in that instance and this has been a recurring issue
Also @stephenhawk8054 do you want the markdown or plaintext version?
@Luminous-Journey Any is fine.
Another bug that i ran into with the same config is when a song is playing like an ad where you cant skip forward and it says advertisment in the bottom right, managed to record this one
log: https://www.logpasta.com/paste/91b347d8-8925-4e30-9fc8-eb17e5db82f5
screenshot:
Looks like you opened the logger after loading the page. The right steps are opening the logger first and reproducing the issue at the website later (step 1 -> step 2)
some more stuff got logged after a min or so https://www.logpasta.com/paste/94e5ae94-6fd5-4a56-afd8-3366cc89b71c
I've had the logger open since you suggested recording the issue in case i ran into another issue
Step 2 -> step 3 means you need to switch from the spotify page to the logger. Don't load any other sites and switch from that site to the logger
So the logger only logs when its in the foreground of the page attempting to be logged?
The logger needs to be opened first to start capturing information. Then depending on which tab you are opening, it will show the information from that tab. You can switch the tab in the logger's drop down.
@Luminous-Journey But anyways, can you do these steps:
Settings
tab in uBO settingsI am an advanced user
, and click on the gear icon at the endtrustedListPrefixes
at the bottom and change the value from ublock-
to ublock- user-
(keep the space exactly) -> Click on Apply changes
Then can you test these filters?
open.spotify.com##+js(trusted-replace-fetch-response, /\,\{"metadata":\{"uri":"spotify:ad:.+?:"AD"\}/, , track-playback)
Click on uBO icon > ⚙ Dashboard button > Add the filter(s) in "My filters" pane > ✓ Apply changes > Open new tab and test again.
Please also double-check again to see if the filters are marked as valid or invalid (it will show red line if invalid, otherwise it's good).
The filter seems to be valid, I will post back here if something happens again. Tysm
The logger needs to be opened first to start capturing information. Then depending on which tab you are opening, it will show the information from that tab. You can switch the tab in the logger's drop down.
Thats good, I had the dropdown set to the spotify tab, and had opened the logger before reloading that page
Can anyone test if this filter can stop any
media
ads from appearing?open.spotify.com##+js(trusted-replace-fetch-response, /\,\{"metadata":\{"uri":"spotify:ad:.+?:"AD"\}/, , track-playback)
This scriplet breaks the player on my side.
@dportvine Keep the above filter, can you continue adding this?
open.spotify.com##+js(trusted-replace-fetch-response, "disallow_seeking":true, "disallow_seeking":false, track-playback)
Didn't help.
Hmm... I don't know how to resolve more. I can reproduce the issue, but cannot any more after adding that filter
Nothing has changed for me.
We want to avoid code manipulation (i.e. patches) to the site's scripts whenever possible, as this is basically RCE.
RCE, aka remote code execution, is not the correct term here.
The dynamic library from "BlockTheSpot" is patching .css
files for example as they are parsed by the browser, in order to achieve a clean UI without the "Explore Premium" button for example, and the same is done with .js
files by replacing or changing a JavaScript variable or changing existing JavaScript code, no new code is added and executed, simply existing code with known ad-provider URL's (for example sentry.io
) in them is modified, in this example sentry.io
is replaced by localhost
.
This does not qualify as RCE whatsoever, as all changes are done locally and in the users favor, there is no harm, and no code execution that wouldn't occur otherwise.
Regardless, this was just a suggestion, if this is currently not possible as explained by @stephenhawk8054, then it's okay and the current approach of just playing 1 second noop files is good enough I guess, I managed to find an installer with which BlockTheSpot works, so I don't have to use the web player anymore:
Thank you regardless @ItsProfessional and @stephenhawk8054 for your hard work, and for your replies :-)
@gettysburg RCE will be determined by the extension store reviewers. You can argue whatever you want, but the final decision is by them. Any potential argument would be a potential issue of wasting time for back-and-forth questions/explanations and potential for delay/deny of future versions' publishing.
@stephenhawk8054 I have to admit that I did not take Mozilla's review team into consideration, and the way that these new filters allowing for file modification could be abused by (third party) filter-list maintainers.
Thank you for bringing that up, I totally have not thought of that.
@dportvine This is a POC test, can you test if this skips the ads faster?
open.spotify.com##+js(trusted-replace-fetch-response, '/(\{"uri":"spotify:ad:.+?,"manifest"):.+?,"audio_id":/', '$1:{"file_urls_mp3":[{"bitrate":160000,"file_id":null,"file_url":"https://cdn.jsdelivr.net/gh/stephenhawk8054/external_resources@master/noop-0.1s.mp3","impression_urls":[""],"track_type":"AUDIO","format":null,"audio_quality":null,"hifi_status":null,"gain_db":null,"expires_at":null}]},"audio_id":', track-playback)
The idea is replacing their mp3 ads with an external mp3 file
The player stopped. Реклама = Ads.
@dportvine Can you check the logger to see which connections appear at that?
logger
@stephenhawk8054
This is a POC test, can you test if this skips the ads faster?
open.spotify.com##+js(trusted-replace-fetch-response, '/(\{"uri":"spotify:ad:.+?,"manifest"):.+?,"audio_id":/', '$1:{"file_urls_mp3":[{"bitrate":160000,"file_id":null,"file_url":"https://cdn.jsdelivr.net/gh/stephenhawk8054/external_resources@master/noop-0.1s.mp3","impression_urls":[""],"track_type":"AUDIO","format":null,"audio_quality":null,"hifi_status":null,"gain_db":null,"expires_at":null}]},"audio_id":', track-playback)
The idea is replacing their mp3 ads with an external mp3 file
I checked again. And now I don't see any problems.
As i mentioned in #22258, i didn't have any issues with visual adds showing up but the songs would start skipping, and whats really irritating is that it doesn't happen every time
I managed to get that one issue logged where the songs just skip instead of playing @stephenhawk8054 https://www.logpasta.com/paste/c7f016dd-bd30-4c9a-977f-56f8f0a2af69
But now it's fixed itself again... I hate inconsistency when attempting to debug
@Luminous-Journey Remove the custom filters I told you to test and check if your original issue is still there or not.
If I understand correctly, your original issue is the player was stuck and could not advance right?
It would advance, but it would simply skip all the subsequent songs instead of playing them
@Luminous-Journey That's strange. For now just remove the current custom filters and see if the issue is still there or not. Also check your other extensions if possible too.
You mean this one?
open.spotify.com##+js(trusted-replace-fetch-response, /\,\{"metadata":\{"uri":"spotify:ad:.+?:"AD"\}/, , track-playback)
or the lists?
@Luminous-Journey Yeah, the ones I told you to add in My filters
. I don't remember how many you are using now.
The element is named ##.sponsor-container
or something along those lines, according to uBlock Origin's element picker. Seems somewhat inconsistent; I found this one in my Discover Weekly playlist but not in other playlists.
Prerequisites
URL address of the web page
https://open.spotify.com/
Category
ads
Description
Today, the site starting showing ads while having uBlock Origin activated.
Other extensions used
None.
Screenshot(s)
Screenshot(s)
Configuration