NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

[YouTube] HTTP error 403 around 1 minute mark

Open opranda opened this issue 1 year ago • 36 comments

Please also see About YouTube playback errors - YouTube changed some things to get working streams


Checklist

  • [X] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [X] I have read the FAQ and my problem isn't listed.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] I have read and understood the contribution guidelines.

Affected version

0.27.0

Steps to reproduce the bug

When I click play, the video loads and the message "Network error" appears and nothing happens

Expected behavior

No response

Actual behavior

No response

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing https://www.youtube.com/watch?v=GnUCGS0KRqM
  • Content Country: RU
  • Content Language: ru-RU
  • App Language: ru_RU
  • Service: YouTube
  • Version: 0.27.0
  • OS: Linux Android 5.1 - 22
Crash log

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.loop(Looper.java:194) at android.os.HandlerThread.run(HandlerThread.java:61) 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.InitializationChunk.load(InitializationChunk.java:99) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)


Affected Android/Custom ROM version

No response

Affected device model

No response

Additional information

No response

opranda avatar Jun 19 '24 22:06 opranda

Did you try different video, on different device or network? I got this problem too where it stuck buffering no matter what quality or video/audio playback, it persists in Firefox, yt-dlp (i use Seal) and many other 3rd party apps, I can only watch said content on YouTube mobile or Chromium-based browsers

MDP43140 avatar Jun 20 '24 07:06 MDP43140

The same story. Android 5.1, 0.27.0, error 403 - forbidden. This problem occurs on ALL YouTube links.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing https://www.youtube.com/embed/s1f7-slwbeo
  • Content Country: RU
  • Content Language: ru-RU
  • App Language: ru_RU
  • Service: YouTube
  • Version: 0.27.0
  • OS: Linux Android 5.1 - 22
Crash log

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.loop(Looper.java:194)
	at android.os.HandlerThread.run(HandlerThread.java:61)
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.InitializationChunk.load(InitializationChunk.java:99)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:818)


I passed the NewPipe request through the debug proxy and repeated the request to 'https://www.youtube.com/youtubei/v1/player?prettyPrint=false' with all headers via curl. The resulting 'itag' streams (mp4/webm/etc) return "403 forbidden".


HTTP/1.1 403 Forbidden
Last-Modified: Wed, 02 May 2007 10:26:10 GMT
Content-Type: text/plain
Content-Length: 0
Connection: close
Vary: Origin
Cross-Origin-Resource-Policy: cross-origin
X-Content-Type-Options: nosniff
Date: Sat, 22 Jun 2024 19:56:26 GMT
Server: gvs 1.0

yt-dlp algorithms receive working links to streams

Baltazar500 avatar Jun 22 '24 20:06 Baltazar500

I have the same issue, also android 5.1. SoundCloud works fine it's just youtube that suddenly doesn't work

MingMing0000 avatar Jun 23 '24 05:06 MingMing0000

Same issue, android 5.1

iiD4x avatar Jun 23 '24 18:06 iiD4x

Is there any solution for this issue?

RadenAmzar avatar Jun 27 '24 06:06 RadenAmzar

The problem is gone 0_o Videos are playing again

Baltazar500 avatar Jun 27 '24 07:06 Baltazar500

same problem. Android 10, newpipe version 0.27.0

How to reproduce

  • play video: https://www.youtube.com/watch?v=pM_rvWwQoqU
  • At 00:59 video stops and returns error message
  • error only occurs sometimes with some videos, and resolves spontaneously after a while.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing https://www.youtube.com/watch?v=pM_rvWwQoqU
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.27.0
  • OS: Linux Realme/RMX1821/RMX1821:10/QP1A.190711.020/1624873154:user/release-keys 10 - 29
Crash log

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:103)
	at android.os.Looper.loop(Looper.java:227)
	at android.os.HandlerThread.run(HandlerThread.java:67)
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:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)


nash268 avatar Jun 29 '24 04:06 nash268

The strangest thing in my case is that, at first, I didn't have this problem, but from about two~three days ago until now it appears from time to time. But I notice that it's more frequent in case I use pip mode or when I put the video in the background.

