AdBlock won't work anymore #83
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#83
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I get ads on almost every song I play, I uninstalled it and cleared every bit remaining. Then I installed the latest version again. But the ads are still playing. Restarting the PC doesn't help either. Here is an image of the config. Am I missing something here?
EDIT: I just found out that when I'm not logged in with my Google account, the ads are blocked. I will update again if something changes.
Best regards


Here is an image, with the ad
I'm having the same problem. The ad-blocker worked fine until this morning. It does work when I'm not logged in though.
Hey @triplecan & @martinjoeledwards, thanks for the issue! It might be the same issue as https://github.com/th-ch/youtube-music/issues/55 - from the screenshot, config looks ok - out of curiosity, what OS are you using? I don't have the issue (logged in or not) on MacOS so it could be linked to the OS and/or the country you are in.
One idea could be that the default filters are not enough - I will try to reproduce on my end, if you want to experiment on your side, you can:
cache
to false and adding adblocking lists toadditionalBlockLists
(e.g. https://easylist.to/easylist/easylist.txt)I'm using Windows 10. USA.
Here's a screenshot of the dev tools log, in case that's helpful. Also the text in my options right now.
{

"window-size": {
"width": 1432,
"height": 927
},
"url": "https://music.youtube.com/watch?v=eqV8vxI0u-Q&list=OLAK5uy_n6jG9pX-JJy8T3tPyA4ph7ZWMj2CGEYeg",
"plugins": {
"adblocker": {
"enabled": true,
"cache": true,
"additionalBlockLists": []
},
"downloader": {
"enabled": true,
"ffmpegArgs": []
},
"shortcuts": {
"enabled": true
},
"navigation": {
"enabled": true
},
"auto-confirm-when-paused": {
"enabled": true
},
"hide-video-player": {
"enabled": true
},
"no-google-login": {
"enabled": false
}
},
"options": {
"tray": false,
"appVisible": true,
"autoUpdates": false,
"startAtLogin": false,
"restartOnConfigChanges": true
},
"window-position": {
"x": -8,
"y": -8
},
"window-maximized": true,
"internal": {
"migrations": {
"version": "1.7.1"
}
}
}
So as I read the other thread, I think it is exactly the same issue as #55. Today I can't even reproduce the issue any more. No settings changed.
I will keep updating if something changes.
EDIT: So now there is again an ad playing before every song. I wanted to implement the blocklist as you suggested. But I'm getting a JSON Error when starting the application when I try to set the cache to false. I use Windows 10 Pro 2004, Country is Austria.
I think this has something to do with how Google handles the account. Because it worked fine today until I watched a YouTube Video in my main Browser with an ad. The the ads started appearing again in the YouTube Music application. Could be a coincidence. But still. I'm logged in to the same Google account in my browser.
So this is an image of the Debugger when I play a video when not logged in (no ad)

And this is logged in (ad is playing)

I noticed that there are all of the sudden 2 entry's with "googlevideo.com" when logged in. But I don't know if this helps or not, If you need further information. I will do what I can
I am also having problems with Adblocker in my Brazil region. Early on Saturday morning, when I opened the app, an ad started popping up for every song played. I tried to follow the steps of adding Blocklists, but I had the same problem that the previous friend presented. When placing the cache in "false" the application opened but with a javascript error related to the modified JSON.
From this AdBlock page and this reddit thread, it seems it's a known issue that appears randomly (still unable to reproduce on my end even on Windows) - you can try the following:
cache
to false and add some known lists likehttps://easylist.to/easylist/easylist.txt
toadditionalBlockLists
to see if it helps (not sure it will, though)@ricardo404 thanks for the feedback! can you share your edited JSON config? If it's a simple JSON error, it should be fixable!
{
"window-size": {
"width": 1100,
"height": 550
},
"url": "https://music.youtube.com/watch?v=r5-qPZdT9pA&list=OLAK5uy_mhbIHrfp5Tw3f-qfaH4d-zfsXAnulfqTE",
"options": {
"tray": false,
"appVisible": true,
"autoUpdates": true,
"hideMenu": false,
"startAtLogin": false,
"disableHardwareAcceleration": false,
"restartOnConfigChanges": false
},
"plugins": {
"navigation": {
"enabled": true
},
"shortcuts": {
"enabled": true
},
"adblocker": {
"enabled": true,
"cache": false,
"additionalBlockLists": "https://easylist.to/easylist/easylist.txt"
},
"downloader": {
"enabled": false,
"ffmpegArgs": []
}
},
"internal": {
"migrations": {
"version": "1.7.1"
}
},
"window-position": {
"x": 410,
"y": 250
}
}
@ricardo404 Blocklist must be an array so config should look like:
With that, it should work fine! 🤞
{
"window-size": {
"width": 1100,
"height": 550
},
"url": "https://music.youtube.com/watch?v=Wz3PD8c4eSo&list=OLAK5uy_mhbIHrfp5Tw3f-qfaH4d-zfsXAnulfqTE",
"options": {
"tray": false,
"appVisible": true,
"autoUpdates": true,
"hideMenu": false,
"startAtLogin": false,
"disableHardwareAcceleration": false,
"restartOnConfigChanges": false
},
"plugins": {
"navigation": {
"enabled": true
},
"shortcuts": {
"enabled": true
},
"adblocker": {
"enabled": true,
"cache": false,
"additionalBlockLists": [
"https://easylist.to/easylist/easylist.txt"
]
},
"downloader": {
"enabled": false,
"ffmpegArgs": []
}
},
"internal": {
"migrations": {
"version": "1.7.1"
}
},
"window-position": {
"x": 410,
"y": 250
}
}
I put it that way but the error persists. The error is of the type: ENOENT: There is no such file or directory. And it keeps showing directories that link to "adblock engine.bin" and app.asar
Definitely a bug, good catch, thanks for the report! Pre-release 1.7.2 should fix it, allowing to test additional blocklists like "https://easylist.to/easylist/easyprivacy.txt", feel free to give it a try!
It is now possible to add the easy lists without presenting the Javascript problem. Meanwhile, boring ads continue to circumvent the list.
Just a quick update: Now it's even playing ads when not logged in:
I have added easylist to the config and disabled cache.
Same here.
@triplecan I played a bit with adblock settings, it seems adding easylist to additional blocklists does not play well with default settings and might be responsible for the ads when being logged out - you can try removing easylist from settings to see if it improves things for you!
@martinjoeledwards thanks for the feedback! It's unfortunate that you are affected too - this issue is being slowed down by the inability to reproduce on my side but I will keep this issue open to track progress on this. Feel free to post updates if you think it can help!
Still getting ads, currently on version 1.7.2., adblocker is on, I'm signed into my google account. Tried it with both easylist in and not in additional blocklists.
EDIT:
Reverting to version 1.6.3 is a temporary fix that seems to have worked for me. You'll have to uninstall the application and remove the entry inMost likely something to do with the adblocker or adblocker list in general, doesn't work regardless of the reason you use however add frequencies seem to be less with an older version.%APPDATA%\Youtube Music
(if you're on windows) in order to reinstall it without an error though.I'm experiencing this issue too. But I'm logged in. I added
"https://easylist.to/easylist/easylist.txt"
toadditionalBlockLists
and it didn't work.App version: 1.7.2
Doesn't work here either. With ublock origin in the browser it works perfectly.
@C4illin thanks for the feedback! Could you share your ublock list of filters? They should be supported by the integrated adblock so we might have a potential solution here! (and if the default list does not play well with it, I will add an option to disable it and only use user-provided blocklists)
(You can export ublock settings as JSON, the list of filters will be in
externalLists
)These seems to be the ones that have any impact:
"https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_2_English/filter.txt",
"https://github.com/uBlockOrigin/uAssets/blob/master/filters/filters.txt",
Could have an impact:
"https://easylist.to/easylist/easylist.txt",
"https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_3_Spyware/filter.txt",
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/experimental.txt",
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt"
But it still doesn't work.
It should be supported - Pre-release 1.7.3 allows to disable default lists so you can try these settings:
And other combinations with your different blocklists (use
raw.githubusercontent.com
URLs instead ofgithub.com
ones) to check if it works!Thanks, It seems to work now!
This worked the most consistently, but it was quite a pain to test so it could definitely be improved.
EDIT:
After a few more tests it seems that it still doesn't work 100%, but it seems better than before.
"adblocker": { "enabled": true, "cache": false, "disableDefaultLists": true, "additionalBlockLists": [ "https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_2_English/filter.txt", "https://raw.githubusercontent.com/uBlockOrigin/uAssets/blob/master/filters/filters.txt", "https://easylist.to/easylist/easylist.txt", "https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_3_Spyware/filter.txt", "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/experimental.txt", "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt" ] },
I tried, but not a single ad gets blocked for me.
Just to give a heads-up, this issue is actively being tracked and I am now able to reproduce, will work on it!
i am getting ads today as well. I am on the latest version 1.7.3.
No luck for me either.
youtube.com/get_video_info
(for a valid song video_id) returns all of the ad video information. Possibly this request could be intercepted and the ad information stripped from it. I don't think a standard blocklist will be able to accomplish this.After logging out and clearing site data (from devtools Application tab), I'm not getting any ads.
Hey everyone, v1.7.4 is in pre-release and should fix ad blocking! It seems to work fine for me, free free to give it a try and update this issue accordingly! If you changed adblock settings, you can revert to the default:
Seems to work for me! Thanks a bunch.
It's working now! Thank you!
Seems to work, Thanks!!