TeamPiped / Piped

An alternative privacy-friendly YouTube frontend which is efficient by design.
https://piped.video
GNU Affero General Public License v3.0
8.21k stars 671 forks source link

Error 1001, 1002 and 1003 #2915

Open DanielProg39 opened 1 year ago

DanielProg39 commented 1 year ago

Official Instance

Describe the bug

I opened this video and got a message saying: "Failed with error code 1001, see logs for more info". Other videos play properly without any issues.

To Reproduce

  1. Open this video.
  2. Observe an error.

Expected behavior

Video should play like any other.

Logs/Errors

Found this in logs:

Error: Shaka Error
    at new x (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:22884)
    at nm (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:389839)
    at Vy.h (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:391259)
    at Cr (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4167)
    at Hy.next (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4465)
    at t (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4694)

Can provide more logs if required

Browser, and OS with Version.

Brave 1.57.62 on Chromium 116.0.5845.180

Additional context

No response

ReshmaM8 commented 1 year ago

(When I click on your video I get error 1002; there are other videos in my feed also encounter error 1002 as well. Yet some videos play fine. I joined few hours ago on Chrome 116.0.5845.180 with duckduckgo search engine

DanielProg39 commented 1 year ago

Now the video is playing fine for me, no errors. @ReshmaM8 let us know when there are no errors, until then I'll leave the issue open.

ReshmaM8 commented 1 year ago

I have inconsistent response when I try to play this video: Link I played first on my main chrome profile and it works but when I opened a guest profile , go to piped.video -> search this video and hit play I get error code 1002. image I have two .har network logs - one when the video did load and one with the error code; should I attach them(sensitive info redacted using google HAR analyzer) here or do I send it to specifically to an email ?

FireMasterK commented 1 year ago

You can send it to kavin@kavin.rocks, I'll have a look!

oneover0 commented 1 year ago

are you facing this issue still? i am getting this same error in every video .

ReshmaM8 commented 1 year ago

yeah, I'm having the same issue. The network traffic shows the video playback in a cycle of cancelled -> 500 --> one 200 request --> pending.

DanielProg39 commented 1 year ago

Now the video is playing fine for me, no errors.

Not anymore. Now I get misterious Error 1002 for the video I reported in the first place.

Here's new error log in stack:

Error: Shaka Error
    at new x (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:22884)
    at Vy.h (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:391198)
    at Cr (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4167)
    at Hy.throw (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4560)
    at n (https://piped.video/assets/shaka-player.ui-92211a3f.js:1:4730)
EHP4321 commented 1 year ago

Having the same problem. Getting 1002 error. Sometimes just changing instance works. But once a video fails on a specific instance it keeps failing on that instance, but switching to another video generally works. So maybe there is a cache issue. Edit: Actually It seems switching instance always works. Edit 2: Nope looks like I was just lucky a few times

opusforlife2 commented 12 months ago

Apart from Error 1002, I've also seen 1003 several times.

DanielProg39 commented 12 months ago

Now the video is playing fine for me, no errors.

Again. Got no errors

saenglert commented 12 months ago

The bug appears to be cause by missing cors headers in the http response: https://github.com/TeamPiped/Piped/issues/2970#issuecomment-1730104033

DanielProg39 commented 12 months ago

The bug appears to be cause by missing cors headers in the http response: #2970 (comment)

I've noticed CORS errors many times in the past in plenty videos, though they led to video starting playing later than usual or load for a long time, they haven't let to any errors displayed.

DanielProg39 commented 12 months ago

Again. Got no errors

Checked the video out once more. Error 1002.

"Error: Shaka Error 1002
    at new x (https://piped.video/assets/shaka-player.ui-7171c67c.js:1:22922)
    at Hy.h (https://piped.video/assets/shaka-player.ui-7171c67c.js:1:391789)
    at Mr (https://piped.video/assets/shaka-player.ui-7171c67c.js:1:4167)
    at qy.throw (https://piped.video/assets/shaka-player.ui-7171c67c.js:1:4560)
    at n (https://piped.video/assets/shaka-player.ui-7171c67c.js:1:4730)"
saenglert commented 12 months ago

The bug appears to be cause by missing cors headers in the http response: #2970 (comment)

I've noticed CORS errors many times in the past in plenty videos, though they led to video starting playing later than usual or load for a long time, they haven't let to any errors displayed.

grafik

Well, if you look at the error object, you can see it is caused by the network error. And the network error is caused by the connection not completing because of the missing cors header.

opusforlife2 commented 12 months ago

I got a 1002 on the Syncpundit instance as well, but only once, and a reload fixed it immediately.

saenglert commented 11 months ago

kavin.rocks now returns the proper headers and I no longer receive the error.

image

DanielProg39 commented 11 months ago

Everything seems to be back to normal. I'm not getting any errors and no CORS errors, although the video was loading endlessly. After reloading the page several times and setting the playback indicator to the beginning of the video, the video started playing and played to the end without any problems. I suspect this was something to do with the cache.

Overall, the issue seems to have been resolved. I'm going to keep it open for a while in case anyone else is still experiencing these errors. So if you got them in any videos, check them now and report if any of them still seem to be broken.

ghost commented 11 months ago

@DanielProg39 can you check this https://piped.video/watch?v=oRdxUFDoQe0 ? For me, its giving 1001 error

DanielProg39 commented 11 months ago

@DanielProg39 can you check this https://piped.video/watch?v=oRdxUFDoQe0 ? For me, its giving 1001 error

Strangely, I got no errors or problems. The whole video played perfectly

ReshmaM8 commented 11 months ago

@DanielProg39 can you check this https://piped.video/watch?v=oRdxUFDoQe0 ? For me, its giving 1001 error

I checked as well, no issues (chrome, win 10) other videos are playing for me as well - just at the beginning it takes a while to load cause the video playback fails a couple of times before succeeding

ghost commented 11 months ago

@DanielProg39 @ReshmaM8 Actually the problem was from ISP😅. When i switched isp to telecom one, it works fine. Thanks

opusforlife2 commented 11 months ago

Still had some 1002's yesterday. Had to switch back and forth between instances to be able to watch the intended videos.

ghost commented 11 months ago

1002 here. happens all the time on almost all instances.

ghost commented 11 months ago

Still had some 1002's yesterday. Had to switch back and forth between instances to be able to watch the intended videos.

I'm having to switch all the time, and it also happens to invidious. I'd rather just use youtube at this point.

ghost commented 11 months ago

1002 here. happens all the time on almost all instances.

I'm having to switch all the time, and it also happens to invidious. I'd rather just use youtube at this point.

Now, both NewPipe and Clipious work almost without issues at any given time. why is that the websites work so badly and the Android applications work so well?

opusforlife2 commented 11 months ago

Consistently getting a 1001 on https://piped.video/watch?v=xzXDSWz3Nbw. If someone is online right now and can confirm this, it would help figure out whether this is a universal bug or user/IP/location specific.

Some stuff from Web Console error messages:

XHRGET
https://pipedproxy-bom-2.kavin.rocks/videoplayback?expire=[redacted]
[HTTP/3 403 Forbidden 525ms]

Object { code: 1001, message: "Shaka Error 1001" }
DanielProg39 commented 11 months ago

Consistently getting a 1001 on https://piped.video/watch?v=xzXDSWz3Nbw.

Checked on my phone, the video plays instantly, with no errors

opusforlife2 commented 11 months ago

... and I'm still getting a 1001 on it no matter how many times I refresh the browser. So that's a data point, at least.

Switched instances. It plays. Switched back to official instance. 1001 again.

DanielProg39 commented 11 months ago

Strange. I'll also check it on my laptop tomorrow

opusforlife2 commented 11 months ago

I'm not sure the error lasts that long.

DanielProg39 commented 11 months ago

No issues on my laptop as well

opusforlife2 commented 11 months ago

👍

Just to confirm one final time, I'm still getting the 1001.

ghost commented 11 months ago

Consistently getting a 1001 on https://piped.video/watch?v=xzXDSWz3Nbw. If someone is online right now and can confirm this, it would help figure out whether this is a universal bug or user/IP/location specific.

Me too when tried it on all ISP service i have. But works fine when using VPN

ReshmaM8 commented 11 months ago

Consistently getting a 1001 on https://piped.video/watch?v=xzXDSWz3Nbw. If someone is online right now and can confirm this, it would help figure out whether this is a universal bug or user/IP/location specific.

Me too when tried it on all ISP service i have. But works fine when using VPN

not on vpn rn and it works for me

opusforlife2 commented 11 months ago

Damn, that video is still giving me a 1001. Usually these errors resolve themselves after a day.

CustardFlan commented 11 months ago

I had the same error yesterday, i checked and, my DNS resolver (dnsdist) was failing resolving the googlevideo domain Restarted it and it's working again

driscollw commented 11 months ago

Had the 1002 error and was able to correct after a few Chrome setting changes. Turned off Enhanced Protection and switched Secure DNS from Cloudflare 1.1.1.1 back to "With your current service provider". Restarted Chrome and all the problem videos played.

opusforlife2 commented 11 months ago

I see. Next time I encounter it I'll try switching the DoH provider.

justanotherbody commented 11 months ago

I was getting 1002 errors. Checking the firefox console I found a message

Failed to register/update a ServiceWorker for scope ‘https://piped.kavin.rocks/’: Storage access is restricted in this context due to user settings or private browsing mode.

This led me to this search result

Toggling privacy.partition.serviceWorkers to false in about:config seems to have resolved this

opusforlife2 commented 11 months ago

That doesn't seem right. The link you've provided says to do the opposite to solve the issue. Also, that's a pretty important pref to keep toggled on.

driscollw commented 11 months ago

The moment I turn on secure DNS either in Windows using google automatic template 8.8.8.8 or enable in Chrome I start to have issues. 1002 and/or CORS failure. Could not load the feed. Switched Windows back to unencrypted DNS using ISP (Verizon) and was able to get the page to load.

Edit. The more I change and test I am really starting to think it's the Safe Browsing settings in chrome which enables CORS. Seems random but dev tools is definately complaining about it. I've now seen it fail with both secure DNS and with it unencypted.

justanotherbody commented 11 months ago

That doesn't seem right. The link you've provided says to do the opposite to solve the issue. Also, that's a pretty important pref to keep toggled on.

I agree it's strange and literally the opposite of what was suggested. I do not think this is the right answer but I added it in case the context helped others

digisomni commented 11 months ago

This happens a lot for me too, doesn't happen on yewtu.be which is Invidious.

shrugal commented 10 months ago

This started happending on my personal instance today. I get one of these errors seemingly at random, after it showed the loading indicator for a few seconds. Sometimes reloading the page fixes it, sometimes it doesn't. I don't use DoH and changing the settings suggested in other comments (serviceworker, privacy protection) doesn't seem to change anything.

matianga2000 commented 10 months ago

Today I came across this issue. I am unable to load certain videos, mostly videos that I find using the search bar. Switching to a different instance seemed to resolve the issue but after a few minutes the errors would pop up and not load the videos (error code 1002 and 1003). I haven't tried much to fix the problem but I'll update it if I found something useful.

Update: The issue seems to be solved (for me), now I can open the locked videos. Piped also feels more reactive idk why

Tyr4El commented 10 months ago

it is not happening on every video from the same instance. I do'nt know if it has already been mentionned but you can actually see some part of the catalogue. So I guess it has to do with the settings of the video itself. So maybe we should compare video from video? https://piped.kavin.rocks/results?search_query=c+politique A lot of those videos were not working, where at the same time the ones from top tendancies are fine liek this one https://piped.kavin.rocks/watch?v=sU1vWFdIaxM

Invidious instances does work on the video which does not on piped... But I've noticed that Piped on kavin.rocks does ask for Android video. So again maybe it's the setttings of the video itself... Or The IP's could be flagged specifically and filter the access from video to video?

lordkitsuna commented 7 months ago

This seems to suddenly behappening on all instances i can find now including the official one. I've tried different dns/doh to no avail. It also happens in different browsers/devices/apps(libretube)

ngn13 commented 7 months ago

I (randomly) started to have the same problem on my instance

2024-01-31_23-02

I think this is just youtube IP blocking instances, as I was able to fix the issue by setting a proxy for the piped-proxy

tonytonyistony commented 7 months ago

@FireMasterK I spent a great deal of time troubleshooting this issues as a server hoster. A friend kept contacting me saying on random video, in firefox, he would get a 1002 errors. But when playing through chrome based browsers, he had no issues.

After looking at the network details of GET call I noticed I was getting a ns_error_net_interrupt. This brought be to find this serverfault...

https://serverfault.com/questions/1142460/firefox-gets-ns-error-net-interrupt-when-clicking-on-loaded-page

Seems there is a cache that needs to be extended to get the proxy call to complete, if Im understanding it correctly.

I then went to my Nginx reverse proxy config and added this line to proxy location

proxy_cache_valid any 1m;

After restarting nginx, I tested again and the issue was resolved for the end user.

AlyoshaVasilieva commented 6 months ago

In my brief testing, disabling UMP seems to fix it. I did a quick hack to fix it without recompiling anything by rewriting the URI in Caddy.

pipedproxy.domain.tld {
        uri replace "&ump=1" ""
        reverse_proxy http://127.0.0.1:8080
}

It should be possible to do in nginx too.

I don't know what possible negative effects this could have. I also don't know what UMP is.