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]: Invidious video proxing IP blocks #3892

Open
6 tasks done
rjdg14 opened this issue Aug 17, 2023 · 35 comments
Open
6 tasks done

[Bug]: Invidious video proxing IP blocks #3892

rjdg14 opened this issue Aug 17, 2023 · 35 comments
Labels
B: API issue B: content not loading bug Something isn't working third-party Related to third-party logic
Projects

Comments

@rjdg14
Copy link

rjdg14 commented Aug 17, 2023

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have encountered this bug in the official downloads of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

1: Click on any video using either the Local or Invidious APIs
2: You will see the message "NotSupportedError: Failed to load because no supported source was found" as the video page loads
3: The video loading will infinitely hang and you will remain stuck on the thumbnail

Expected Behavior

Clicking on most videos should result in normal playback after a short buffer period.

Issue Labels

API issue, content not loading

FreeTube Version

v0.18.0-nightly-3257 Beta

Operating System Version

Windows 10 Pro 22H2 19045.3324

Installation Method

.zip

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

The previous Nightly build I tested (3220) initially worked fine but developed this issue. Upgrading to a newer nightly build did not fix the problem.

Additional Information

The exact same problem appears to occur with both the Local and Invidious APIs, suggesting that this may be a bug in Freetube's code as opposed to an issue with either the YouTube or Invidious APIs. At the same time, the previous nightly build of Freetube (3220) that I downloaded worked fine until a couple of days ago.

Nightly Build

@rjdg14 rjdg14 added the bug Something isn't working label Aug 17, 2023
@FreeTubeBot FreeTubeBot added this to To assign in Bug Reports Aug 17, 2023
@absidue
Copy link
Member

absidue commented Aug 17, 2023

Disable the setting to proxy the video through Invidious, it's in the player settings.

@rjdg14
Copy link
Author

rjdg14 commented Aug 17, 2023

Disable the setting to proxy the video through Invidious, it's in the player settings.

That seems to have fixed it. Is this currently a bug/API issue that is yet to be fixed?

@absidue
Copy link
Member

absidue commented Aug 17, 2023

YouTube is IP blocking server IPs (Invidious, Piped and people running yt-dlp on servers are affected) on the video streaming endpoints.

Relevant Invidious issue: iv-org/invidious#4045

@absidue absidue added the third-party Related to third-party logic label Aug 17, 2023
@absidue absidue changed the title [Bug]: Getting "NotSupportedError: Failed to load because no supported source was found" on all videos with latest nightly builds [Bug]: Invidious video proxing IP blocks Aug 17, 2023
@rjdg14
Copy link
Author

rjdg14 commented Aug 17, 2023

YouTube is IP blocking server IPs (Invidious, Piped and people running yt-dlp on servers are affected) on the video streaming endpoints.

Relevant Invidious issue: iv-org/invidious#4045

It's most likely related to the recent legal action they threatened to take against Invidious (I read about this on Vice a few weeks back). I'd imagine that they have since realised that they are unable to take legal action against the project due to it being little more than a proxy, but they can probably find alternate means such as IP blocking to make it harder to use.

I tried loading various videos on an Invidious domain and they loaded fine on it.

Invidious was previously the main workaround for accessing age restricted YouTube videos without having to either verify your age in Europe/Australia (which I have already done on my Google account) or having to see a content warning every time you wanted to watch such a video (which was what put me off watching them on YouTube). In the past FreeTube would not load these videos via the Local API following changes Google made to their API in either 2020 or 2021, but now seems to be able to do so fine. It's possible that FreeTube is now taking the NewPipe approach and authenticating them through YouTube by proxying videos through an age verified Google account.

Interestingly turning off the "Proxy through Invidious" option seems to have sped up the load time for all videos compared to previously, which makes me wonder if the Invidious connection was being throttled previously. FreeTube loaded videos quickly when I first began using it in about 2020, although I don't know if it was proxying them through Invidious at that point.

@absidue
Copy link
Member

absidue commented Aug 17, 2023

No the legal action is unrelated, if it were, they would be targeting just Invidious.
It's very easy for YouTube to detect and IP block servers that are using massive amounts of bandwidth on the video streaming endpoints.

Invidious doesn't proxy by default (neither does FreeTube) but if you enable proxying on either you get the issue, Piped on the other hand always proxies so they are completely unusable for streaming at the moment.

Neither FreeTube nor NewPipe nor Invidious use a Google account to bypass age restrictions, there is a workaround that works without needing an account, it just wasn't implemented in FreeTube before (in the nightlies since January, we are waiting on a release for an important dependency to fix some bugs before we do the 0.19.0 release candidate).

@rjdg14
Copy link
Author

rjdg14 commented Aug 17, 2023

No the legal action is unrelated, if it were, they would be targeting just Invidious. It's very easy for YouTube to detect and IP block servers that are using massive amounts of bandwidth on the video streaming endpoints.

Invidious doesn't proxy by default (neither does FreeTube) but if you enable proxying on either you get the issue, Piped on the other hand always proxies so they are completely unusable for streaming at the moment.

