dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.18k stars 90 forks source link

Watching a Kids profile videos continuously asks to switch profiles #84

Closed awanaut closed 1 month ago

awanaut commented 8 months ago

Describe the bug When watching a video using a kids profile, after some period of time causes a popup stating the video cannot be watched under a kids profile and asks to switch to another profile. When stopping the container, the issue goes away. Here is a log entry of stderr:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pyytlounge/wrapper.py", line 532, in _command resp.raise_for_status() File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 401, message='RID_OUTSIDE_WINDOW', url=URL('https://www.youtube.com/api/lounge/bc/bind?device=REMOTE_CONTROL&name=iSponsorBlockTV&app=youtube-desktop&loungeIdToken=gsessionid=xxxxxxxxxxxxxx')

To Reproduce Steps to reproduce the behavior:

  1. Open a "kids" profile
  2. Watch any available video
  3. Wait some period of time
  4. See description

iSponsorBlockTV server (please complete the following information):

Apple TV (please complete the following information):

dmunozv04 commented 8 months ago

That’s kinda weird. I’ll take a look at kids profiles and try to see what’s wrong here

dmunozv04 commented 8 months ago

I’ve been able to replicate this issue connecting to the TV with a “real” device (a phone), so it seems like the best option would be to detect if the client name matches TVHTML5_FOR_KIDS and in that case safely disconnect so it doesn’t trigger that weird popup. Feel free to attempt to contact YouTube about this issue, since it also affects “legitimate” devices

dmunozv04 commented 8 months ago

I've published a new develop docker image which should fix this issue (it does for me). Please let me know if it works for you @awanaut . You can use this image by replacing ghcr.io/dmunozv04/isponsorblocktv with ghcr.io/dmunozv04/isponsorblocktv:develop on your docker run/compose

awanaut commented 8 months ago

All seems to be working! Thanks a bunch!

dmunozv04 commented 8 months ago

That’s great to hear. I’ll go ahead and make a new release soon

Clem- commented 2 months ago

Hi there, I have the same issue with Youtube Kids and the develop branch isn't fixing the issue :/ Thanks !

dmunozv04 commented 2 months ago

thanks for reporting @Clem- , it’s possible that something internal in YouTube changed since it worked last time I tested it

dmunozv04 commented 2 months ago

Could you please provide details of the TV/console device used and the iSponsorblockTV server?

Clem- commented 2 months ago

Sure, I'm on an Apple TV 4K and the server is running with docker on a Raspberry Pi 3.

danieldabate commented 2 months ago

Same happening to me on an LG TV with WebOS

reidab commented 1 month ago

The upstream fix made to pyytlounge in https://github.com/FabioGNR/pyytlounge/pull/6 was released in pyytlounge 1.7.0, the workaround in this project was removed in the 2.0.5 release via https://github.com/dmunozv04/iSponsorBlockTV/commit/f4fbbcdff5d8e894998b17ba4526b962a07dd952, but requirements.txt for this project is still locked to pyytlounge==1.6.3.

I think bumping the dependency version for pyytlounge to 1.7.0 should solve the issue.

dmunozv04 commented 1 month ago

Whoops, that’s my bad. Thanks for catching it. I’ll get a new release published soon

danieldabate commented 1 month ago

Good catch! I can confirm this fixes the issue! I just tested it locally. Was going to submit a PR, but will wait for you @dmunozv04

dmunozv04 commented 1 month ago

It looks like I had already made a commit to a different branch to update the dependency, but just forgot to merge it