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

Some age restricted videos are periodically resulting in an "{"error":"Could not extract video info. Instance is likely blocked."}" message [Other] #1296

Closed
rjdg14 opened this issue May 18, 2021 · 36 comments
Labels
bug Something isn't working Discussion third-party Related to third-party logic

Comments

@rjdg14
Copy link

rjdg14 commented May 18, 2021

Topic
Other - General issue with FreeTube that I don't think would go into the bug section as it's probably related to YouTube's API

Discussion
I know that YouTube has been making it increasingly more difficult for users to view age restricted videos featuring violence or graphic content over the past year - they can no longer be accessed from most third party sites with exceptions such as The Guardian, and in recent months they've also been requiring users in Europe to prove their identity using a credit/debit card or an ID document photo in order to watch them. In the past, FreeTube has been able to play them without any problem at all, but today I installed the v0.13.0 update and have been finding periodically that some of them have on certain attempts to access them been displaying a {"error":"Could not extract video info. Instance is likely blocked."} message along with "Error: Status code: 404", while on other attempts the same videos will load normally. Can you please try and make sure that FreeTube is proofed against not being able to play these videos, as most of the other age restriction circumvention loopholes (such as NSFWTube) have stopped working over the past year due to changes in YouTube's API designed to make circumvention of the age restriction more difficult.

