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

[Bug] The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException) #3822

Closed
ghost opened this issue May 27, 2023 · 48 comments
Labels
bug Something isn't working type:youtube-change Google changed something (again)

Comments

@ghost
Copy link

ghost commented May 27, 2023

For everyone:

We are fully aware of this issue, please comment only if you have new info to bring on. Please refrain from opening new issues.
YouTube has recently started to care about alternative frontends like Invidious and is trying to block them.
This currently only affects some public Invidious instances, so if you have the resources, we recommend installing Invidious on your own personal computer or server: https://docs.invidious.io/installation/

Otherwise, try to find another working instance from the list: https://instances.invidious.io

For Invidious instance maintainers:

We have officially released a tool that allow to automatically rotate the IPv6 address of your Invidious server: iv-org/smart-ipv6-rotator and thus escape from the YouTube block!

You can follow the detailed tutorial here: docs.invidious.io/ipv6-rotator

If you want to discuss or read for other solutions: #3915


BUG: The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException)

When trying to loading any video on the invidious.vpsburti.com instance, this error is shown:

Title: `The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException)`
Date: `2023-05-27T08:21:28Z`
Route: `/watch?v=Nx-ougrNm50&listen=1`
Version: `2023.05.14-3a54e95 @ master`

<details>
<summary>Backtrace</summary>
<p>

The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException)
  from /usr/share/crystal/src/array.cr:114:31 in 'extract_video_info:video_id'
  from src/invidious/videos.cr:377:10 in 'fetch_video'
  from src/invidious/videos.cr:365:13 in 'get_video:region'
  from src/invidious/routes/watch.cr:63: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:28:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28: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:28:7 in 'call_next'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
  from lib/kemal/src/kemal/init_handler.cr:12:7 in 'process'
  from /usr/share/crystal/src/http/server.cr:500:5 in '->'
  from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
  from ???
</p>
</details>
@ghost ghost added the bug Something isn't working label May 27, 2023
@unixfox unixfox changed the title [Bug] All videos on the invidious.vpsburti.com instance stopped loading. [Bug] The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException) May 27, 2023
@unixfox

This comment was marked as outdated.

@dellasorte

This comment was marked as duplicate.

@unixfox
Copy link
Member

unixfox commented May 27, 2023

You can solve this issue by changing the IP address of your server.

Nowadays, you get IPv6 on most server providers. Try curl -I -6 ipv6.google.com and if you don't get any error, you have ipv6. If not, try to get a new IPv4 address.

If you are on Docker

Very easily solution based on the docker-compose provided in the documentation

Adapt this example docker-compose to your current docker-compose configuration:

version: "3"
services:

  ipv6nat:
    container_name: ipv6nat
    privileged: true
    network_mode: host
    restart: unless-stopped
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock:ro'
      - '/lib/modules:/lib/modules:ro'
    image: robbertkl/ipv6nat

  invidious:
    image: quay.io/invidious/invidious:latest
    # image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
    restart: unless-stopped
    networks:
      - invidious
    ports:
      - "127.0.0.1:3000:3000"
    environment:
      # Please read the following file for a comprehensive list of all available
      # configuration options and their associated syntax:
      # https://github.com/iv-org/invidious/blob/master/config/config.example.yml
      INVIDIOUS_CONFIG: |
        db:
          dbname: invidious
          user: kemal
          password: kemal
          host: invidious-db
          port: 5432
        check_tables: true
        # external_port:
        # domain:
        # https_only: false
        # statistics_enabled: false
    healthcheck:
      test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
      interval: 30s
      timeout: 5s
      retries: 2
    logging:
      options:
        max-size: "1G"
        max-file: "4"
    depends_on:
      - invidious-db

  invidious-db:
    image: docker.io/library/postgres:14
    restart: unless-stopped
    networks:
      - invidious
    volumes:
      - postgresdata:/var/lib/postgresql/data
      - ./config/sql:/config/sql
      - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
    environment:
      POSTGRES_DB: invidious
      POSTGRES_USER: kemal
      POSTGRES_PASSWORD: kemal
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]

volumes:
  postgresdata:

networks:
  invidious:
    name: invidious
    enable_ipv6: true
    ipam:
      config:
        - subnet: fd00:dead:beec::/48

The major changes are networks:, adding invidious and invidious-db to the invidious network and adding the service ipv6nat.

Then if execute this command and if you get a ping reply then everything is working fine:

docker compose exec -u root invidious ping -c 2 ipv6.google.com

The downside of this option is that you are running a separate service in privileged mode, and this is not great for security. If possible, I would recommend following the official documentation below.

Or the official way using the Docker documentation for IPv6

Or you can also take a look at the official Docker documentation for IPv6, which explains the official way to configure IPv6 on Docker:

Not on Docker

If you already have IPv6, then you can try to use IPv4 by switching this parameter in the config.yml (found here):

force_resolve: ipv4

Or try the tips below about ipv6.

Apply for both Docker and not Docker

If you can replicate the issue again on IPv6, try to add a new IPv6 address. Use ip a and check if your IPv6 address doesn't end with /128 then you are in luck.
You can then try to add a new IPv6 address using this tutorial: https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ch06s02.html. All you want to do is to change just a number or a letter, example:

2001:0db8:0:f101::1/64 to 2001:0db8:0:f101::2/64

Or you can try to switch back to IPv4 by switching this parameter in the config.yml (found here):

force_resolve: ipv4

@unixfox
Copy link
Member

unixfox commented May 27, 2023

After a bit more dinging into the issue, I've found that even on the official www.youtube.com website you get the error:

I'm not sure if it's an error on their side or a way to "shadow ban" an IP address. For now I don't have a solution except using another IP address like described above.

