-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[YouTube] 403 HTTP error when trying to play some videos #9038
[YouTube] 403 HTTP error when trying to play some videos #9038
Comments
So as to not duplicate the issue, I'm also have inconsistent 403 errors. ReportException
Crash log
Also, the 403 error results in the app trying to open the video repeatedly, which repeatedly increases the viewcount. Not sure how to get a log for that - it's technically working as intended. Screen recordinghttps://gfycat.com/WellmadeSociableBluebottlejellyfish Note: the repeated edits are because I couldn't get the bloody gif to embed properly |
They're the same crash logs. |
P.S: now the link works perfectly with no bug. |
Exact same issue, sometimes a video that works doesn't work later and vice versa (I am on Android 13). Edit: This may be hard to diagnose as it doesn't occur with all videos. |
I think I have the same issue. Exception
Crash log
|
So, as it seems you are more and more to have this issue, could you answer the following questions when you get it?
@Coding-Dynasty Please use in the future better issue titles, |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
A little more info from an occurance today:
Nope.
I followed these steps and the external video player option didn't show up. I don't ever use this feature in the first place. For what it's worth, the bug report says "error occurred while playing https://www.youtube.com/watch?v=[...]". This URL was also used by the "open in browser" function.
I don't use an external player and have no experience using one. Don't even know if I have one installed.
I would check this, but as others have pointed out, force-quitting seems to get around the issue - installing the debug build would quit the original NewPipe instance and therefore I can't check this myself. Hope that helps, even though it's not all you asked for. |
Unfortunately not. Additional question: does this issue happen when trying to download videos using the latest version of yt-dlp? Some reports have been made here (and on youtube-dl too), stating that the fallback server that YouTube adds in its streaming URLs may work in this case. |
They're the same crash logs.
…On Wed, 28 Sep 2022, 9:00 am fohfuu, ***@***.***> wrote:
So as to not duplicate the issue, I'm also have inconsistent 403 errors.
Report ## Exception * __User Action:__ play stream * __Request:__ Player
error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing
https://www.youtube.com/watch?v=dwzIu4zFJVI * __Content Country:__ GB *
__Content Language:__ en-GB * __App Language:__ en * __Service:__ YouTube *
__Version:__ 0.24.0 * __OS:__ Linux
motorola/liber_retaile/liber:10/QPI30.73-33/f59be:user/release-keys 10 - 29 *Crash
log *
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:632)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:604)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:241)
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: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.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:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
------------------------------
Also, the 403 error results in the app trying to open the video
repeatedly, which repeatedly increases the viewcount. Not sure how to get a
log for that - it's technically working as intended.
Screen recording
<iframe src='https://gfycat.com/ifr/WellmadeSociableBluebottlejellyfish'
frameborder='0' scrolling='no' width='100%' height='100%'
style='position:absolute;top:0;left:0;' allowfullscreen></iframe>
—
Reply to this email directly, view it on GitHub
<#9038 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2QCVRG3M37UI4KSCGY4RMLWAOKEBANCNFSM6AAAAAAQXIIO2Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I am experiencing the same issue. I have observed that it tends to happen especially when I click on a video and, while is loading, I turn my phone sideways (in landscape mode), but sometimes it happens without a pattern occuring. The app crashes and I receive a Network Error notification. I am using NewPipe x Sponsorblock on a Pixel 4a running Graphene OS 13 (TP1A.221005.002), but I believe that the cause of the error might be upstream, in this repo. Error report is as follows:
Exception
Crash log
|
This comment was marked as spam.
This comment was marked as spam.
Stop spamming the same comment with the same stacktrace! Please give us instead useful information to help us to identify the problem (see my comments above). Otherwise, this issue couldn't be fixed. |
This comment was marked as spam.
This comment was marked as spam.
Hello, I tried the linked debug build as requested and I got a 403 immediately, stack trace below in case there is anything of interest. What I did: Please note the app was at default settings The package name is not listed in the info below but it says debug.usecronetforplayback Exception
Crash log
|
@ajm83 Thanks. Could you try to answer the other questions in my comments above? |
This comment was marked as duplicate.
This comment was marked as duplicate.
I'm experiencing the same issue on LineageOS 19.1. I'll try to answer @AudricV questions below.
No.
Intent details
No, it doesn't. I've tried with VLC and I can play the stream with no issues.
Yes, it does. Please, see error report at the bottom of this comment. Error report generated by org.schabi.newpipe v0.24.0Exception
Crash log
Error report generated by org.schabi.newpipe.debug.usecronetforplayback v0.24.0Exception
Crash log
|
@oirtemed Thanks a lot. What is your default quality in the in-app player? Is it the same as the one you used to play the content in VLC? I have additional questions:
|
Some hopefully useful information - first time I've been near a PC when I've had the issue.
Running a diff of the failure vs success from Intent Intercept on opening background audio there was very little to see in terms of difference. As expected opening the links on my PC one 403'd and the other gave me the audio. Running OnePlus Nord CE with Android 11 - customised LineageOS 18.1 EDIT: My TODO: |
@chronos281 Thanks (even if I don't understand some parts of what you wrote). Could you test if using the fallback server provided in the original URL works when you get 403s? To do so, use the following steps:
|
@AudricV sorry I think I was wrong in my previous comment. When the error happens I'm not able to stream it with VLC, I get the error "The location X cannot be played" where X is the URL. Please, find below the answer to your questions (including the one related to the fallback server).
I have the default video resolution set to 720p and it's the same I use to play the stream in VLC.
When I'm able to play the stream with the in-app player I'm also able to play the video stream with VLC using all the available resolutions.
Sorry but I'm not sure if understand. You mean playing the content using the "background" option? Or do you mean to download the video selecting the "audio" option and then playing the downloaded audio file?
It seems to work fine using the fallback server. Please, find below the intent details and a test against the fallback server using Intent details
Mod edit: duplicate error report removed |
Exactly, sorry for the confusion. Thanks for testing the fallback server! The question is now: is the 403 response code voluntary against third-party clients from Google video servers or is it a server issue? It would be great if you can test this on YouTube websites to know if you get this behavior on them (watch videos on YouTube with the developer tools of your browser enabled and check for 403 of Note: I tested your streaming URL with the fallback host and the redirector domain ( It won't be testable of course in a few hours, as the URL would have expired. |
I've just performed a second test with a different video. This time the fallback server didn't work and got a 403. Please, find at the bottom the output. Does it make sense?
After the error is reported, if I tap on "Background" the app doesn't do anything and it doesn't report any error. I can download the audio track though. I can also play the audio using VLC. I'll try what you suggested with the browser developer tools during the week. cURL output:
Intent details
|
Can confirm fallback server appears to fix the issue, both modifying in Intent Intercept before continuing to VLC or loading modified link in a fresh browser window. Had half an hour or so of youtube on the pc, only had one 403 and that was for https://i.ytimg.com, nothing but 200's far as the eye can see for Will try and remember to have dev tools open in the background next time for a longer session, possibly look at seeing if I can get some sort of dev tools working on my phone just in case that makes a difference. |
Seems I didn't have a large enough sample size. Ran two more after seeing your note. One worked one did not: Success Failure |
I've also been suffering from this problem for a while now. I've managed to come up with a fix which should hopefully be merged soon. |
i have this issue as well and i think i've worked out the problem, youtube is A/B testing a new requirement for requests (like #8713 and also tied to visitorData). the required parameter is field number 12 in the protobuf (very long base64 string), the JSON name is "params" -- it seems to be some kind of ad token? strangely even though using the JSON API without the parameter gets you a 403, when using the protobuf interface you get the famous 'content is not available on this app' message instead. edit: since params contains protobuf-encoded data, removing all the fields except the ones the server needs gets you the following working (for now) value: |
Could you test the APK from this CI run (section https://github.com/AudricV/NewPipe/actions/runs/3352339641 Thank you in advance. |
@AudricV Yep this seems to have fixed it. Awesome! |
Checklist
Affected version
0.24.0
Steps to reproduce the bug
I clicked on a random video
Expected behavior
No response
Actual behavior
Exception
Crash log
Screenshots/Screen recordings
No response
Logs
No response
Affected Android/Custom ROM version
No response
Affected device model
j4
Additional information
No response
The text was updated successfully, but these errors were encountered: