Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance IP blocked by Youtube and ipv6-rotator not working on individous_ynh instance #155

Open
themancalledjakob opened this issue Apr 12, 2024 · 1 comment

Comments

@themancalledjakob
Copy link

How to post a meaningful bug report

  1. Read this whole template first.
  2. Determine if you are on the right place:
    • If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!
    • Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.
    • When in doubt, post here and we will figure it out together.
  3. Delete the italic comments as you write over them below, and remove this guide.

Describe the bug

When opening a video url either through direct link or via the interface, I see this:

It looks like you found a bug in Invidious!

Before reporting a bug, make sure that you have:

tried to [refresh the page](https://tube.computermachin.es/watch?v=UnBVCoVDDPE)
tried to [use another instance](https://redirect.invidious.io/watch?v=UnBVCoVDDPE)
read the [Frequently Asked Questions (FAQ)](https://github.com/iv-org/documentation/blob/master/docs/faq.md)
searched for [existing issues on GitHub](https://github.com/iv-org/invidious/issues)

If none of the above helped, please open a new issue on GitHub (preferably in English) and include the following text in your message (do NOT translate that text):

Title: The video returned by YouTube isn't the requested one. (Android client) (VideoNotAvailableException)
Date: 2024-04-12T13:14:39Z
Route: /watch?v=UnBVCoVDDPE
Version: 2024.02.19-e8a36985 @ master

Backtrace

The video returned by YouTube isn't the requested one. (Android client) (VideoNotAvailableException)
  from src/invidious/videos/parser.cr:154:5 in 'try_fetch_streaming_data'
  from src/invidious/videos/parser.cr:112:10 in 'extract_video_info:video_id'
  from /usr/share/crystal/src/hash.cr:1299:13 in 'fetch_video'
  from src/invidious/videos.cr:379:13 in 'get_video:region'
  from src/invidious/routes/watch.cr:55:15 in 'handle'
  from lib/kemal/src/kemal/route.cr:13:9 in '->'
  from src/invidious/helpers/handlers.cr:30:37 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:94:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from src/ext/kemal_static_file_handler.cr:106:14 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
  from /usr/share/crystal/src/http/server.cr:506:5 in '->'
  from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
  from ???

It seems that the issue is that youtube is blocking instances of invidious.
I stumbled on this discussion: iv-org/invidious#4045

Aparently the block can be mitigated by rotating the ipv6 address, and force resolving on ipv6.

And tried to get this working: https://docs.invidious.io/ipv6-rotator/
However, to no avail..

My attempt:

$ su -
$ vim /var/www/invidious/config/config.yaml # to set force_resolve: ipv6
$ git clone https://github.com/iv-org/smart-ipv6-rotator
$ cd smart-ipv6-rotator
$ python smart-ipv6-rotator.py run --ipv6range=abcd:abcd:abcd:abcd::/64
$ systemctl restart invidious

However, it did not help. I have a suspicion that somehow the yunohost setup needs an extra tweaking, but I have no idea how..

My guess is, that this happens eventually to all invidious instances that do not actively protect against it.

Context

  • Hardware: Old laptop
  • Invidious version: Current version: 2024.02.19-e8a36985 @ master
  • YunoHost version: 11.2.11.2 (stable)
  • I have access to my server: Through SSH & through the webadmin & direct access via keyboard / screen
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
    • If yes, please explain:
  • Using, or trying to install package version/branch:
  • If upgrading, current package version: Installed version: 24.02.12~ynh1

Steps to reproduce

Run the instance for a while, then (if this is the error) Youtube blocks you.

Expected behavior

The instance should keep on working.

Logs

[...]
2024-04-12 13:06:24 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:25 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 1687.93ms
2024-04-12 13:06:26 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:26 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 767.79ms
2024-04-12 13:06:27 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:27 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 829.26ms
2024-04-12 13:06:28 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:28 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 673.35ms
2024-04-12 13:06:28 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:28 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 608.79ms
2024-04-12 13:06:29 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:29 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 828.08ms
2024-04-12 13:06:30 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:30 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 817.9ms
2024-04-12 13:06:30 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:30 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 604.86ms
2024-04-12 13:06:30 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:31 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 693.36ms
2024-04-12 13:06:31 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:31 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 772.82ms
2024-04-12 13:06:31 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)
2024-04-12 13:06:32 UTC [info] 500 GET /watch?v=UnBVCoVDDPE 605.45ms
[production] Invidious is ready to lead at http://127.0.0.1:28302
2024-04-12 13:10:56 UTC [info] jobs: running ClearExpiredItems job
2024-04-12 13:10:56 UTC [info] jobs: ClearExpiredItems done.
2024-04-12 13:14:39 UTC [error] get_video: UnBVCoVDDPE : The video returned by YouTube isn't the requested one. (Android client)

Any help is greatly appreciated. I just shared my instance with a big group of people and suddenly my pants are being pulled down :(
The only solution I see so far is to redirect my domain to another instance until I figured out how to fix this.

@FibreFoX
Copy link

Probably related to this issue: iv-org/invidious#4584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants