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]: Both Local and Individuous API don't work. Pulling Null of Video #5534

Closed
5 of 6 tasks
kasselvania opened this issue Aug 6, 2024 · 53 comments · Fixed by #5757
Closed
5 of 6 tasks

[Bug]: Both Local and Individuous API don't work. Pulling Null of Video #5534

kasselvania opened this issue Aug 6, 2024 · 53 comments · Fixed by #5757
Assignees
Labels
B: API issue bug Something isn't working

Comments

@kasselvania
Copy link

kasselvania commented Aug 6, 2024

⚠️ Maintainer edit ⚠️

The cause of the local API error is that you are using a VPN or proxy IP address that is blocked by YouTube. FreeTube needs to display a better error message when that happens but the only way to prevent it happening is to use a different VPN or proxy IP address that isn't blocked.

The Invidious error is caused by Invidious instances getting blocked by YouTube, there is nothing we can do about it on the FreeTube side, you just have to be patient and wait for the Invidious maintainers to find a solution and for the people hosting Invidious instances to implement said solutions.

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

Whenever attempting to open a video, I am greeted by messages that say:

"Local API Error: Type Error: Cannot read properties of null (reading 'reason'). Then, Invidious API error: Error: Missing harsh key "videoDetails"

I cannot get any videos to play
Screenshot 2024-08-06 at 1 42 26 PM

Expected Behavior

I would expect to click the video link and have the video play.

Issue Labels

API issue

FreeTube Version

v0.21.3 Beta

Operating System Version

macOS Sonoma 14.6

Installation Method

.dmg

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

v0.21.1 Beta

Additional Information

No response

Nightly Build

@kasselvania kasselvania added the bug Something isn't working label Aug 6, 2024
@Gorrrg
Copy link

Gorrrg commented Aug 7, 2024

I've found your bugfix:

Last Known Working FreeTube Version (If Any)
v0.21.1 Beta

Change the last line to v0.21.3 beta. 😅

@kasselvania
Copy link
Author

I have actually figured out that my VPN, Private Internet Access, doesn't play well with FreeTube. Can't figure out why.

@qwtoe
Copy link

qwtoe commented Aug 12, 2024

I met the same error

@qwtoe

This comment has been minimized.

@absidue
Copy link
Member

absidue commented Aug 15, 2024

@kasselvania Can you try opening the devtools with Cmd+Shift+I and look at the console tab? Maybe that has more about details about the error messages. Additionally does this happen with every video or only specific ones?

@Ammako
Copy link

Ammako commented Aug 16, 2024

I would assume this is just the same problem invidious is having, with videos not available unless signed in. Newpipe is also affected. but not everybody is stuck with this because it will depend on your IP address, among other things (VPN is more likely to be affected, because so many people share an IP address, youtube is a lot more likely to demand a log in for "verification" reasons.)

PS: copy youtube link for the video, open it in a web browser, and find out that it will require you to log in before you can watch the video here as well.

@kasselvania
Copy link
Author

@kasselvania Can you try opening the devtools with Cmd+Shift+I and look at the console tab? Maybe that has more about details about the error messages. Additionally does this happen with every video or only specific ones?

Honestly? There is no way to tell what kind of video will work, as apposed to others. If I open the developer tools, I see stuff like this screenshot.

Screenshot 2024-08-15 at 7 40 30 PM

@Ammako I will try logging in and see if that corrects my issue! Thanks for the suggestion!

@absidue
Copy link
Member

absidue commented Aug 16, 2024

@Ammako Even if that is the case, I think we can all agree that it would be better to figure out what YouTube returns in that case so that FreeTube can show a proper error message instead of breaking like it does now.

@absidue
Copy link
Member

absidue commented Aug 16, 2024

@kasselvania Interesting, I'm guessing you got a different error messages in the toasts/popups this time (something a long the line of failed to fetch)? So this time it seems like you got a different problem, the last red message says ERR_NAME_NOT_RESOLVED, which means it failed to resolve the DNS name to an IP address or in less technical terms it failed to figure out what IP address (combination of numbers) is associated to www.youtube.com.

Try connecting and disconnecting from your VPN, to solve the problem you got this time. As for the original problem, it seems like that is still somewhat of a mystery.

@kasselvania
Copy link
Author

