TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.66k stars 3.07k forks source link

[YouTube] "Sign in to confirm..."/"Watch on the latest version..." #11139

Open zestygrass opened 5 months ago

zestygrass commented 5 months ago

Checklist

Affected version

0.27.0

Steps to reproduce the bug

  1. Attempt to play any video
  2. Video does not play
  3. Page shows "Content unavailable" page

Expected behavior

Video should play.

Actual behavior

Video does not play.

Screenshots/Screen recordings

No response

Logs

Exception

org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Got error: "Sign in to confirm that you're not a bot"
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.checkPlayabilityStatus(YoutubeStreamExtractor.java:948)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:844)
    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.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:118)
    at org.schabi.newpipe.util.ExtractorHelper.$r8$lambda$YTHJjScxCJNO1LTCqs3IKy35iyY(ExtractorHelper.java:0)
    at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda3.call(R8$$SyntheticClass:0)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5377)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
    at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16144)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5377)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)


Affected Android/Custom ROM version

Android 14

Affected device model

Google Pixel 6

Additional information

I could replicate this issue on LibreTube and Grayjay.

hamedsbt commented 2 months ago

I'm wondering how the server distinguishes youtube-app's requests with newPipe or Libretube!!!

0Karakurt0 commented 2 months ago

Now we have the same issue, but without VPN involved, it seems

FineFindus commented 2 months ago

Looks like the PipePipeExtractor implemented a fix, maybe it can be ported?

ghost commented 2 months ago

Looks like the PipePipeExtractor implemented a fix, maybe it can be ported?

This is a 403 error. It's another problem

EmpireMatrix commented 2 months ago

Now we have the same issue, but without VPN involved, it seems

Yep, same here. Age restricted content seems to be involved too, with or without VPN. I've installed other piped apps to see if the problem persisted and it seems so. Still have the sign in to confirm you're not a not.

ch2ohchohch2oh66 commented 2 months ago

A few days ago, I faced a similar issue. However, when I changed my VPN location from Singapore to Hong Kong today, the problem was resolved. I highly recommend switching your VPN access location.

QuestioningEspecialy commented 2 months ago

Changing my VPN location to a city over resolved it for me.

kid-with-phone commented 2 months ago

Since yesterday, I started always getting "Sign in to confirm" on all videos. Did something change?

EmpireMatrix commented 2 months ago

Any workaround developped ? I'd like to use newpupe again. Concerning the VPN, looks like there's been major changes in their detection. Some websites and apps now recognize my VPN which they haven't done before.

thanhminhmr commented 2 months ago

Just got this error message 10 minutes ago. The Y-app is full of scam ads as always.

Edit: Waited a while and things seem normal again. Maybe rate-limit? Nothing technical are solid/interesting enough to be reported.

EmpireMatrix commented 2 months ago

When I receive this kind of error while I am using a VPN, I just reconnect (again) to another server/country, and off I go.

I know this one, but I just can't do it as I'm using proton VPN and the default serve is always the same. Besides it allows few server hopping and if I'm disconnected here I go again.

It seems that the YouTube api has been dramatically changed as some of my adblockers no longer work and even the real YouTube ask me to sign in to confirm that I'm not a bot. I just can't use a VPN anymore ! What I wanted to know if this is considered as a problem and will be solved by the team or if they can't do anything about it. Internet is really trying to kill vpns, and as a pro-privacy guy, I don't want anyone to know my position and track me.

Mis012 commented 2 months ago

imho this issue should be about the case where browser (not logged in) on same IP works fine, in which case NewPipe should be able to emulate whatever the browser does. If it doesn't even work in a browser then there's nothing NewPipe can do...

re: how does youtube app work, it uses a private API, it doesn't scrape the website (it would be VERY weird for a first party app to do that)

mrkrabs206 commented 1 month ago

There are 2 methods for the first error;

  1. Add sign in feature (no account activity, only verification)
  2. Use YouTube in another unused account
mycodedoesnotcompile2 commented 1 month ago

https://github.com/TeamPiped/Piped/issues/3658#issuecomment-2367959839

mrkrabs206 commented 1 month ago

I have been experiencing the same since two days or so. Never happened before. But when I open the video in my browser it does not ask me to login.

IMG_20240609_171129 Screenshot_20240609-171141

Oof

mrkrabs206 commented 1 month ago

3 months with no updates

kid-with-phone commented 1 month ago

I am also connected to a VPN. Now just restarting the app usually fixes the error.

mrkrabs206 commented 1 month ago

I am also connected to a VPN. Now just restarting the app usually fixes the error.

I don't have VPN

mrkrabs206 commented 1 month ago

Yes, restarting will temporarily help

