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.

AudricV commented 5 months ago

Can you reproduce this issue if you try to watch on youtube.com logged out with the same IP as the one you got this on NewPipe?

zestygrass commented 5 months ago

Yup, tried to play the same video on youtube.com, asks for login.

screenshot-2024-06-07-121917

I am using a vpn, which has not been an issue before today, I will try without the vpn and report back

Edit: Video's play without any issue in newpipe when vpn is off. No longer asks for login

zestygrass commented 5 months ago

Bit of an update, I tried a different vpn server in the same region, newpipe works without asking for login for now on these servers.

davidasunmo commented 5 months ago

@AudricV So, is this still a bug or not? If google doesn't like the IP from a VPN for some reason, is it NewPipe's responsibility to try and circumvent that, or is that the responsibility of the user?

Japhys commented 5 months 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
opusforlife2 commented 5 months ago

This is a network-wide problem. Invidious and Piped (and several others) are also facing the same issue.

chayleaf commented 5 months ago

embeds still work without logging in, but not with a 100% chance

ladfrombrad commented 5 months ago

https://lemdro.id/post/9678087

Same for me, is very odd.

NoahJelen commented 5 months ago

I had an issue similar to this many years when tinkering with a Wireguard VPN on Linode. If you're using a commercial VPN or running a VPN system with a VPS (ex: Linode, Digital Ocean), YouTube thinks you're a robot (and forces a login) because the of the data center between YouTube and your device.

anoraktrend commented 5 months ago

I commented on the Oauth for Subscriptions feature request, but allowing users to sign in via oauth might be the only permanent solution for this issue.

indomara commented 5 months ago

I have this issue as well, without a vpn. Videos will not play, feed will not load. If I open the video on youtube it plays without being logged in. Thank you to everyone who spends their time on this project, I very much appreciate you.

NoahJelen commented 5 months ago

I commented on the Oauth for Subscriptions feature request, but allowing users to sign in via oauth might be the only permanent solution for this issue.

Is there a way we could have spoof accounts, similar to how the Aurora Store scrapes Google Play?

opusforlife2 commented 5 months ago

Is there a way we could have spoof accounts, similar to how the Aurora Store scrapes Google Play?

Piped, via Libretube.

Mennaruuk commented 5 months ago

This is my crash log, it shows up on every video:

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:1016)
    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)
Kreijstal commented 4 months ago

so is newpipe going to cache the videos or will just let users log in?

usernamehyphen commented 4 months ago

I think i also experienced this issue while in Canada and on wifi, it doesn't happen in europe and on mobile network.. yet

Dkcruise2001 commented 4 months ago

Exception

com.google.android.exoplayer2.ExoPlaybackException: Source error
    at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:644)
    at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:242)
    at android.os.Looper.loop(Looper.java:362)
    at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
    at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:422)
    at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:263)
    at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
    at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:796)
    at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:609)
    at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
    at com.google.android.exoplayer2.source.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:124)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
    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)


Facing the error

NottLexa commented 3 months ago