@ghost

This comment was marked as outdated.

@lo2dev

This comment was marked as duplicate.

@Ashirg-ch
Copy link
Contributor

Not sure if this is related, but https://yewtu.be started giving empty videos with "This content is not available", tested on multiple videos from different channels.
2023-06-02 10_54_19-ORDER __ ULTRAKILL - Touhou Remix - Invidious – Mozilla Firefox
https://y.com.sb and https://inv.vern.cc seem affected from the original error.

@unixfox unixfox changed the title [Bug] The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException) [Bug] This content is not available - The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException) Jun 2, 2023
@unixfox
Copy link
Member

unixfox commented Jun 2, 2023

Not sure if this is related, but yewtu.be started giving empty videos with "This content is not available", tested on multiple videos from different channels. 2023-06-02 10_54_19-ORDER __ ULTRAKILL - Touhou Remix - Invidious – Mozilla Firefox y.com.sb and inv.vern.cc seem affected from the original error.

Yes it's related.

I've temporarily fixed the issue on yewtu.be by applying the solution in #3822 (comment), but there is a big probability that the issue will arise again in a few hours.

@Ashirg-ch

This comment was marked as off-topic.

@unixfox

This comment was marked as off-topic.

@gamer191
Copy link

gamer191 commented Jun 2, 2023

@unixfox over on yt-dlp discord, the one user who's getting the new "this content isn't available" video claims to still be able to access youtube in a browser. As such, next time yewtu.be breaks, can you please check whether it can still access youtube in a browser?

@Trit34

This comment was marked as duplicate.

@SamantazFox SamantazFox changed the title [Bug] This content is not available - The video returned by YouTube isn't the requested one. (WEB client) (VideoNotAvailableException) [Bug] The video returned by YouTube isn't the requested one (VideoNotAvailableException) Jun 2, 2023
@unixfox
Copy link
Member

unixfox commented Aug 17, 2023

Closing as youtube is now blocking projects based on it using other methods: #4045

@kurukurukuru
Copy link

kurukurukuru commented Dec 16, 2023

Seems like this is back. Happening on multiple instances, across multiple videos.
This started happening around 2AM EST today. Eventually if I switch instances enough there are a few which are not blocked.

Instances which are blocked:
https://par1.iv.ggtyler.dev/
https://invidious.io.lol/
https://invidious.no-logs.com/
https://yt.cdaut.de
https://vid.priv.au
https://invidious.einfachzocken.eu/
https://onion.tube/
https://yt.oelrichsgarcia.de

Instances which work:
https://invidious.fdn.fr/
https://invidious.lunar.icu
https://invidious.nerdvpn.de
https://inv.us.projectsegfau.lt

@AaronDaOne
Copy link

Instances which are blocked:

Also: https://yewtu.be/

@unixfox
Copy link
Member

unixfox commented Dec 16, 2023

Oops I thought I did setup everything according to the guide that I wrote myself for bypassing youtube but I forgot a parameter lol.
It's fixed, yewtu.be is back.

@MXB2001
Copy link

MXB2001 commented Dec 17, 2023

invidious.private.coffee also blocked
invidious.drgns.space is not blocked

@Quix0r
Copy link

Quix0r commented Dec 17, 2023

At least https://yt.cdaut.de seem to work again (only the popular feed is disabled, maybe due to privacy concerns).

Same with:
https://vid.priv.au
https://invidious.einfachzocken.eu
https://onion.tube

The others mentioned are still blocked.

@unixfox
Copy link
Member

unixfox commented Dec 17, 2023

Yes there is an ongoing effort from me to alert the public instances.

https://github.com/iv-org/documentation/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc

Please only comment if you have something useful to say about the bug itself. Tracking all the working instances is not. We are planning to offer this functionality automatically: iv-org/instances-api#44

@253153
Copy link

253153 commented Dec 18, 2023

Hello, I am the owner of invidious.io.lol, how do I fix this? Please !!

@unixfox
Copy link
Member

unixfox commented Dec 18, 2023

Hello, I am the owner of invidious.io.lol, how do I fix this? Please !!

Follow our tutorial: https://docs.invidious.io/ipv6-rotator

@theAkito

This comment has been minimized.

@emcdarby
Copy link

Oops I thought I did setup everything according to the guide that I wrote myself for bypassing youtube but I forgot a parameter lol. It's fixed, yewtu.be is back.

I was using yewtu.be and again it's not fixed as I'm getting the "Can’t load the video on this Invidious instance. YouTube is currently trying to block Invidious instances. Click here for more info about the issue." error.

@CryptorClub
Copy link

Thank you for guide. Just enable ipv6 on my instance https://y0u.tube

How to enable ipv6 DigitalOcean guide
https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/

@johnpc
Copy link

johnpc commented Mar 30, 2024

This just started affecting my personal instance (I am the only user) within the last couple of days. I tried a handful of public instances as well facing the same issue, even with ipv6

@marcxm
Copy link
Contributor

marcxm commented Mar 30, 2024

@johnpc same here ... since couple of days I am unable to watch videos via self-hosted instance of Invidious. Day or two ago it was possible to view videos by just refreshing web page couple of times, but now it's dead.

@pencilcheck
Copy link

Some instances aren't working now just FYI.

@theAkito

This comment was marked as duplicate.

@Kreuger

This comment was marked as off-topic.

@iAmInActions

This comment was marked as off-topic.

@unixfox
Copy link
Member

unixfox commented Apr 29, 2024

Locking this one because the discussion should happen here now: #4045

@iv-org iv-org locked as spam and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working type:youtube-change Google changed something (again)
Projects
None yet
Development

No branches or pull requests