@absidue i still get the error in the main window like above not pulling Null from the video, and the video stating it’s from Dec 31, 1960, with no data presented. I usually need to quit Freetube, turn off my VPN, and then reopen freetube WITHOUT my VPN for a few videos for it to work again. Then, once it’s running, for a video or two, I can add the VPN back into the mix again. This problem is pretty frequent, though.

@Ammako
Copy link

Ammako commented Aug 16, 2024

Even if that is the case, I think we can all agree that it would be better to figure out what YouTube returns in that case so that FreeTube can show a proper error message instead of breaking like it does now.

It's weird, because piped, invidious, and newpipe all get the clear "Sign in to confirm you're not a bot" error directly. but I guess Freetube handles youtube differently than those three do.

@Victor239
Copy link

Yeah I get this problem consistently when on my VPN also, it falls back to Invidious.

@absidue
Copy link
Member

absidue commented Aug 31, 2024

If someone could capture what the response from YouTube looks like when that error occurs, that would help a lot in trying to figure out what is going on, as I've not been able to reproduce this on various VPN IP addresses.

Here is how you could do that:

  1. Open the developer tools by pressing Ctrl+Shift+I or Command+Shift+I on macOS
  2. Switch to the Network tab
  3. In the text box that says Filter type /player (you won't see any results yet, that will come later)
  4. Open a video (leave the devtools open otherwise they won't capture any data)
  5. After the error occurs take a look at the list in the Network tab, you should see two entries whose names start with player?
  6. Repeat these steps for each of the requests (there should be two)
    • Right click on the request
    • Go to Copy
    • The click on Copy Response
    • Paste the response into a text file.
  7. Upload the files here or if you don't feel comfortable doing that you can also send them to my email address git (at) absidue.me.

@absidue absidue self-assigned this Aug 31, 2024
@EugeneDubuk
Copy link

@absidue
#5534.zip

@absidue
Copy link
Member

absidue commented Sep 1, 2024

Okay so as expected the cause of the error is that you are using a VPN IP address that is blocked by YouTube. FreeTube needs to display a better error message when that happens but the only way to prevent it happening is to use a different VPN IP address that isn't blocked.

@EugeneDubuk
Copy link

How about adding optional login box in Freetube for such cases?

@absidue
Copy link
Member

absidue commented Sep 1, 2024

Firstly that would go against FreeTube's primary goal of being a privacy friendly app and secondly despite the error message suggesting you login, I would really not recommend doing that on a blocked IP even in your web browser unless you want your Google account blocked (people that have tried to use logging in to bypass IP blocks have had their accounts blocked).

@Ammako
Copy link

Ammako commented Sep 1, 2024

(people that have tried to use logging in to bypass IP blocks have had their accounts blocked)

source on people getting their google account blocked for logging in on web/official youtube app from these kind of vpn ips?

@absidue
Copy link
Member

absidue commented Sep 1, 2024

source on people getting their google account blocked for logging in on web/official youtube app from these kind of vpn ips?

I think you may have misinterpreted the message or I wasn't clear enough in my writing.

@Ammako

This comment has been minimized.

@absidue
Copy link
Member

absidue commented Sep 1, 2024

The resolution to this issue will be for FreeTube to show a better error message that explains that you need to change to a new IP address, something along the lines of: "YouTube has blocked the IP address that you are using so you can no longer watch videos on it, if you are using a VPN try changing to a different server in your VPN settings, if you are not using a VPN or a proxy, you will have to start using one"

@Ammako
Copy link

Ammako commented Sep 1, 2024

For those who can't find a working VPN and who really would rather not turn off VPN (or if your home IP is also blocked), I think it's worth suggesting invidious as an alternative in the error message, because most instances have a functional workaround implemented by now.

@Victor239
Copy link

There's currently a setting to Proxy Videos Through Invidious, which overrides API preference. It would be helpful if this could be used as a fallback in case Local API is blocked due to VPN use.

@absidue
Copy link
Member

absidue commented Sep 1, 2024

@Victor239 FreeTube already falls back to the Invidious API if the local API fails and vice versa, as long as you haven't turned off the Fallback to Non-Preferred Backend on Failure setting in the general settings (it's on by default), the Proxy Videos Through Invidious setting is unrelated.

You can see the fallback in action in the screenshot in the description of the issue, they were just unlucky enough to also be using an Invidious instance that was broken which is why it still didn't work even after falling back to the Invidious API.

@Yolakalemowa
Copy link

Local API has developed the same failure on my end, and according to my own investigation, this Local API Error - TypeError: Cannot read properties of null (reading 'reason') failure typically happens when the HTTP request is returning error 429 (too many requests), namely, the IP block of VPN.

SO:

* For the app side, there is really nothing to handle, however, making the error message more specific helps

* For the users, you will really need to change the proxy/region that you are using, or change the provider can also solve this problem

Hello, I'm not even on VPN but still local api not working.

"Error: This helps protect our community. Learn more"

@absidue
Copy link
Member

absidue commented Sep 18, 2024

@Yolakalemowa That error is coming from Invidious, as is explained in the "maintainer edit" section of the top post, you need to stop using Invidious for the moment, until they have found a solution on their end.

@Yolakalemowa
Copy link

@Yolakalemowa That error is coming from Invidious, as is explained in the "maintainer edit" section of the top post, you need to stop using Invidious for the moment, until they have found a solution on their end.

sorry bit of a noob here. But yes I thought I wasn't using Invid. I chose preferred api backend as local API not Invid.

Or am I miunderstanding?

@Yolakalemowa
Copy link

@Yolakalemowa That error is coming from Invidious, as is explained in the "maintainer edit" section of the top post, you need to stop using Invidious for the moment, until they have found a solution on their end.

Hi... what does this window mean?

image

@CaptainMorgan12
Copy link

CaptainMorgan12 commented Sep 19, 2024

Environment: freetube v0.21.3 Beta .deb (also tested with v0.21.1 .deb) amd64 or flatpak install, Ubuntu 24.04.1 LTS, custom t2 kernel Linux 6.11.0-1-t2-noble, MacPro 7,1. Internet works, Firefox works, OpenVPN running, Wifi or LAN.

Getting the same issues recently, and it looks like an Error that connection is refused. I tried multiple invidious instances that are supposed to be up, but did not change the behaviour. Using local API only without invidious does not work either. Sorry have to post screenshots because when I try to save the information FreeTube crashes.

Screenshot from 2024-09-19 10-58-54

Different instance gives slightly different result:

Screenshot from 2024-09-19 11-07-46

And with 21.1 without invidious:

Screenshot from 2024-09-19 11-18-56

The way it shows up is that videos cannot be played, while subscription image previews show fine:

image

@Jiejue233
Copy link

Jiejue233 commented Sep 19, 2024

A note for everyone commenting below: The "this helps protect our community" or "this content isn't available" is not a freetube error
This is because the Invidious API (an open-sourced API used for anonymous access to youtube) is not working due to the recent update by youtube, this update is blocking every detected "bot connection"
Hence, everything related to Invidious should be reported to the invidious API github though you don't have to, since this issue is already done so.
Any further report like "this is also happened to me" is unwelcome. If you are reporting anything, see through the report and if none of the reports covers your case (in general sense), then your report is meaningful
And finally @Yolakalemowa in your case, you can check if
image
these two options are like this, this helps prevent auto fallback to Invidious API if local API fails

@absidue
Copy link
Member

absidue commented Sep 19, 2024

@CaptainMorgan12 As mentioned earlier in the thread "Cannot read properties of null" is the error that happens with the local API when YouTube has blocked your IP address (FreeTube is failing to read the error message from YouTube's response but it is getting the same error message from YouTube that blocked Invidious instances get). You need to change to a different IP address, by the sounds of it you are using a VPN so you should use a different VPN IP.

@Yolakalemowa
Copy link

A note for everyone commenting below: The "this helps protect our community" or "this content isn't available" is not a freetube error This is because the Invidious API (an open-sourced API used for anonymous access to youtube) is not working due to the recent update by youtube, this update is blocking every detected "bot connection" Hence, everything related to Invidious should be reported to the invidious API github though you don't have to, since this issue is already done so. Any further report like "this is also happened to me" is unwelcome. If you are reporting anything, see through the report and if none of the reports covers your case (in general sense), then your report is meaningful And finally @Yolakalemowa in your case, you can check if image these two options are like this, this helps prevent auto fallback to Invidious API if local API fails

Hi,

Sorry to bother you again but I tried the above recommendations and still not working:

image

@efb4f5ff-1298-471a-8973-3d47447115dc

Is anyone here using a VPN service that is free to use and getting IP blocked? If so please provide the following details

  • Name of VPN service
  • Server you are getting blocked on

@VideoGames1000
Copy link

I've been getting this error without even having a VPN installed at seemingly-random, which is lovely.
Should I be concerned about this?

@absidue
Copy link
Member

absidue commented Sep 29, 2024

@VideoGames1000 Are you just using FreeTube or also doing things like downloading videos with yt-dlp? According to this comment here, using yt-dlp a lot can also cause the errors: #5750 (comment)

@VideoGames1000
Copy link

Casual (if fairly frequent) Freetube use, I've only downloaded one or two videos total since this started happening.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Sep 29, 2024

Is anyone here using a VPN service that is free to use and getting IP blocked? If so please provide the following details

* Name of VPN service

* Server you are getting blocked on

Based on getting 0 responses on this request I assume that nobody that is using a free VPN service is getting hit by this

Requesting the following info, please provide the following info if you are using a paid VPN service and getting IP blocked:

  • Name of the VPN service
  • Server you are getting blocked on

@EugeneDubuk
Copy link

@efb4f5ff-1298-471a-8973-3d47447115dc
I use my private EC in AWS. Can provide you with an account if you wish.

@efb4f5ff-1298-471a-8973-3d47447115dc

@EugeneDubuk Sure, how do you wish to send over the details?

@EugeneDubuk
Copy link

@efb4f5ff-1298-471a-8973-3d47447115dc
Give me an email where I can send it.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Sep 30, 2024

@efb4f5ff-1298-471a-8973-3d47447115dc
Give me an email where I can send it.

@EugeneDubuk

Note

Email alias will be disabled after receiving the details.

@EugeneDubuk
Copy link

@efb4f5ff-1298-471a-8973-3d47447115dc
Sent an email.

@efb4f5ff-1298-471a-8973-3d47447115dc

Will respond when im behind my machine can take a few days though

@Yolakalemowa
Copy link

A note for everyone commenting below: The "this helps protect our community" or "this content isn't available" is not a freetube error This is because the Invidious API (an open-sourced API used for anonymous access to youtube) is not working due to the recent update by youtube, this update is blocking every detected "bot connection" Hence, everything related to Invidious should be reported to the invidious API github though you don't have to, since this issue is already done so. Any further report like "this is also happened to me" is unwelcome. If you are reporting anything, see through the report and if none of the reports covers your case (in general sense), then your report is meaningful And finally @Yolakalemowa in your case, you can check if image these two options are like this, this helps prevent auto fallback to Invidious API if local API fails

Hi,

Sorry to bother you again but I tried the above recommendations and still not working:

image

Hi I'm still getting an error on local api ... local api error: error: please sign in.

Is there any suggestion to fix it? Much appreciated

@absidue
Copy link
Member

absidue commented Oct 3, 2024

@Yolakalemowa Make sure you are using the local API and have Player Settings -> Proxy Videos through Invidious disabled. If both of those things are already the case, then you need to change to a different IP address (e.g. different VPN server or proxy server), the next release will show a better error message but as the block is against the IP address and not FreeTube there isn't much we can do about it.

@Yolakalemowa
Copy link

@Yolakalemowa Make sure you are using the local API and have Player Settings -> Proxy Videos through Invidious disabled. If both of those things are already the case, then you need to change to a different IP address (e.g. different VPN server or proxy server), the next release will show a better error message but as the block is against the IP address and not FreeTube there isn't much we can do about it.

thanks but that's the weird thing. I have those settings as described, and I'm not even using a vpn :S

@absidue
Copy link
Member

absidue commented Oct 3, 2024

@Yolakalemowa As you seem to be saying that your home IP address is blocked, I would suggest using a VPN or a proxy for the moment.

@efb4f5ff-1298-471a-8973-3d47447115dc

@efb4f5ff-1298-471a-8973-3d47447115dc
Sent an email.

@EugeneDubuk yesterday I found an server that was IP blocked. The account isnt needed anymore. Thankyou for providing it anyway!

@FreeTubeApp FreeTubeApp locked and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B: API issue bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.