x0a / uBO-YouTube

Easier way to exempt your favorite YouTube channels from adblocking.
GNU General Public License v3.0
124 stars 8 forks source link

Ads appear on non-whitelisted channels and cause severe lag. #36

Closed DShip91 closed 2 years ago

DShip91 commented 3 years ago

For the past week, the extension has been trying to load ads on non-whitelisted channels. This causes Firefox to not know what to do with itself and ends up causing the page to freeze for an extended period of time, all while the ad's progress bar jumps ahead several seconds but the ad doesn't play.

x0a commented 3 years ago

Thank you for your report.

That sounds like a pretty serious bug. Is this more likely to happen when you have multiple YouTube tabs open from the same channel? Also do you have 'Whitelist subscribed channels by default' turned on?

On a laggy page, can you hit F12 and post console logs?

Should look like this and can help find evidence of a feedback loop Capture

DShip91 commented 3 years ago

Screenshot (78)

DShip91 commented 3 years ago

I haven't tried it with multiple YouTube tabs open.

x0a commented 3 years ago

Thanks for the screenshot!

It doesn't reveal a feedback loop as would be expected, but this could also be a lack of logging. I've been trying to reproduce the issue with only uBO and uBO-YT and have not been able to reproduce yet. There's a chance that this is a conflict with another extension.

If you can, could you open about:performance in another tab and see if there are any other processes consuming large amounts of CPU when the issue occurs? Since uBO-YT uses a userscript, it may not directly reveal that this is the cause of the problem however if its communicating with the background script then it would lead to a high energy impact.

Another way of figuring out where the source of the problem might be would be to pause execution when the page is lagging. To do this, you press F12 and switch to the Debugging tab and pause execution using the pause button. (pause button is replaced by play button in my screenshot, because I paused it). It will highlight the last line of code that it was executing. You can pause/resume execution a couple of times and see if its always lands in roughly the same place.

Capture

Post a screenshot if possible.

Thank you

DShip91 commented 3 years ago

Hey there. The update from two weeks ago seems to have fixed the issue of ads loading on non-whitelisted channels but I'm now having the opposite problem in that I can't get ads to load on videos from whitelisted channels. Any idea what's happening?

x0a commented 3 years ago

Thanks for the update! Sorry for the late response. I've been adding additional logging (and logging collection mechanism) to address issues like these a little better.

In the mean time can you try opening logs on a whitelisted channel (where ads are blocked), enable XHR and see if anything is being blocked?

Capture

If you see Blocked by Extension it means that another extension is blocking ads. If you see an event like 22:34:22 uBO-Block JSON-prune: true and never see a 22:34:22 uBO-Block JSON-prune: false then that means the extension is not properly turning off internal ad-blocking upon seeing a whitelisted channel. If either of these are the case, then it helps narrow down the source of the issue.

Let me know.

Thanks again