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

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

Comments

@unnamed25
Copy link

unnamed25 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/

For Invidious instance maintainers:

Please read this comment for a temporary solution: #3822 (comment)

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>
@unnamed25 unnamed25 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.

@unixfox unixfox pinned this issue May 27, 2023
unixfox added a commit to iv-org/documentation that referenced this issue May 28, 2023
@unixfox unixfox added the type:youtube-change Google changed something (again) label May 31, 2023
@unnamed25

This comment was marked as outdated.

@lo-kiss

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
@trentwiles

This comment was marked as off-topic.

@trentwiles

This comment was marked as off-topic.

@ddvarpdd

This comment was marked as off-topic.

@Daxy7

This comment was marked as duplicate.

@ccuser44

This comment was marked as duplicate.

@marcussacana

This comment was marked as duplicate.

@Veeno

This comment has been hidden.

@tempname1024

This comment was marked as off-topic.

@trentwiles

This comment was marked as off-topic.

@tempname1024

This comment was marked as off-topic.

@notpushkin

This comment was marked as off-topic.

@ccuser44

This comment was marked as off-topic.

@unixfox
Copy link
Member

unixfox commented Jun 13, 2023

I have created a separate issue for freely discussing how to circumvent the current blockage: #3915.

This way people subscribed in this issue will not be "spammed" and we can keep this issue for tracking the new ways to really solve the original issue, not temporary workarounds.

Please refrain from talking about temporary workarounds here and use #3915 instead. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working type:youtube-change Google changed something (again)
Projects
None yet
Development

No branches or pull requests