FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: Error: YouTube has blocked your IP address from watching videos. Please try switching to a differente VPN or proxy.

Open AlfaScarlate opened this issue 8 months ago • 92 comments

Guidelines

Describe the bug

I was watching videos normally and then these warnings came up and everything stopped:

  • Local API Error (Click to copy): Error: YouTube has blocked your IP address from watching videos. Please try switching to a differente VPN or proxy.

  • Falling back to Invidious API

  • Local API Error (Click to copy): Error: YouTube has blocked your IP address from watching videos. Please try switching to a differente VPN or proxy.

  • SyntaxError: Unexpected token 'T', "The reques"... is not valid JSON

I also tried using Proton VPN but no luck, it still says it's my ip is blocked. However, briefly opening a YT tab on a web browser and playing some random videos and then selecting a video on FreeTube seems to briefly solve this playback problem. Though it comes back every now and then even with YT playing on background.

Expected Behavior

Thats not supposed to work like that right?

Issue Labels

API issue

FreeTube Version

v0.23.3 beta

Operating System Version

Windows 10 pro 22H2 (19045)

Installation Method

.exe

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

v0.23.3 beta

Additional Information

No response

Nightly Build

AlfaScarlate avatar Apr 06 '25 23:04 AlfaScarlate

Update/comment: oddly, I've noticed during these past few weeks that the Freetube app, while playing videos, sometimes restarts the video and/or just jumps to an Invidious API instance or something to play videos even if i haven't set up invidious. Weird. but i hope this comment helps.

AlfaScarlate avatar Apr 07 '25 01:04 AlfaScarlate

Update/comment: oddly, I've noticed during these past few weeks that the Freetube app, while playing videos, sometimes restarts the video and/or just jumps to an Invidious API instance or something to play videos even if i haven't set up invidious. Weird. but i hope this comment helps.

When you have backend fallback enabled in the settings it is expected behaviour that FreeTube will attempt to use an Invidious instance if the local API errors and vice-versa. That setting is enabled by default and has been there for years.

absidue avatar Apr 07 '25 04:04 absidue

Update/comment: oddly, I've noticed during these past few weeks that the Freetube app, while playing videos, sometimes restarts the video and/or just jumps to an Invidious API instance or something to play videos even if i haven't set up invidious. Weird. but i hope this comment helps.

When you have backend fallback enabled in the settings it is expected behaviour that FreeTube will attempt to use an Invidious instance if the local API errors and vice-versa. That setting is enabled by default and has been there for years.

didnt know that, i'm just an average user

AlfaScarlate avatar Apr 07 '25 19:04 AlfaScarlate

Update:

  • Sometimes restarting the device (notebook/PC) allows the video to play, but it stops when changing videos.
  • oddly, some videos, mostly old videos (~ 1 month old) play better than newer videos whenever i exit a video and change to another. but being able to keep watching is very inconsistent behavior.

AlfaScarlate avatar Apr 07 '25 19:04 AlfaScarlate

I had a same experience before, and when I open an embed, I got an error message that says Sign in to confirm you're not a bot. This helps protect our community. Edit: I'm experiencing it right now Edit 2: I turned off my Wi-Fi and waited 10 seconds and turned it back on and now everything is working fine for me. Edit 3: It is happening to me right now (AGAIN) Even without VPN Edit 4: I used Urban VPN and switched my Location to Canada, and I no longer get the error message Edit 5: I turned off my VPN after 15 minutes, and the error message went away. Edit 6: After my computer updated, the message came back, so I had to turn on my VPN on Again.

liammcsh2008 avatar Apr 07 '25 22:04 liammcsh2008

I've also run into this 'feature' just now. Rebooting my router that resulted in getting a different IP address helped - for now.

karolyi avatar Apr 08 '25 21:04 karolyi

Under Ubuntu I was a little bit less lucky and just got :

SyntaxError: Unexpected token 'A', "API disabled" is not valid JSON

The error is not informative at all, but at least reading this thread I was able to realize my IP was indeed blocked.

I had to change the VPN server several times and struggle about 10mn before it worked, but in the end it did work... So it does look more like a VPN issue rather than a Freetube issue.

This being said I had the impression that my changes of VPN servers were more sucessful when, before the switch, I turned off Freetube and cleared the cache with

rm -rvf .config/Freetube

Complete list of locations for different systems was available at https://docs.freetubeapp.io/usage/data-location/