Neither FreeTube nor NewPipe nor Invidious use a Google account to bypass age restrictions, there is a workaround that works without needing an account, it just wasn't implemented in FreeTube before (in the nightlies since January, we are waiting on a release for an important dependency to fix some bugs before we do the 0.19.0 release candidate).

YouTube still seems to work fine via a VPN (I've just tested it from the UK with a US VPN via Windscribe in Firefox), which will unblock georestricted videos. I'd imagine Google are differentiating between public IP servers that get lots of regular web traffic (there are a few sites such as RateYourMusic that will display an "IP Blocked" message when used through most VPNs) and servers that are almost exclusively being used to channel YouTube traffic.

I think the action being taken by Google (and other similar services like Reddit) against proxies may be related to the rise of large AI models, of which some affiliated bots have been known to consume very large amounts of bandwidth.

@absidue
Copy link
Member

absidue commented Aug 17, 2023

There is a big difference between, you watching a few videos on a VPN vs Invidious and Piped instances that use 100s of terabytes of bandwidth a month proxing video.

@thisguy786
Copy link

I am not sure this is an issue between YT and Invidious.

The Invidious videos play fine if you go to the same Invidious instance. They only don't play in Freetube.

@absidue
Copy link
Member

absidue commented Sep 1, 2023

@thisguy786 FreeTube doesn't proxy the video through Invidious servers by default, neither does Invidious, you need to explicitly enable the setting in both for it to happen.

Some Invidious instances are frequently changing their IP addresses to try and avoid the YouTube's IP bans. The same instances that work with proxying enabled in your browser, will also work with proxying enabled in FreeTube.

@CrazzzzyChipmunk
Copy link

As I see, there is no such issue in FreeTube v0.18.0 Beta: videos are always played normally. And I encounter this issue only in the new FreeTube v0.19.x with the same Invidious instance: videos are not played.

By the way, this is the only reason I still have to use the old version of FreeTube.

@absidue
Copy link
Member

absidue commented Sep 8, 2023

@CrazzzzyChipmunk What is your preferred backend and have you enabled proxying videos through Invidious?

@CrazzzzyChipmunk
Copy link

CrazzzzyChipmunk commented Sep 8, 2023

@absidue ,

What is your preferred backend

Preferred API Backend: Local API
But (almost always or, may be, always) I get the messages (FreeTube v0.18.0):

  • Local API Error (Click to copy): SyntaxError: Invalid or unexpected token
  • Falling back to Invidious API

And then videos are played normally.

have you enabled proxying videos through Invidious?

YES!!!
Player Settings \ Proxy Videos Through Invidious: On (FreeTube v0.18.0)

The new FreeTube v0.19.0 does not play videos with the same settings.

@absidue
Copy link
Member

absidue commented Sep 8, 2023

Does the syntax error disappear when you disable proxying?

@CrazzzzyChipmunk
Copy link

CrazzzzyChipmunk commented Sep 9, 2023

@absidue,

Does the syntax error disappear when you disable proxying?

No. When Proxy Videos Through Invidious: Off (FreeTube v0.18.0) the same two error messages are displayed and then videos are played normally.


For the new FreeTube version (v0.19.0), if I DISABLE proxying, videos are displayed. But I don't want to use a version of FreeTube, which does not work via Invidious.

@absidue
Copy link
Member

absidue commented Sep 9, 2023

I misread and thought the errors were in 0.19.0, glad to know they aren't and it really just is proxying that has a problem.

As for 0.18.0 feel free to use it if you really want to, but just know that it will just keep breaking more and more, with YouTube changes as it is already 10 months old. Please don't open any bug reports for any problems you face on 0.18.0 that don't exist on 0.19.0.

Ironically with your choice of using 0.18.0, only DASH gets proxied, audio only and legacy don't.

@CrazzzzyChipmunk
Copy link

CrazzzzyChipmunk commented Sep 9, 2023

@absidue,
You, may be, don't understand what I described. I did not open reports about old version, I told a about problem in the NEW one (v0.19.0). And I want you know that OLD version can work through proxy but the new one can not. The issue is NOT in the old v0.18.x, but in the new one!

As well as the Invidious always plays videos normally when its site is open in a browser:
FreeTube ▶ Copy Invidious Link ▶ Open the link in my browser

This problem (when videos are not played), as I see, exist only on the new FreeTube app (0.19.0).


Summary:

Works in FreeTube v0.18.0: YES
Works In a browser: YES
Works In FreeTube v0.19.0: NO <--- fix it, please

@sol8712
Copy link

sol8712 commented Sep 28, 2023

Still getting this issue on most music related videos on the latest nightly 3505 either with proxy enabled or not.

@absidue
Copy link
Member

absidue commented Oct 10, 2023

@sol8712 Switching the preferred API backend to the local API should fix that (as long as video proxying is disabled), according to issues on the Invidious GitHub repo, music videos are broken on Invidious.
e.g. iv-org/invidious#4045 (comment)

@absidue
Copy link
Member

absidue commented Oct 10, 2023

@CrazzzzyChipmunk Which formats are you using in FreeTube (DASH, legacy or audio) and Invidious (DASH, HD720, Medium or Small)?

@CrazzzzyChipmunk
Copy link

CrazzzzyChipmunk commented Oct 10, 2023

Which formats are you using in FreeTube (DASH, legacy or audio) and Invidious (DASH, HD720, Medium or Small)?

I use in FreeTube:

  • Settings | Player Settings | Default Video Format: DASH Formats
  • Settings | Player Settings | Default Quality: 720p

I use in an Invidious Instance (in a browser):

  • ⚙️: hd720

@absidue
Copy link
Member

absidue commented Oct 10, 2023

hd720 on Invidious is the equivalent of legacy 720p in FreeTube.

@CrazzzzyChipmunk
Copy link

@absidue, you told before:

Ironically with your choice of using 0.18.0, only DASH gets proxied, audio only and legacy don't.

Do you mean that FreeTube does NOT use proxy while playing videos with these settings?

  • Settings | Player Settings | Default Video Format: DASH Formats
  • Settings | Player Settings | Default Quality: 720p

@absidue
Copy link
Member

absidue commented Oct 10, 2023

DASH gets proxied so with those settings it will get proxied. To use DASH 720p on the Invidious website you need to set it to DASH and then in their separate DASH quality drop down select 720p.

@CrazzzzyChipmunk
Copy link

CrazzzzyChipmunk commented Oct 10, 2023

DASH gets proxied so with those settings it will get proxied. To use DASH 720p on the Invidious website you need to set it to DASH and then in their separate DASH quality drop down select 720p.

(!!!) @absidue, I just now tried explicitly use DASH 720p on the Invidious website and videos are NOT played (on Invidious websites). I tried for several Instances and in two browsers (Chrome and Firefox). But videos with these settings are still played normally in the PREVIOUS (old) version of FreeTube.

Because of this I asked you before, does the PREVIOUS (old) version FreeTube ACTUALLY use proxy or it implicitly switches to direct youtube servers?

@absidue
Copy link
Member

absidue commented Oct 10, 2023

FreeTube only proxies when you have the setting enabled. When it is enabled both the local API and Invidious API streams will get proxied, when that setting is disabled, nothing is proxied, regardless of the selected API backend.

Newer versions of FreeTube can proxy all 3 formats: DASH, audio and legacy (just checked the code), 0.18.0 can only proxy DASh though.

The Invidious website cannot play DASH without proxying (browser limitation, CORS headers). FreeTube bypasses that limitation so it can play stuff without

@absidue
Copy link
Member

absidue commented Oct 10, 2023

I do know that some Invidious instances have had trouble in the past where they haven't returned proper proxied DASH URLs, so it is entirely possible that the only reason it worked on 0.18.0 is that FreeTube was trusting Invidious to return proxied URLs when we asked it to, but that they weren't. 0.19.0 stopped trusting Invidious and instead "force" proxied the URLs when Invidious failed to do it.

0.19.1 generates the DASH manifest inside FreeTube based on information in the Invidious API response, so that we can support multiple audio tracks when the Invidious API is selected, even though Invidious doesn't support it yet, but the information is there, so we can use it.

If you haven't tried the 0.19.1 version of FreeTube yet, I recommend you do. Proxying won't work properly because Invidious instances are either IP blocked and the ones that aren't, are getting throttled (they have a pull request open on their GitHub to fix the throttling but they haven't merged it yet) but the code on the FreeTube side is correct. So if you setup your own Invidious instance with their fix, proxying should work through your instance.

