user234683 / youtube-local

browser-based client for watching Youtube anonymously and with greater page performance
GNU Affero General Public License v3.0
486 stars 62 forks source link

v2.8.9 - Video Does Not Load if 'Route images' Option is Unchecked #206

Open appyusergh opened 3 months ago

appyusergh commented 3 months ago

First of all I'd like to really thank you for this great project, keeping it alive, and not removing support for older systems.

Regarding the issue described in the title, I've discovered it by chance, through carrying over my custom settings, through many versions. I've simply had kept that option 'Route images' unchecked just in case, as I don't use the Tor routing.

Until I've found the cause of the problem, I thought that just maybe my system was getting too old, and if anything in the Settings that particular option would be the last suspect on my list.

Now, possibly there might be a side effect of that option being switched on, as for the first time ever I observe a video loading time lag of about 3 seconds. It's not severe, just noticeable, I can live with it.

I think that the main issue of not loading a video might be a regression, I've found a mention of it in an old Issue #95:

" zrose584 commented on Oct 14, 2021

FWIW, I just realized that my "does not load at all" problem was/is caused by CSP restrictions which occur if one has set proxy_images=False. In that case the XHR-Requests from av-merge.js just get blocked ".

Link: https://github.com/user234683/youtube-local/issues/95#issuecomment-943659458


My system in short: Windows 8.1 Home, Firefox 115.9.1

user234683 commented 3 months ago

I tried it and the request gets completely blocked by CSP (open inspect element, network tab, XHR before you load the video). For your case, see if it's retrying the request after it gets blocked, since that retry functionality was added to av-merge 2 months ago here: https://github.com/user234683/youtube-local/compare/3213649..684d777

It seems it's because that setting is also controlling whether the video is routed: https://github.com/user234683/youtube-local/blob/master/youtube/watch.py#L627

Added here: https://github.com/user234683/youtube-local/pull/68 https://github.com/user234683/youtube-local/pull/24

appyusergh commented 3 months ago

Sorry, but that stuff is beyond my knowledge. I was merely quoting @zrose584 comment as an example of a similar issue. I'm just an average user.

EDIT:

After realizing you were referring to the Inspect function in Firefox, I've run some tests, as that is not completely beyond my knowledge, except that networking stuff.

So, with the 'Route images' option unchecked, I was getting three requests altogether, one ok with plyr.js as Initiator, and two blocked xhr with CSP statement in the Transferred column.

I don't know if that helps ...?

MikuroK commented 2 months ago

thanks for posting this, i was playing with the tor feature yesterday, and when configuring it i unticked that option, then never got any video to load after that point, even when turning the tor stuff back off, trying other browsers, etc, youtube-local just stopped loading videos entirely i ticked it after seeing this issue and everything is working again, even though the tor routing is still disabled