Google seem to currently accept debit cards as European proof of age in addition to credit cards (they only state the latter, which I don't have, but my debit card worked), but even though I can access age restricted videos on YouTube's site, I hate being bombarded with a viewer discretion warning every time I encounter one when logged in and age confirmed (again something that YouTube didn't used to have) so prefer to watch videos with violent content on FreeTube.

@Svallinn
Copy link
Member

Ok, I'll address the elephant in the room first.
{"error":"Could not extract video info. Instance is likely blocked."}
This is not a FreeTube related issue, it's an Invidious related issue.
It could happen for one of 3 reasons:

  1. As the error states, the instance's API can be blocked, either for all requests or FreeTube/Electron requests specifically.
  2. The Invidious instance might be outdated
  3. The Invidious project might still be suffering from an issue they haven't resolved yet.

NOTE: Every instance owner has the freedom to attach whatever rules they want to their own instance, we simply provide links to the instances that are publicly available.
It's up to the user to choose which Invidious instance they want to use.


You also stated that this might be related to YouTube's API.
This way of phrasing it is a bit misleading, so I feel the need to clarify that we don't use YouTube's official API. Instead, we scrape HTML pages and utilize their internal API to fetch data on everything that is needed in the app.


Now, about Error: Status code: 404
You are right, this is related to some kind of inconsistency regarding age-restricted videos coming from YouTube's side.
Sometimes it works, sometimes it doesn't.

We use the ytdl-core module to fetch video information, there's currently an open issue already addressing it and a possible solution in one of the comments.


I'll concluded this by making this clear: these problems will continue to happen in the future and we will release hot-fixes as required.
The sources that our data fetchers make use of (HTML pages and internal API) are not and will never be stable.
They're more akin to ocean currents that keep changing unpredictably and we simply react to the changes as they occur.
Therefore, making FreeTube fault-proof 100% of the time is technically impossible.

@rjdg14
Copy link
Author

rjdg14 commented May 18, 2021

Okay. Thanks for your reply. I think there have been periodic issues with Invidious in regard to age restricted videos in the past. I know that YouTube and Google are capable of temporarily blocking certain servers from sending requests (such as those used by Invidious, or any other network) if it detects what it deems to be automated traffic coming from them, so it may be that which is causing part of the issue.

I know that comments stopped working on my previous installation of FreeTube a couple of weeks ago, but that's now fixed.

With regards to the potential solution to the issue that the replier mentioned on the thread you linked to, do you know where and how I can add the "&html5=1" clause to (possibly) resolve the issue?

@Svallinn
Copy link
Member

Unfortunately, I don't think you'll be able to do so manually. You'll have to wait until the module is updated.
In the meantime, I recommend using the Tor Browser for age-restricted videos.

@rjdg14
Copy link
Author

rjdg14 commented May 19, 2021

Unfortunately, I don't think you'll be able to do so manually. You'll have to wait until the module is updated.
In the meantime, I recommend using the Tor Browser for age-restricted videos.

I'm not going anywhere near Tor due to its dodgy reputation (nor do I wish to turn any proxy options on in Freetube unless as a last resort). I can currently watch age restricted videos fine in Freetube if I attempt to reload several times. I know that Freetube is set by default to use a "Local API" which suggests that the API code is somewhere on my computer.

@Svallinn Svallinn added bug Something isn't working third-party Related to third-party logic labels May 19, 2021
@rjdg14
Copy link
Author

rjdg14 commented May 21, 2021

For the past day the affected videos haven't been able to load at all in FreeTube, even after several reloads, and only the Error: Status code: 404 appears, without the {"error":"Could not extract video info. Instance is likely blocked."} message.

The affected videos are mainly either age restricted videos which display a viewer discretion warning on YouTube's site, or a handful of official (Vevo or WMG) uploads of music related content, most of which are not age restricted. The vast majority of music videos, and many age restricted videos, still remain unaffected though - it only seems to be certain videos from those two categories which are affected.

If I download the FreeTube-development source code package as a ZIP file, will there be a javascript file within it that I can modify to add the "&html5=1" clause which looks to be a fix for this issue, considering that there's a "Local API" option in the FreeTube settings?

I thought I'd also note that many of these videos which are refusing to load either via my local API or through Invidious in FreeTube do load at invidious.snopyta.org, which is weird when FreeTube uses exactly the same API. They still refuse to load in FreeTube when I turn the option on to make a connection to Invidious instead of YouTube, though, even when they load fine there if I access the Invidious URL in my browser.

Has there likely been some kind of change made at YouTube's end in recent days which is causing this problem? I know that various things in FreeTube or Invidious can temporarily become broken due to a recent change in YouTube's API, and I know that YouTube has been trying to make it increasingly difficult to access age restricted content for the past few months as well in an effort to bow to pressure from concerned parents and governments.

I can access the age restricted videos through YouTube as I've verified my account, but still dislike getting a discretion warning whenever I come across one (I was unable to find any adblocker script workaround to bypass the discretion warning, and it can't be disabled in YouTube's settings either). FreeTube has a friendlier, more streamlined interface which doesn't display such notices and thus that's why I use it.

@Svallinn
Copy link
Member

Svallinn commented May 21, 2021

Has there likely been some kind of change made at YouTube's end in recent days which is causing this problem?

Of course there has been, I thought that was clear enough already from the discussion above.

Also, giving us all that information isn't gonna do anything, I'd suggest providing that info to the issue I linked above

@rjdg14
Copy link
Author

rjdg14 commented May 21, 2021

Does FreeTube proxy its requests through the ytdl module on a server (rather than it being an offline component in the installation) then? If that's the case, I'll just have to wait for the ytdl developers to fix it. I've now posted in that thread too.

Someone on the thread you linked to has since discussed what YouTube appears to have changed, and said that they have some draft code to fix it, so hopefully it'll be fixed soon.

It seems as though minor changes to YouTube's API occur quite frequently, perhaps once every couple of weeks, and it typically takes a few days for the third party retrieval code (Invidious/ytdl) to be updated, rendering whatever function was changed broken for a short period.

@Svallinn
Copy link
Member

Does FreeTube proxy its requests through the ytdl module on a server (rather than it being an offline component in the installation) then? If that's the case, I'll just have to wait for the ytdl developers to fix it. I've now posted in that thread too.

The local API uses ytdl code directly from the app (we package the module with the app, therefore, everything is done with the local machine) while the Invidious API makes requests to the selected Invidious instance (server) in the settings. So yes, you'll have to wait for the ytdl module to get fixed, we'll release a hot-fix version after that.

@rjdg14 rjdg14 closed this as completed May 22, 2021
@rjdg14 rjdg14 reopened this May 22, 2021
@rjdg14
Copy link
Author

rjdg14 commented May 29, 2021

The issue is now fixed in the latest patch :) . Thanks for releasing it (due to the way the fix to the ytdl-core module currently works, these videos do currently take slightly longer to load than others although it's no more than about a second or two longer which is fine).

@rjdg14 rjdg14 closed this as completed May 29, 2021
@rjdg14 rjdg14 reopened this Jun 18, 2021
@rjdg14
Copy link
Author

rjdg14 commented Jun 18, 2021

It appears that Google have made another modification to the way YouTube handles age restricted videos (it looks like their servers now seem to check for the presence of a cookie from a logged in user), and the problem has in the past couple of days begun occuring again, affecting more videos than last time. I've mentioned this on the ytdl support area, but feel that you'll need to release another update when the issue is refixed. While the issue had been resolved, it's come back following another change to YouTube's API. YouTube seems to have been taking a lot of steps in the past year to make age restricted videos more difficult to view.

@rjdg14
Copy link
Author

rjdg14 commented Jul 22, 2021

The issue has reoccured again in the past couple of days, several weeks on from the previous hotfix. While this is almost certainly a ytdl thing, I think I should let you know so that it can be refixed when the ytdl-core code is updated.

@Imaskiller
Copy link
Contributor

i cannot load age-restricted videos in freetube/invdious/cloudtube/piped

it seems youtube made a few adjustments to block us out for now - so we probably need to find a new bypass

@ghost
Copy link

ghost commented Jul 24, 2021

@89z, here you go: https://youtu.be/VxhRnfi6yyE

@ghost
Copy link

ghost commented Jul 24, 2021

@89z, but in FreeTube I got 500:

image

@Svallinn
Copy link
Member

@altwarg I can tell you right away that you're wrong.
Age-restricted video example: https://www.youtube.com/watch?v=hkq-23H2muE
This video is not accessible via NewPipe.

@ghost
Copy link

ghost commented Aug 11, 2021

@Svallinn , I disagree. I can watch this video on version 0.21.8.

Screenshot_2021-08-12-00-30-23-785_org.schabi.newpipe.jpg

Screenshot_2021-08-12-00-30-28-207_org.schabi.newpipe.jpg

@rjdg14
Copy link
Author

rjdg14 commented Aug 11, 2021

Is it possible that this error is only occuring from EU/EEA/UK IP addresses (where YouTube are asking users to verify their age with a credit card or photo of an ID document; I think the above user is Russian, though they could be from Ukraine or another Slavic country; Bulgaria is the only EU/EEA country that uses the Russian alphabet) rather than from IP addresses elsewhere in the world such as the US? If that's the case, it's perfectly legal to use a VPN in most of Europe to circumvent restrictions such as this however VPNs tend to be significantly slower (free ones at least) to your main network, and I dislike using them regularly since they can interfere with cookies on a few sites (if the cookies are region specific). I should also reiterate that you can still play age restricted videos by going to https://yt.zoopid.com/, however I don't know exactly what kind of script they're using.

This yt-dlp release page suggests that it's still possible to work around the problem if authentication cookies are supplied:

https://github.com/yt-dlp/yt-dlp/releases/tag/2021.07.24

It's hard to know, though, whether this authentication cookie is designed to only work with a particular Google account or not, and whether these cookies are long lasting or if they're essentially a short-life token that is specific to a particular video or has a short timeout. If the authentication cookie is long lasting, though, you could probably fix the issue either by distributing future versions with an authentication cookie from an age verified Google account or by allowing a user to import the cookie file if they have an age verified Google account, either through the settings menu or by allowing them to copy a file with a specific name into the software folder.

Does FreeTube currently have anywhere within its development software folder where I can manually add or implement cookie files?

@ghost
Copy link

ghost commented Aug 12, 2021

I suggest to use the same approach as for the Aurora Store: the developers provide "anonymous authentication mode" which means that you can log into the Google Account provided by the developers. And there's no need to keep the subscriptions of this Google Account or change the current mechanisms of subscriptions or favorites. In this case, we will be able to bypass such errors (404, 410, etc.) when watching the videos.

@Svallinn
Copy link
Member

Svallinn commented Aug 13, 2021

That would require a server to actually perform said anonymous authentication and provide you with tokens to allow you to make the requests yourself afterwards (which is what the Aurora Store's token dispensers (servers) do)
I suspect https://yt.zoopid.com most likely simply authenticates with an account which has been 18+ verified, proxies the request for you and provides you with the data.

However, our project is a desktop application with no external communication other than to YouTube or to Invidious, which would mean that it would be very difficult to integrate server logic into the current project, since it would most likely require a major rewrite (not to mention implementing the actual server logic, etc)
It's, obviously, completely unreasonable for you to request that from us...

@rjdg14
Copy link
Author

rjdg14 commented Aug 15, 2021

Perhaps one option could be to create a popup that could appear on unavailable videos allowing the viewer to open the link to the video on that site. Doing a simple workaround like that almost certainly wouldn't involve a major code rewrite.

@ghost
Copy link

ghost commented Aug 15, 2021

I noticed that Invidious has some fixes with mentioned errors:
iv-org/invidious#2329

Yesterday they pushed such fixes on https://yewtu.be/ instance. This instance works for Freetube to watch videos but not to fetch a description or comments of age restricted videos.

@unixfox
Copy link
Contributor

unixfox commented Aug 16, 2021

I noticed that Invidious has some fixes with mentioned errors:
iv-org/invidious#2329

Yesterday they pushed such fixes on yewtu.be instance. This instance works for Freetube to watch videos but not to fetch a description or comments of age restricted videos.

image

I'm able to view the comments on an age restricted video (id: 5gZCjMjoilo) by using the API of yewtu.be

@ghost
Copy link

ghost commented Aug 17, 2021

@unixfox, it's true. The problems with comments and description only appears if you set Local API as your Preferred API Backend in the settings.

@rjdg14
Copy link
Author

rjdg14 commented Aug 28, 2021

Age restricted videos now seem to be loading in FreeTube again with the video title and channel info present, but without the description or comments and they take longer to load than other videos. This is good enough though. Someone at (probably) ytdl's end has probably found a workaround.

@bachig26
Copy link

bachig26 commented Dec 21, 2021

From issue #1954, #1954 (comment)

"I also don't how it works (I have no programming knowledge to understand), but I found this GitHub project, Simple YouTube Age Restriction Bypass (userscript) for this purpose without being logged into YouTube to work with userscript manager.
This works well without any issue as I tried today with Violentmonkey, please have look at this one, and there may be a possibility to integrate within the Local API.

The below zip file can be found in the project itself, I just added it in case of need.
Simple-YouTube-Age-Restriction-Bypass.user.zip"

@Victor239
Copy link

yt-dlp (popular fork of youtube-dl) has fixed the issue for the age-restricted videos I tested, I think these are the relevant PRs 1 2

@zh54tg234f
Copy link

zh54tg234f commented Nov 19, 2022

invidious instances work for me with age restricted videos but freetube does not work...
some kind of real fallback mode in terms of loading the video content + meta data over the invidious instance would be nice.

i mean in freetube i get just errors, metadata 1970 etc. nothing loading after switching to fallback method.

i visit the link on a invidious instance with the web browser it works without the instance proxying the video stream.

invidious is sadly not utilized enough as fallback. i mean having multiple paths to go is a good option but its like newpipe once its broken its garbage and this is unreliable. (i know not your fault yt changing stuff but being to less cooperative in terms of using fallback methods leads to worse user experience)

invidious methods are more reliable (less feature rich) than freetube's

@github-actions
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.

@Victor239
Copy link

Still an issue.

@ChunkyProgrammer
Copy link
Member

FreeTube should be able to load most age restricted videos using the local api now (you'll need to download a nightly build or wait for a new release to use it). So, I'll be closing the issue now.

@Dev7z
Copy link

Dev7z commented Oct 26, 2024

swiss ip address, no age restricted videos play for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Discussion third-party Related to third-party logic
Projects
None yet
Development

No branches or pull requests

12 participants