Copy link
Contributor

github-actions bot commented Dec 4, 2023

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link
Contributor

github-actions bot commented Jan 3, 2024

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@treker7
Copy link

treker7 commented Jan 20, 2024

I think I'm seeing this same issue on the latest version of FreeTube - v0.19.1 Beta
This video will not load either through the Local API or through Invideus - https://youtu.be/c5NBimSuVOM
The error is - NotSupportedError: Failed to load because no supported source was found.
Full console logs attached.
-1705789784295.log
-1705789725576.log

@absidue
Copy link
Member

absidue commented Jan 21, 2024

@treker7 According to the logs, the calls to YouTube's servers timed out, so this is unrelated and either caused by something blocking the connection or you using some really slow VPN or proxy (e.g. tor).

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@NathanMott
Copy link

I have been able to replicate this issue on v0.20.0 Beta with the below settings. If i switch Preferred API to local then it works fine. My question is why does the "Fallback to Non-Preferred Backend on Failure" not apply to this case?

Preferred API Backend: Invidious API
Fallback to Non-Preferred Backend on Failure: Enabled
invidious default instance: https://vid.puffyan.us
Default Video Format: DASH
Default Quality: 1080p
Allow DASH AV1 formats: enabled
Proxy Videos Through Invidious: Disabled

Copy link
Contributor

github-actions bot commented May 8, 2024

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@codenyte
Copy link

codenyte commented May 8, 2024

I think this issue can be closed. FreeTube has nothing to do with Invidious instances getting blocked, just make sure to use an instance that has IPv6 address rotation set up. An example of this is iv.datura.network, I never had any issues with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B: API issue B: content not loading bug Something isn't working third-party Related to third-party logic
Projects
Bug Reports
To assign
Development

No branches or pull requests

9 participants