FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

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

Open Gourlish opened this issue 5 years ago • 36 comments

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.

Gourlish avatar May 18 '21 16:05 Gourlish

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.

Svallinn avatar May 18 '21 17:05 Svallinn

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?

Gourlish avatar May 18 '21 18:05 Gourlish

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.

Svallinn avatar May 18 '21 23:05 Svallinn

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.

Gourlish avatar May 19 '21 10:05 Gourlish

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.

Gourlish avatar May 21 '21 12:05 Gourlish

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

Svallinn avatar May 21 '21 13:05 Svallinn

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.

Gourlish avatar May 21 '21 14:05 Gourlish

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.

Svallinn avatar May 21 '21 21:05 Svallinn

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).

Gourlish avatar May 29 '21 23:05 Gourlish

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.

Gourlish avatar Jun 18 '21 02:06 Gourlish

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.

Gourlish avatar Jul 22 '21 22:07 Gourlish

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

Imaskiller avatar Jul 23 '21 13:07 Imaskiller

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

ghost avatar Jul 24 '21 16:07 ghost

@89z, but in FreeTube I got 500:

image

ghost avatar Jul 24 '21 16:07 ghost

Still an issue.

MartinX3 avatar Aug 06 '21 12:08 MartinX3

Yep, this is still an issue. I believe there may have been a ytdl fix but this has not yet been implemented into Freetube. I should note, though, that in recent days age restricted videos have been resulting in the error code 410 instead of 404 like previously. If there's currently a ytdl fix, can the Freetube developers please try and implement it and release a hotfix as soon as possible, as it's been more than 2 weeks since the ability to play age restricted videos broke for the third time.

Alongside the error code 410, the message "Video Unavailable" is also being returned in some instances, despite the fact that the videos can be viewed when logged in on youtube.com . I've also encountered rare instances of videos which don't appear to be age restricted but are resulting in exactly the same error.

Some of the videos flagged as "age restricted" do not even feature violence and may simply be content such as police drug busts which can be shown on prime time TV to all ages without issue. I think YouTube has been expanding the number of age restricted videos in recent months using certain AI driven algorithms, whereas they used to rely on manual user based flagging.

This is the error that currently occurs (in this case it's a clip of a police documentary): Error410

This issue needs fixing as soon as possible, because it feels like this issue has been largely neglected this time round whereas it felt as though a hotfix was actively worked on the first couple of times. From what I could find, there has been a ytdl fix but it hasn't yet been implemented into FreeTube.

Gourlish avatar Aug 08 '21 10:08 Gourlish

It's just not up to us anymore. ytdl-core hasn't really addressed the issue yet and most other similar projects (like youtube-dl) have foregone the notion of being able to access age-restricted videos and are now displaying appropriate error messages.

image

So I'm pretty sure, some time in the near future, we'll be closing this issue as a "won't fix" simply because we can't or we'll simply just improve the error messages.

Svallinn avatar Aug 10 '21 18:08 Svallinn

From what I could find there may be some other modules that are able to bypass the playback issues with age restricted content, though implementing them would essentially require a rewrite of the FreeTube code so this wouldn't be possible to implement in the short term. This site still seems capable of bypassing the age gate, though I don't know what script it uses:

https://yt.zoopid.com/

Would an interim fix be to have an option in the FreeTube settings that would delist unplayable age restricted videos from results pages, if that's possible until the issue is resolved (if it ever becomes resolvable)? That would at least allow smooth browsing within the client without these kinds of interruptions. I'm pretty certain that FreeTube is already configured not to list unplayable geoblocked videos in the user's region, so there may be a way of doing the same thing with unplayable age restricted ones.

Gourlish avatar Aug 10 '21 22:08 Gourlish

I'm just wondering why NewPipe is not encountering such an issue or why such an issue has already been fixed and FreeTube is not...

ghost avatar Aug 11 '21 00:08 ghost

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

Svallinn avatar Aug 11 '21 17:08 Svallinn