Same only when using VPN. Too bad, because russian's government is going to ban YouTube soon, and there's no way I can watch YouTube without VPN in the near future :(

usernamehyphen commented 3 months ago

Same only when using VPN. Too bad, because russian's government is going to ban YouTube soon, and there's no way I can watch YouTube without VPN in the near future :(

I also have issues with streaming videos, but downloading works for any video while on a vpn, but also i feel that now i am doing stuff instead of just watching an alternative tv.

lossposs commented 3 months ago

i have same issue on P8, Newpipe 27.1 haven’t tried youtube.com, but Clipious plays them no problem.

alejandro-alzate commented 3 months ago

Same issue here even for peak irony this video in my case triggers it consistently: https://youtube.com/watch?v=-CoEHDHb0lE

N6MCA51593 commented 3 months ago

Same, it only works if you open a video, and then turn VPN on

532910 commented 3 months ago

Same, it only works if you open a video, and then turn VPN on

It stopped to working me this way: if I turn VPN during the download stales, though it worked before.

PrivacyFriendlyMuffins commented 3 months ago

Same thing happens with this video: https://m.youtube.com/watch?v=3XGAmPRxV48

ghost commented 3 months ago

Invidious found a solution: https://github.com/iv-org/youtube-trusted-session-generator.

alejandro-alzate commented 3 months ago

Same, it only works if you open a video, and then turn VPN on

Maybe Youtube is messing with the site's protections but the cdn's protetections are the same?

mycodedoesnotcompile2 commented 3 months ago

cf. https://github.com/TeamPiped/Piped/issues/3658

PrivacyFriendlyMuffins commented 3 months ago

cf. TeamPiped/Piped#3658

Stupid question, sorry, but what does "cf." stand for in this context?

alejandro-alzate commented 3 months ago

There's no stupid questions.

PrivacyFriendlyMuffins commented 3 months ago

There's no stupid questions.

Challenge accepted. :P

alejandro-alzate commented 3 months ago

God dammit i knew this could happen.

alejandro-alzate commented 3 months ago

Someone always disproves me.

PrivacyFriendlyMuffins commented 3 months ago

Fair enough. Lol.

So, what does "cf" stand for anyway?

alejandro-alzate commented 3 months ago

I this case I'm not certain it may be "check for"

PrivacyFriendlyMuffins commented 3 months ago

Thanks!

Tunsinasro commented 3 months ago

Actually its an abbreviation of Latin cōnfer, it means "see" or "see also"

mycodedoesnotcompile2 commented 3 months ago

https://en.wikipedia.org/wiki/Cf.

Mis012 commented 3 months ago

So, is this issue only for VPNs? I get this error without any sort of VPN, it only happens sometimes, at which point it happens for any video, but after a while everything works fine again.

Mis012 commented 3 months ago

I commented on the Oauth for Subscriptions feature request, but allowing users to sign in via oauth might be the only permanent solution for this issue.

What exactly is "this issue" in your opinion that you count that as a solution? I would specify the issue as "Google is trying to force me to sign into a google account which I clearly don't want to do as demonstrated by the fact that I'm using NewPipe", at which point signing into a google account is obviously not a solution.

The word "solution" has a certain meaning, and as far as I understand the entire point of NewPipe is to not require a Google account. If you have a Google account, you might as well generate yourself an API token and not bother with parsing the website.

khimaros commented 3 months ago

workaround: use a VPN client that allows per app bypass such as Rethink and then bypass NewPipe. not ideal, but solves this entire class of issues if you're willing to accept the privacy trade-off.

khimaros commented 3 months ago

So, is this issue only for VPNs? I get this error without any sort of VPN, it only happens sometimes, at which point it happens for any video, but after a while everything works fine again.

@Mis012 i think this is an issue in situations where you have poor network reputation. relatively more common with VPNs or when connecting from cloud providers.

Mis012 commented 3 months ago

I mean, my home connection's public IP (I'm behing NAT) is in one of the popular "bad actor IPs" lists, so I guess that could in theory be related... but I don't see how it could be classified as non-residential, if that's what they care about

Mis012 commented 3 months ago

@khimaros also, iirc I was able to play the video in a browser on the same device (with the same IP obviously), and I think it wasn't a case of it suddenly starting to work

khimaros commented 3 months ago

@Mis012 i don't think it's just about residential or not. it's about abuse risk. re: browser you are most likely signed in our at least able to pass a captcha, granting you access.

alejandro-alzate commented 3 months ago

Here even youtube.com with ublock is producing problems, we need to push back.

Mis012 commented 3 months ago

@Mis012 i don't think it's just about residential or not. it's about abuse risk. re: browser you are most likely signed in our at least able to pass a captcha, granting you access.

I'm most definitely not signed in, but I guess it's possible that some form of cf-esque invisible captcha is at play (definitely no visible captcha)

EmpireMatrix commented 3 months ago

For my part, I'm using a VPN, but this problem mostly occurs when I'm connected on a WiFi. It started to happen when I connected on a hotel WiFi. So there must be something about public or lot-of-users-connected WiFi. I've not tried without the VPN on that kind of network though...

EmpireMatrix commented 3 months ago

So, is this issue only for VPNs? I get this error

@Mis012 i think this is an issue in situations where you have poor network reputation. relatively more common with VPNs or when connecting from cloud providers.

I'm using an always-on VPN and it has never been a problem until I connected a public WiFi. Theoretically, it shouldn't change anything as the VPN server is supposed to make the request, whatever the original network is...

Edit: tried to deactivate the VPN on the WiFi when the bug occurred and it solved it. @khimaros idea is the one that works for me meanwhile NP try to fix this. Thanks for your work guys !!

ghost commented 3 months ago

https://gitlab.futo.org/videostreaming/plugins/youtube/-/commit/be0e7891727986154f8482574ac02973fdbd4886 They switch to iOS client to avoid blocking. A better solution is to spoof the link. Spoof the link you got the video from and some rotation to fix playback issues

creeperpatty commented 2 months ago

embeds still work without logging in, but not with a 100% chance

this might be weird but can someone try using https://www.youtube-nocookie.com/embed/YUGCItNGsVs (YUGCItNGsVs is video id) instead see if it still get blocked for reason the video loads after i use that