I had the impression that it helped, but I'm not sure. Maybe it was just due to luck.

Anyway, I think the issue should be re-labelled as enhancement or feature-request rather than bug :

  • If someone can confirm that turning off/on and clearing the cache does help when switching VPN then it could be made smoother/automatically for the user
  • At the very least the message could try to be more informative and suggest a VPN switch or IP-blocking issue (but I guess there's also a cat and mouse problem with Youtube here)

EDIT : In any way, thanks to the devs for maintaining this software, you guys are doing great, keep up the good job :)

gldlv avatar Apr 09 '25 09:04 gldlv

SyntaxError: Unexpected token 'A', "API disabled" is not valid JSON

So it does look more like a VPN issue rather than a Freetube issue.

No. I get the same error without any VPN. It's definitely a bug.

lemurchalk avatar Apr 10 '25 03:04 lemurchalk

Restarted PC. Opened YouTube and played a random video like someone else mentioned and it fixed the issue in FreeTube.

Android789515 avatar Apr 11 '25 01:04 Android789515

I've had most of the errors listed here for at least a few days. "Launch In Invidious" works fine with all vids. Swapping my VPN around the US sometimes works but doesn't last any more than 3 or 4. Set my VPN to Canada and it works like a champ. Looks like YT is monkeying with the US connections specifically.

EyeOnCloud9 avatar Apr 11 '25 06:04 EyeOnCloud9

I too ran into this issue while switching from a Final Fantasy VII walkthrough vid, to watch a gaming monitor review; I played a vid on YT and restarted as others have mentioned, and it seems to be working again for now. I guess I might have to get a vpn if YT keeps trying to block IPs. Also thank you all for all that you do, hopefully non-crypto donations are allowed again one day, as I can only dream of owning crypto let alone actually having any to use.

SJRouge91 avatar Apr 11 '25 07:04 SJRouge91

I get the message:

YouTube has blocked your IP address from watching videos. Please try switching to a different VPN or proxy.

but in fact my IP is NOT blocked. Because I can play those videos in Firefox in YouTube directly. This message just popped up for the first time and I was watching videos a half an hour before. So this message is 100% wrong, because YouTube did not block my IP address. Note: I do not use any VPN and FreeTube is set to Local API, because Invidious doesn't work for me.

thingsiplay avatar Apr 11 '25 10:04 thingsiplay

but in fact my IP is NOT blocked. Because I can play those videos in Firefox in YouTube directly. ... So this message is 100% wrong

Maybe somewhere between right and wrong. When I've received the same message in FreeTube, I've found that a logged in browser can view YT normally, but one that is not logged in receives a message telling me to log in to prove I'm not a bot, after which that browser can then view videos normally.

So it does look like I/you am/are blocked, but only when not logged in.

derkommutator avatar Apr 11 '25 10:04 derkommutator

Don't want to spam up this issue, but when I was getting this error, I've tried if yt-dlp has the same problems downloading videos, and it did. It said I should login in a browser and then save the cookies and let yt-dlp use them.

When I went to a browser (incognito mode of course), yt wanted me to log in. I rather switched IPs (restarted my router), and it worked afterwards.

If anything, youtube is cracking down on viewers who don't log in.

karolyi avatar Apr 11 '25 10:04 karolyi

Set my VPN to Canada and it works like a champ. Looks like YT is monkeying with the US connections specifically.

Nope, I'm in the same situation as the rest of this issue, with a Canadian IP (bareback, not VPN). Can watch logged-in, incognito demands sign-in, and Freetube gives the ban error.

anonymous721 avatar Apr 11 '25 17:04 anonymous721

SyntaxError: Unexpected token 'A', "API disabled" is not valid JSON

This isnt a bug. Please dont comment about it. You're using an Invidious instance that has their API disabled.

Image

I've found that a logged in browser can view YT normally,

FreeTube is the same experience as YT logged out state. Please dont compare it to logged in.

but one that is not logged in receives a message telling me to log in to prove I'm not a bot, after which that browser can then view videos normally.

All the errors everybody's getting is IP and cookie based. On a fresh browser session you need to prove to YouTube that you're not a bot and complete captcha's. YT normally would use your cookies and other tracking mechanisms in addition to the IP address therefore you wont see this often in the browser. FreeTube avoids sending unique identifiers to YT which is why many receive errors.

