Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Youtube channels are broken #195

Closed
LivingWithHippos opened this issue Mar 4, 2021 · 3 comments
Closed

Youtube channels are broken #195

LivingWithHippos opened this issue Mar 4, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@LivingWithHippos
Copy link

Describe the bug
Opening a youtube channel returns an 500 error page with Yotter

To Reproduce
Steps to reproduce the behavior:

  1. Do a search or open your Yotter Youtube feed
  2. Press on a channel link
  3. An error page is shown

Expected behavior
The channel page with all the available videos open. It worked fine until a couple of weeks ago I think.

Desktop (please complete the following information):

  • OS: manjaro linux
  • Browser: firefox
  • Version: any

Additional context

It is my own self hosted instance. The relevant docker log is this:

ERROR in app: Exception on /c/UCr6Ojg6WA9Lk-ynphZE9gtg [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/usr/src/app/app/routes.py", line 432, in channel
    data = ytch.get_channel_tab_info(id, page, sort)
  File "/usr/src/app/youtube/channel.py", line 123, in get_channel_tab_info
    content = util.fetch_url(url,
  File "/usr/src/app/youtube/util.py", line 178, in fetch_url
    raise FetchError(str(response.status), reason=response.reason, ip=None)
youtube.util.FetchError: HTTP error during request: 404 Not Found

THe browser shows a 500 Internal Server Error network call. I can watch videos normally.

@LivingWithHippos LivingWithHippos added the bug Something isn't working label Mar 4, 2021
@pluja
Copy link
Member

pluja commented Mar 5, 2021

Thank you, I will try to dig into this this weekend!

@user234683
Copy link

Fixed in these two commits:

The second one is applying the same fix to the channel search since I forgot to test that in the first one. Prerequisite bug fix for util.fetch_url to fix post requests:

Also recommended:

I also did these two commits so the first page for channel videos will use the generic first-page request type, which is less likely to change, so if they keep changing the APIs at least the first page of channels won't break. Not strictly necessary but increases resilience:

Second one is a fix to an issue caused by the first one. I didn't test thoroughly so I missed stuff sometimes.

Relevant invidious issue

@pluja pluja closed this as completed in d0aa476 Mar 12, 2021
@pluja
Copy link
Member

pluja commented Mar 12, 2021

This should be fixed now! Thanks to @user234683!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants