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

[Bug] IP Ban #702

Closed
jangolivre1 opened this issue Jan 15, 2025 · 34 comments
Closed

[Bug] IP Ban #702

jangolivre1 opened this issue Jan 15, 2025 · 34 comments

Comments

@jangolivre1
Copy link

Checklist (Your issue will be automatically closed if you delete this part)

  • [ x ] I make sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [ x ] I understand that issues with limited impact, such as those occurring on specific devices or under specific network conditions, will not be fixed.
  • [ x ] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • [ x ] I have attached the error report in the issue.

Describe the bug
Some videos are IP banned in a playlist or when I search for them, others don't.

Frequency
always that I click on video.
Steps to reproduce the bug

Device (e.g. Pixel 9 Pro)
LG K12+

Error report

Additional context
It happened when I watched my own playlist.

Capture+_2025-01-14-21-27-56

@InfinityLoop1308
Copy link
Owner

what video are you watching?

@rafaelszp
Copy link

rafaelszp commented Jan 15, 2025

Its happening with me also. All videos from channels like Elementar, Linhagem Geek and a lot others too.

Stack trace:

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_UNSPECIFIED] occurred while playing https://www.youtube.com/watch?v=KICwotdz6MI
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube (Anonymous)
  • Version: 4.1.1
  • OS: Linux Android 13 - 33
Crash log

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:641)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:617)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:211)
	at android.os.Looper.loop(Looper.java:300)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected RuntimeException: 403 error. You IP is temporarily blocked from accessing this video.
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:433)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.RuntimeException: 403 error. You IP is temporarily blocked from accessing this video.
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:501)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258)
	at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:786)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:599)
	at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
	at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1009)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
	... 3 more


@CodedNil
Copy link

I'm getting this same error, but unsure if it is for the same reasons.
Only happening the last week or so I think, and it seems to be whenever my internet source switches, going from wifi to 4G etc, the playback of any video stops and I get that message and a crash notification, I have to fully close the app and reopen it to resume playback.

@InfinityLoop1308
Copy link
Owner

@CodedNil yeah that's expected, see #671 (reply in thread). The same behavior will even make video fail to load in official app

@rafaelszp Can be a new type of blocking but needs more investigation.

@rafaelszp
Copy link

@CodedNil yeah that's expected, see #671 (reply in thread). The same behavior will even make video fail to load in official app

@rafaelszp Can be a new type of blocking but needs more investigation.

I tried NewPipe also and it's working there. I hope this info helps to some extent.

@InfinityLoop1308
Copy link
Owner

@rafaelszp In that case you can try 4.1.2-pre2 as mentioned in #703
Without turning on compatibility mode it will use the old extractor in 4.0.2, which is almost same to NewPipe's but faster :)

@DrDustwolf
Copy link

DrDustwolf commented Jan 16, 2025

Same error here...

[Bug] IP has been blocked by YouTube

Checklist (Your issue will be automatically closed if you delete this part)

  • I make sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I have attached the error report in the issue.

Describe the bug
I encountered this while watching this video: https://www.youtube.com/watch?v=X6C5inJNtSs

Steps to reproduce the bug
Watch a video until a messeage pops up that shows your IP has been blocked by YouTube (see Screenshot).

Device (e.g. Pixel 9 Pro)

  • Device: Shift6mq
  • 128GB ROM (51.5GB free)
  • 8GB RAM
  • 1TB microSDXC (433,6GB free) (SanDisk Extreme PRO R200/W140 microSDXC 1TB, UHS-I U3, A2, Class 10
    SDSQXCD-1T00-GN6MA)
  • OS: LineageOS 22.1-20250104-microG-axolotl (based on Android 15)

Additional context

  • only very few Apps running in the Background (e.g. Messenger & E-Mail)

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_UNSPECIFIED] occurred while playing https://www.youtube.com/watch?v=X6C5inJNtSs
  • Content Country: GB
  • Content Language: de-DE
  • App Language: de_DE
  • Service: YouTube (Anonymous)
  • Version: 4.1.1
  • OS: Linux Android 15 - 35
Crash log

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:641)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:617)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected RuntimeException: 403 error. You IP is temporarily blocked from accessing this video.
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:433)
	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:1117)
Caused by: java.lang.RuntimeException: 403 error. You IP is temporarily blocked from accessing this video.
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:501)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258)
	at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:786)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.read(CacheDataSource.java:641)
	at com.google.android.exoplayer2.upstream.StatsDataSource.read(StatsDataSource.java:92)
	at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromUpstream(DefaultExtractorInput.java:291)
	at com.google.android.exoplayer2.extractor.DefaultExtractorInput.read(DefaultExtractorInput.java:68)
	at com.google.android.exoplayer2.source.SampleDataQueue.sampleData(SampleDataQueue.java:178)
	at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:590)
	at com.google.android.exoplayer2.extractor.TrackOutput.sampleData(TrackOutput.java:157)
	at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.readSample(FragmentedMp4Extractor.java:1444)
	at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:342)
	at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
	at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1042)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
	... 3 more


Screenshot_20250116-012105_PipePipe

@InfinityLoop1308
Copy link
Owner

