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

"Watch on the latest version of YouTube." #1185

Closed
Denzter opened this issue Jun 26, 2024 · 8 comments
Closed

"Watch on the latest version of YouTube." #1185

Denzter opened this issue Jun 26, 2024 · 8 comments
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/

Comments

@Denzter
Copy link

Denzter commented Jun 26, 2024

I've been getting an error watching a video using this instance of Piped to watch videos. It seems to be relating to the NewPipeExtractor, which is why I posted it here. To recreate, simply select a video you want to watch, and unless it somehow starts working again, you should get the error, and since Piped sends back-end errors to the front-end, you can click "Show More" to view the stack trace.

If this error does not show up anymore, here it is:

org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Watch on the latest version of YouTube.
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.checkPlayabilityStatus(YoutubeStreamExtractor.java:1009)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:876)
    at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:60)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:77)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:72)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:67)
    at me.kavin.piped.server.handlers.StreamHandlers.lambda$streamsResponse$0(StreamHandlers.java:54)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)

image

@opusforlife2
Copy link
Collaborator

It only occurs on certain instances. So it's likely those instances having some sort of incorrect config, or being outdated. If you can find a way to ask the instance operators, we can know for sure.

@Denzter
Copy link
Author

Denzter commented Jun 27, 2024

It only occurs on certain instances. So it's likely those instances having some sort of incorrect config, or being outdated. If you can find a way to ask the instance operators, we can know for sure.

Well, you see, this is actually my instance. I've already tried pulling new Docker images for Piped (I have it containerized using Docker), and nothing. The reason why I think it might be an issue specifically with NewPipeExtractor is because I also have an instance of Invidious, and these run in completely separated Docker containers and environments. I tried pulling both, and both images are seemingly up to date.

I just thought that, because it happens on both alternative YouTube front-ends, it's likely to be an issue with NewPipeExtractor, but then that also makes me curious as to whether it might also be an issue with my server. Both Piped and Invidious run on the same server, but I have no clue why YouTube would be throwing this at specifically my server. Instances like piped.yt do seem to work fine, as I've noticed. It's just... such a weird error, and it makes it seem like NewPipeExtractor, or at least the version used by my instances of Piped and Invidious, are out of date.

Thanks for replying! Looking forward to hopefully fix this!

@opusforlife2
Copy link
Collaborator

or at least the version used by my instances of Piped and Invidious

The thing is, Piped does use NPE, but Invidious is a completely separate codebase with no interaction with Newpipe. If you're still getting the error on both, it might be worth asking other instance operators what's happening here.

@Denzter
Copy link
Author

Denzter commented Jun 27, 2024

The thing is, Piped does use NPE, but Invidious is a completely separate codebase with no interaction with Newpipe. If you're still getting the error on both, it might be worth asking other instance operators what's happening here.

Oh, so you're implying that this isn't an NPE-specific issue but rather YouTube messing with my server's ability to fetch content from them? That makes sense. I was actually unaware that Invidious doesn't use NPE, and I just assumed it did considering I got the same issue on both. Okay, well, since this issue isn't NPE-specific, I'll close it with this comment because it'd be suited for the Piped or Invidious repository. Thanks for the help!

@Denzter Denzter closed this as completed Jun 27, 2024
@opusforlife2
Copy link
Collaborator

Let us know the outcome either way. It might be helpful for others. Good luck!

@Denzter
Copy link
Author

Denzter commented Jun 27, 2024

Oh wait, I just stumbled upon the solution to this issue! It appears YouTube has, for some unknown reason, flagged my instance in particular. I SSH'd into my webserver and tested around a bit with curl, and what I found was this:

denzter@localhost:~$ curl https://youtube.com/watch?v=ZqWEki6WVyo
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/sorry/index?continue=https://youtube.com/watch%3Fv%3DZqWEki6WVyo&amp;q=EhAqAX4BAAAAAPA8k__-OvPfGJ__9bMGIjClPBDfo8kXMPsIyjO7zwUl9tgp_82yFBm522PxEo0P75gbdjL85wNFw5jUnTzD9SUyAXJaAUM">here</A>.
</BODY></HTML>
denzter@localhost:~$ curl https://youtube.com/watch?v=ZqWEki6WVyo
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/sorry/index?continue=https://youtube.com/watch%3Fv%3DZqWEki6WVyo&amp;q=EhAqAX4BAAAAAPA8k__-OvPfGMb_9bMGIjCt6UU9rUAyveZr_P4RJDKVYI8l_ITot8vMWAE1Wc9wx-TLLQx_TqVUbsicaHHstf0yAXJaAUM">here</A>.
</BODY></HTML>
denzter@localhost:~$ curl https://www.google.com/sorry/index?continue=https://youtube.com/watch%3Fv%3DZqWEki6WVyo&amp;q=EhAqAX4BAAAAAPA8k__-OvPfGMb_9bMGIjCt6UU9rUAyveZr_P4RJDKVYI8l_ITot8vMWAE1Wc9wx-TLLQx_TqVUbsicaHHstf0yAXJaAUM
[1] 677028
-bash: amp: command not found
denzter@localhost:~$ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://youtube.com/watch?v=ZqWEki6WVyo</title></head>
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px; overscroll-behavior:contain;" onload="e=document.getElementById('captcha');if(e){e.focus();} if(solveSimpleChallenge) {solveSimpleChallenge(,);}">
<div style="max-width:400px;">
<hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>
<div style="font-size:13px;">
Our systems have detected unusual traffic from your computer network.  Please try your request again later.  <a href="#" onclick="document.getElementById('infoDiv0').style.display='block';">Why did this happen?</a><br><br>
<div id="infoDiv0" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests.  If you share your network connection, ask your administrator for help &mdash; a different computer using the same IP address may be responsible.  <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may see this page if you are using advanced terms that robots are known to use, or sending requests very quickly.
</div><br>

IP address: 2a01:7e01::f03c:93ff:fe3a:f3df<br>Time: 2024-06-27T15:05:58Z<br>URL: https://youtube.com/watch?v=ZqWEki6WVyo<br>
</div>
</div>
</body>
</html>

Yeah, YouTube appears to have blocked my server in particular. I find this extremely unusual and weird considering there are other servers that get way, way more traffic than mine. It's a reminder that, even if you're running an instance for just yourself and your friends, that you're still susceptible to getting flagged.

So, if your server does this stuff too, I recommend pinging a YouTube link and seeing if you get an unexpected response. Even if your instance is rather small, you can still fall victim to this.

@opusforlife2
Copy link
Collaborator

It's possible that other instances are using a known solution to fix this. I got this error on syncpundit.io a few days ago, but then it went away.

@AudricV
Copy link
Member

AudricV commented Jun 27, 2024

YouTube is A/B testing disabling anonymous access to IPs which are downloading videos. Some people get the message like yours, some people get the message Sign in to confirm that you're not a bot. This helps protect our community. See TeamNewPipe/NewPipe#11139.

We (several third-party clients with the help of other projects) are currently investigating possible solutions and workarounds to this issue.

@AudricV AudricV added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

No branches or pull requests

3 participants