Temporary workaround, for the best viewing experience I recommend doing one of the following things:

1:

  • Open video using Embed of your choice. Go to the video you would like to watch -> Click on the share button underneath the player -> Open Embed

[!WARNING] The following option is only intended for advanced users. Setup instructions vary depending on the external player used. Please refer to the official documentation, user manual, or relevant forums for your specific player to configure YouTube playback. Support for this feature is not available, but you can visit our community discussion on Setting up your External Player for YouTube playback for guidance.

2:

  • Open videos using an external player of your choice. Go to Settings -> External Player to set it up.

experiencing this issue as well, started with just 1 or 2 videos, its now every video, and randomly seems to decide to start working, i am not running a vpn while using freetube.

mcmtaged4 avatar Apr 11 '25 23:04 mcmtaged4

I guess I might have to get a vpn if YT keeps trying to block IPs.

YT is not blocking IP's . At least not mine, because youtube.com in a browser works fine. It's just Freetube that's broken.

lemurchalk avatar Apr 12 '25 02:04 lemurchalk

FreeTube avoids sending unique identifiers to YT which is why many receive errors.

so in other words it's useless now. Good to know.

  • Keep trying different VPN servers.

No. Not buying more subscriptions just to use FT.

  • Open videos using an external player of your choice.... Open video using Embed of your choice.

So there's no point of having FT

lemurchalk avatar Apr 12 '25 02:04 lemurchalk

so in other words it's useless now. Good to know.

I notice that you have made no code submissions yourself to Freetube that could help with this problem or improve it in other ways.

You are certainly free to fork the source code and create your own improved version of Freetube if you feel that the development team isn't trying hard enough to satisfy you.

derkommutator avatar Apr 12 '25 07:04 derkommutator

Hi all could you try this nightly build and report back if the issue is resolved

Hi all could you try this nightly build and report back if the issue is resolved

tried video 1 from playlist- worked. Next video 2 - "Audio formats are not available for this video", and it stopped playing Skipped to video 3 in line - I had to press play but it worked Restarted the video 2 with "play previous video"- back to normal Skipped to the end and waited for the video to change to 3 - played normally

I think it fixed the problem because i skipped to about other 10 videos and got no warnings whatsoever so far. I'll give an update if it does come back. edit: i had to delete the hashtag from the vido number bc it was referencig github threads

AlfaScarlate avatar Apr 21 '25 00:04 AlfaScarlate

Hi all could you try this nightly build and report back if the issue is resolved

i installed this version on my windows 10 laptop, and put on a music playlist. before this update after about 7 or 8 songs id get the ip block message. With new build I'm on song 35 now, zero issues. ive gone to search and play different videos in between an everything has worked perfectly. you have my thanks for the fix!

fernandescristo avatar Apr 21 '25 00:04 fernandescristo

Hi all could you try this nightly build and report back if the issue is resolved

i installed this version on my windows 10 laptop, and put on a music playlist. before this update after about 7 or 8 songs id get the ip block message. With new build I'm on song 35 now, zero issues. ive gone to search and play different videos in between an everything has worked perfectly. you have my thanks for the fix!

i have gotten ip block again now after about 3 hours of videos

fernandescristo avatar Apr 21 '25 03:04 fernandescristo

I downloaded and installed freetube-0.23.3-nightly-5921 after getting the ip-block message. I still get the ip-block message. I opened a browser and tried the same url, and yt says 'Sign in to confirm you're not a bot'.

rich-coe avatar Apr 22 '25 10:04 rich-coe

I don't understand how it can be IP blocking. I can open the same video in a private browsing window (not logged in), and it plays perfectly. No VPN or anything. Same video in FT .... nothing. Youtube just KNOWS when you are using FT.

No change with nightly-5902 for me.

lemurchalk avatar Apr 22 '25 18:04 lemurchalk

I've tried the nightly, didn't work. I'm behind a CGNAT now so probably this IP via which I'm visible to the outside, is more than rate limited.

On the other hand, using a librewolf private window with ublock origin enabled loads the videos, after a couple automatic page reload.

karolyi avatar Apr 22 '25 19:04 karolyi

Hi all could you try this nightly build and report back if the issue is resolved

I am getting BAD_HTTP_STATUS: 403 errors, as I was prior to implementing the nightly build.

zombiemimic avatar Apr 22 '25 19:04 zombiemimic