@DrDustwolf restart the app /switch to other videos doesn't help?

@DrDustwolf
Copy link

@DrDustwolf restart the app /switch to other videos doesn't help?

I can watch a video after restarting and clearing cache. I will see if the error will reappear or not...

@InfinityLoop1308
Copy link
Owner

@DrDustwolf As mentioned earlier, YouTube now block any playback if you switch your network. e.g. You load the video in wifi but start playing in mobile data.

@jangolivre1
Copy link
Author

jangolivre1 commented Jan 16, 2025

@InfinityLoop1308 here's the link for the video:

https://m.youtube.com/watch?v=_Ho43Ph6Jhc

Update: I clicked now in the same video at first and it didn't loaded and said something like: "this video is over 18 age and needs to log in the YouTube account". I forgot to screenshot. Then I tried to open again the same video, still without logging in my account on PipePipe and then the IP ban message came back.

BTW, I am so sorry to saying this in this topic, but I don't know if I should open another one to say that the loading time of a video still is 14 or more seconds. In my LG K12+ didn't changed at all.

@InfinityLoop1308
Copy link
Owner

@jangolivre1 See #703
Can you test the same video in 4.1.2-pre2 ?

@jangolivre1
Copy link
Author

@InfinityLoop1308 is there a file to download to test ?

@InfinityLoop1308
Copy link
Owner

@InfinityLoop1308
Copy link
Owner

Don't turn on compatibility mode, which is same as current version

@jangolivre1
Copy link
Author

@InfinityLoop1308

I'm kinda lost.
Capture+_2025-01-15-23-56-27

@InfinityLoop1308
Copy link
Owner

image

@DrDustwolf
Copy link

DrDustwolf commented Jan 16, 2025

@DrDustwolf As mentioned earlier, YouTube now block any playback if you switch your network. e.g. You load the video in wifi but start playing in mobile data.

Till now I watched 7 more videos and the error didn't reoccur. BTW I use WiFi all the time. I never use mobile data on this device. I neither switched to another router or Wi-Fi network when the error occurred.

@jangolivre1
Copy link
Author

@InfinityLoop1308 okay I tested. still got the same tho 😢

Image

@rancidfrog
Copy link

rancidfrog commented Jan 16, 2025

Image

With new update app is unusable.
I switched to pipepipe because it was working for videos that on newpipe would not load.
Now after latest update all I get is IP ban

@rodin-ia
Copy link

same problem, force stop pipepipe and clear cache pipepipe helps.

@InfinityLoop1308
Copy link
Owner

InfinityLoop1308 commented Jan 16, 2025

There are two different scenarios here:

  1. IP blocking occurs but is limited to a single video, and can be resolved by restarting the app/clearing cache. Even without restarting, watching other videos is not affected.
  2. IP blocking prevents access to multiple, or even all videos, and cannot be resolved by restarting the app/clearing cache.

Scenario 1 is expected behavior - this is a new restriction added by YouTube that triggers whenever your IP changes during playback, including but not limited to switching from WiFi to mobile data. We have already added a retry mechanism in 4.1.2-pre2 which will prevent this issue from occurring again.
The problem lies with scenario 2. No one has reported similar issues with yt-dlp yet, so more information is needed to investigate what's happening.

@jangolivre1 @rancidfrog could you help confirm:

  1. Whether this matches the description of scenario 2
  2. If it matches, are only certain specific videos unplayable, or are all videos unplayable?
  3. Does this situation persist? How long has it been going on?

That would help a lot.

@jangolivre1
Copy link
Author

jangolivre1 commented Jan 17, 2025

@InfinityLoop1308

The first scenario is not happening with me. I use wifi only. The scenario 2 is actually what is going on. I tried to reinstall the app, cleared cache and even cleared the data losing all my subscriptions and playlists.

I am using now the Redmi 6 Pro, and experiencing the same thing with some videos. I don't know if they are related. I am not sure really, but I think these videos are somehow related to videos that are restricted by age and we are not logged into our accounts on Pipepipe.

The gentleman @DrDustwolf showed a video that has a title "p0rn filter". Maybe I am wrong, but I would guess by the title that this video is age restricted too. The video that I showed is a prank with curse word and it seems that is restricted by age.

But today something happened: I was watching a video from the channel 'Jovem Pan Esportes' - it is about football commentary - and, exactly when I push the return button to search other thing, the IP Ban message appeared again. It was a video that lasted longer than 20 minutes.

Additionally, this channel goes live except saturdays and sundays, 15:00 UTC. Got IP ban too. I don't know if the livestream is over 18, but got it too both devices.

But even if I get IP ban, I get strictly in certain videos. Some videos I can watch, others I can't. And I don't know how could I say: this video is ok, this is IP ban. Some pranks are not IP ban, others are. I watched a long video and then I got IP ban right after I closed. The live is IP ban.. so, it is pretty hard to link the points.

Also, I opened the threat a few days ago. The first day I got IP ban on the video that I posted the image. I think (not sure) that lasted 24 hours, because it appeared another message with a sad smiley saying something like: this video needs to be logged cause it's age blocked. I really forgot to screenshot. But then, as I said before, I just tried to open again the same video and got the IP ban, but loaded the thumbnail. Just can't play.