mrkrabs206 commented 1 month ago

Looks like the PipePipeExtractor implemented a fix, maybe it can be ported?

2 months ago

gsture commented 1 month ago

I now have this error all the time. When I click "open in browser" the video plays fine without any sign in or verification. If I restart newpipe I can sometimes play 1 video and then it the no content unavailable error returns.

I don't use a VPN.

InfinityLoop1308 commented 1 month ago

A potential workaround for this issue is to implement sign-in functionality, which could address both this problem and the restricted content issue. While this approach may not align perfectly with NewPipe's philosophy, it has proven effective in some cases.

For those interested in seeing how this solution works in practice, PipePipe's latest version demonstrates one possible implementation.

PrivacyFriendlyMuffins commented 1 month ago

Please correct me if I'm wrong as I am no expert, but wouldn't "sign-in functionality" just be doing exactly what Google wants in this case, not to mention also defeat entirely one of the main reasons Newpipe even exists? I know you said it "may not align perfectly with Newpipe's philosophy", but that philosophy is kind of one of the primary reasons Newpipe even exists in the first place. Without it, there's very little reason to even use Newpipe, except for the reason of no ads. But, again, that's only one of the reasons people use Newpipe as far as I know.

marek22k commented 1 month ago

And an important point for me personally is that NewPipe is FLOSS (is also available in F-Droid). The official YouTube is proprietary and just filled with binary blobs.

gsture commented 1 month ago

If there is no other solution a middle ground could be something like anonymous sign in with a random account like aurora store does but I don't know how feasible that would be with something like YouTube.

bitelaserkhalif commented 1 month ago

TeamPiped/Piped#3658 (comment)

Tl;dr: ATM, use Cloudflare WARP as bandaid. They don't block cloudflare affiliated IP's. In theory if they (g) blocked cloudflare IP, some feature is going to be broken

ghost commented 1 month ago

Please correct me if I'm wrong as I am no expert, but wouldn't "sign-in functionality" just be doing exactly what Google wants in this case, not to mention also defeat entirely one of the main reasons Newpipe even exists? I know you said it "may not align perfectly with Newpipe's philosophy", but that philosophy is kind of one of the primary reasons Newpipe even exists in the first place. Without it, there's very little reason to even use Newpipe, except for the reason of no ads. But, again, that's only one of the reasons people use Newpipe as far as I know.

The solution is Potoken, but it needs to be added to the Extractor. Or, I don't know, the official YouTube works account+potoken.

drahmedramadan commented 1 month ago

the app crashes all the times

mrkrabs206 commented 1 month ago

A potential workaround for this issue is to implement sign-in functionality, which could address both this problem and the restricted content issue. While this approach may not align perfectly with NewPipe's philosophy, it has proven effective in some cases.

For those interested in seeing how this solution works in practice, PipePipe's latest version demonstrates one possible implementation.

It should only be verification and not for activity (liking commenting history etc)

NotGabe001 commented 1 week ago

I think this is what's causing my issue. If I open the app, I can watch videos, just as I've always done, but if I switch to another app for a bit and open NewPipe back up (without closing NewPipe), it just gives me the "Content unavailable" error

mycodedoesnotcompile2 commented 1 week ago

The method pointed there, to use Cloudflare WARP, seems now defunct.

I suspect Cloudflare forwards the source IP to the destination (which Youtube in this case), the former can then choose not to return results.

The weird thing is that if you use yt-dlp from the same machine, through Cloudflare WARP, it works !

So maybe Piped should embed yt-dlp to access content and stream the result to the user ?!

If anyone has another method to circumvent Youtube anti-Piped access, please share !

n-d-v commented 3 days ago

Couldn't this issue be fixed by making youtube think that you are logged in? maybe perhaps some sort of default account that the data could somehow be rerouted to?

86ul commented 2 days ago

BTW, it seems to me, that I get this message only when I am 'binge-watching' a playlist. Either when I watch some bits, or even several short videos of +5min each (no Shorts itself!), I get this message. However, when I watch several videos for longer than +10min each, I do not get this error message, even on a local (active?) VPN server. Otherwise I have to hope merely to another country with the official VPN app of my provider, and/or restart the app (no forced restart!), and off I go (again)...

QuantumEdgeCode commented 2 days ago

YouTube appears to redirect special IP addresses to the login page, but using high-quality IP addresses allows you to watch directly, including US IPs.

tag27 commented 17 hours ago

Couldn't this issue be fixed by making youtube think that you are logged in? maybe perhaps some sort of default account that the data could somehow be rerouted to?

It used to be using OAuth2, which is almost similar, but recently YouTube A/B tests broke this solution. Now all that's left is POtoken to fix the problem, for now.