OS: Android 12, One UI 4.1 Device: Samsung Galaxy A11 (SM-A115M/DS)

tag27 avatar Jun 29 '24 16:06 tag27

@tag27, Maybe YouTube is reconfiguring its servers? After the 22nd format was removed https://github.com/yt-dlp/yt-dlp/issues/10206 NewPipe worked fine. There are no problems at the moment. Perhaps you have a "forbidden/403" format in pip at the moment? Try changing the quality

Baltazar500 avatar Jun 29 '24 16:06 Baltazar500

Maybe YouTube is reconfiguring its servers? After the 22nd format was removed yt-dlp/yt-dlp#10206 NewPipe worked fine. There are no problems at the moment. Perhaps you have a "forbidden/403" format in pip at the moment? Try changing the quality

This looks to be be part of it, since I've also run into something similar, but only encounter the issue with background play (haven't tested with picture-in-picture). Regular video playback works fine.

Quick guess and a poke around the error NewPipe brings up, along with it working fine if the video is loaded through other formats, would suggest that it's an issue with it being able to load the DASH segments properly for the background/PIP format. It can grab the first segment fine, but nothing else past that, hence playback being relatively early on in a video.

techno156 avatar Jun 30 '24 03:06 techno156

Hi ! I have the same issue on some videos (YT). Videos depends on the day...

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing https://www.youtube.com/watch?v=N8hibUNfENA
  • Content Country: FR
  • Content Language: fr-FR
  • App Language: fr_FR
  • Service: YouTube
  • Version: 0.27.0
  • OS: Linux Android 12 - 32
Crash log

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:102)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)
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:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)


A-Nicoladie avatar Jul 02 '24 14:07 A-Nicoladie

for me when error occurs it's always at 00:59 time stamp.

nash268 avatar Jul 02 '24 14:07 nash268

Can you test with a different DNS? I had problems with some providers, but Quad9 works fine. After changing the DNS, don't forget to disconnect/connect and close/open NewPipe.

IPv4
9.9.9.9
149.112.112.112

IPv6
2620:fe::fe
2620:fe::9

DoH
https://dns.quad9.net/dns-query

DoT
dns.quad9.net

juanfra684 avatar Jul 02 '24 18:07 juanfra684

In my experience this issue seems to either occur on random videos about a minute in, or when skipping to a later segment of random videos. It maybe occurs on about every fifth or so video.

rjdg14 avatar Jul 03 '24 08:07 rjdg14

Could this have something to do with how NewPipe is making the requests to YouTube's servers (something with cookies maybe)? I noticed this error disappears for a while if I kill NewPipe and clear its cache.

NoahJelen avatar Jul 03 '24 14:07 NoahJelen

Confirming that:

  1. The first part of a video will play before the error occurs
  2. After the error, the triggering video will no longer play at all
  3. After the first occurance, there appears to be an increased probability of triggering the error with other videos (but they may still play okay)
  4. Restarting NewPipe usually fixes it
  5. It happens sporadically

krushia avatar Jul 05 '24 12:07 krushia

Clearing the metadata in the settings menu fixed the problem for me. I didn't change the DNS or anything this time.

juanfra684 avatar Jul 05 '24 23:07 juanfra684

Many users are reporting a 403 at around one minute of playback, these issues are being marked as duplicates of this issue. However this issue has significant differences in both the steps to reproduce and traceback line numbers. It's possible that these are seperate issues.

1xFF avatar Jul 06 '24 05:07 1xFF

Many users are reporting a 403 at around one minute of playback, these issues are being marked as duplicates of this issue. However this issue has significant differences in both the steps to reproduce and traceback line numbers. It's possible that these are seperate issues.

I believe both it's the same problem, because possibly the OP of this issue didn't notice that the video paused before completing 1 minute. I hadn't realized it myself when I commented earlier.

tag27 avatar Jul 06 '24 15:07 tag27

Until we know for sure that they are different issues, both 403 errors are being treated as the same.

opusforlife2 avatar Jul 06 '24 22:07 opusforlife2

Confirming that:

1. The first part of a video will play before the error occurs

2. After the error, the triggering video will no longer play at all

3. After the first occurance, there appears to be an increased probability of triggering the error with other videos (but they may still play okay)

4. Restarting NewPipe usually fixes it

5. It happens sporadically

I've found that if you do trigger the error, coming back to the video later (either from playing another file, or by restarting the app), and starting from that point doesn't run into that issue again, despite it being the same video.

YouTube Music uploads (the ones that are just album art rather than an actual video) don't seem to trigger it either, maybe they use a different format that doesn't have the same problems?

EDIT 2024-07-13: This appears to no longer work, and YouTube playback seems to now be broken on all modes.

techno156 avatar Jul 07 '24 10:07 techno156

YouTube Music uploads (the ones that are just album art rather than an actual video) don't seem to trigger it either, maybe they use a different format that doesn't have the same problems?

In my experience, both normal and YouTube Music videos are affected; I get the same exact behavior on either kind.

acarasimon96 avatar Jul 07 '24 12:07 acarasimon96

I have an idea for a workaround: Make a PR that causes NewPipe to automatically wipe the metadata cache and begin replaying the video from wherever it left off at every time this error occurs since wiping the metadata cache (in Settings -> History and Cache -> Wipe Cached Metadata) seems to make this issue go away temporarily.

NoahJelen avatar Jul 07 '24 20:07 NoahJelen

It might be connected to the latest Google's tricks with vp9 stream, to make youtube less stable on anything other than Chrome: https://www.ghacks.net/2024/06/19/google-disrupted-youtube-video-playback-on-firefox-again/ https://bugzilla.mozilla.org/show_bug.cgi?id=1878510 Symptoms look the same - I use NP mostly for music in traffic, and I've noticed that some videos (be it either YT Music ones or some totally random, normal videos, not even marked as music) have the same issues- playing first few seconds, then "Network error" and skipping to the next video in playlist. If I try to go back and skip to the part after the issue, it still wont work and requires me to force kill the app, which solves the problem (both the same video and others play properly)

uacnix avatar Jul 08 '24 22:07 uacnix

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

github-actions[bot] avatar Jul 09 '24 00:07 github-actions[bot]

I said this in one of the other linked threads: Google seems to be A/B testing a number of things recently. SponsorBlock noted that one of those things is server-side ad injection which is changing the length of the videos.

TechnologyClassroom avatar Jul 09 '24 01:07 TechnologyClassroom

It might be connected to the latest Google's tricks with vp9 stream, to make youtube less stable on anything other than Chrome: https://www.ghacks.net/2024/06/19/google-disrupted-youtube-video-playback-on-firefox-again/ https://bugzilla.mozilla.org/show_bug.cgi?id=1878510 Symptoms look the same - I use NP mostly for music in traffic, and I've noticed that some videos (be it either YT Music ones or some totally random, normal videos, not even marked as music) have the same issues- playing first few seconds, then "Network error" and skipping to the next video in playlist. If I try to go back and skip to the part after the issue, it still wont work and requires me to force kill the app, which solves the problem (both the same video and others play properly)

Surely Google intentionally trying to make YouTube less stable on browsers like Firefox could be in violation of competition laws, similar to when Microsoft was taken to court by the US government over Internet Explorer's integration into Windows 98 back in the late 1990s and early 2000s?

rjdg14 avatar Jul 09 '24 10:07 rjdg14

So this may or may not be helpful. Around the time I started being unable to play videos through Newpipe, I went to my smart TV instead to try to stream videos through SmartTube beta, and lo and behold, now there is a 403 error code whenever it tries buffering the videos.

So it could be as some people have mentioned in the thread that Google is experimenting with things server side to block requests from adblocking clients

alliethebanana avatar Jul 09 '24 17:07 alliethebanana

The only thing I can get working is other apps that utilize the invidious instances, Everything else just fails

ACR-Jeff avatar Jul 09 '24 17:07 ACR-Jeff

EDIT: I was wrong, this issue still persists

update 0.27.1 has fixed this issue for me, atleast error hasn't occurred in 24 hours after the update.

This update was fix for a new different issue.[FIXED IN 0.27.1][YouTube] HTTP error 403 when starting videos

nash268 avatar Jul 13 '24 03:07 nash268