@jangolivre1
Copy link
Author

jangolivre1 commented Jan 17, 2025

@InfinityLoop1308 Update: I logged my YouTube account into PipePipe and the video is playing!

I think youtube is IP banning anonymity especially when trying to watch videos with age restriction although others without could be too.

I also searched that video from @DrDustwolf and is playing normal here.

No IP bans for the moment.

but still having very slow time for loading the video.

EDIT 2: So here the load time is almost 20 seconds. But here's the thing: This load time only happens in the first time when I open or reopen the app after closing him. I mean, if I open the app and then click on the video, this crazy 20 seconds loading time appears. But after loaded, if I search another video and then go back to the same video, it opens instantly. Dunno if this info could help to future updates.

EDIT 3: When I create a playlist with videos, if I click on "Watch all" or "Reproduce all" and if I let go the flow of time of videos, there's no loading time in the next video from the playlist. But if I click in the skip button, or minimize the actual video, e. g, and click in the 3rd or 5th whatever video from the playlist, the huge loading time appears again.

Image

Image

@InfinityLoop1308
Copy link
Owner

Thank you @jangolivre1! Your discovery is VERY valuable. Everything is clear now: The second scenario is essentially YouTube's latest form of blocking anonymous access. Instead of directly showing "Sign in to confirm you are not a bot", it randomly returns 403 errors to confuse anonymous users.

Now that we have this information, we can develop a new patch to address this issue, including guiding users to log in when necessary.
Regarding the loading time issue: The slow initial loading speed is largely due to our lack of information, forcing us to use the most compatible loading method to ensure success, which is quite slow. We will optimize this in the next update.

@nadimahmedwales
Copy link

My workaround has been to open it in Firefox on my mobile via open in browser. I didn't have that problem whence I played it in that. I have ublock origin and sponsor block installed. When I returned to pipepipe, I had no problems for the next few videos. I didn't log in at all.

@86ul
Copy link

86ul commented Jan 17, 2025

Ah, it is a fingerprint related issue?

@InfinityLoop1308
Copy link
Owner

I believe 4.1.2 fully address the issue.

@dogtopus
Copy link

dogtopus commented Jan 18, 2025

My workaround has been to open it in Firefox on my mobile via open in browser. I didn't have that problem whence I played it in that. I have ublock origin and sponsor block installed. When I returned to pipepipe, I had no problems for the next few videos. I didn't log in at all.

This is what I was experiencing as well. Basically the issue only affects NewPipe-family players and everything else I try are able to resolve video data normally.

(Well except that LibreTube local extractor is also failing recently with a different error. Is YouTube actively implementing stricter third-party client detection methods?)

@dogtopus
Copy link

dogtopus commented Jan 18, 2025

Can confirm that I'm able to play videos again normally using 4.1.2. Same IP no login.

EDIT: Nope, spoke too soon. YouTube web works without login but PipePipe doesn't (403 on 1 minute mark) (that wasn't true, see below). LibreTube still sometimes gets the "iOS player response is not valid" error (which requires login to remove unless there's an extractor change) but when it works it can still play the video beyond the 1 minute mark.

Something is definitely fishy about this. Why is NewPipe-family seemingly the only frontend that's affected by the 403 on 1 minute mark error?

@InfinityLoop1308
Copy link
Owner

@dogtopus Any error report?

@syboxez
Copy link

syboxez commented Jan 19, 2025

Can confirm that I'm able to play videos again normally using 4.1.2. Same IP no login.

EDIT: Nope, spoke too soon. YouTube web works without login but PipePipe doesn't (403 on 1 minute mark). LibreTube still sometimes gets the "iOS player response is not valid" error (which requires login to remove unless there's an extractor change) but when it works it can still play the video beyond the 1 minute mark.

Something is definitely fishy about this. Why is NewPipe-family seemingly the only frontend that's affected by the 403 on 1 minute mark error?

Grayjay is also affected by the 403 on 1 minute mark error

@dogtopus
Copy link

Any error report?

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:641)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:617)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected RuntimeException: org.schabi.newpipe.extractor.exceptions.NotLoginException: IOS player response is not valid
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:433)
	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:1117)
Caused by: java.lang.RuntimeException: org.schabi.newpipe.extractor.exceptions.NotLoginException: IOS player response is not valid
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:454)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258)
	at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:786)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:599)
	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)
	... 3 more
Caused by: org.schabi.newpipe.extractor.exceptions.NotLoginException: IOS player response is not valid
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor$4.onSuccess(YoutubeStreamExtractor.java:1102)
	at org.schabi.newpipe.DownloaderImpl$1.onResponse(DownloaderImpl.java:370)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
	... 3 more

Seems like it's no longer a 403 but the "iOS player response is not valid" error instead. Looks like it's an edge case that wasn't getting caught properly by the login error dialog.

Also just a side note: Maybe we should add tv player JSON like yt-dlp did as well?

@erikk333
Copy link

Ytdlnis allows to put a self generated Po token for people with IP ban issue. Could be useful function

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests