Piped icon indicating copy to clipboard operation
Piped copied to clipboard

Failed with error code 3016. See logs for more info

Open TheCrimsonLady opened this issue 1 year ago • 14 comments

Official Instance

Describe the bug

Hello,

I have an issue with my instance that has persisted for around two weeks by now and is also reproducible on the official instance. I get an error saying the title. Unfortunately, I cant seem to find anything in the logs (looked at all container logs individually) and grepping all docker logs for 3016 gets me zero hits. The error only occurs on iOS, as of now iOS 18.3.1. I also reinstalled Piped according to documentation with no change to my problem (except now videos stop playing after one minute on desktop...)

I have no idea how to troubleshoot this since the logs aren't telling me anything, so please tell me what I should include apart from my redacted config.properties and docker compose

To Reproduce

  1. Go to official piped instance on iOS 18.3.1
  2. pick any video
  3. it only displays the error from the title and does not play a video

Expected behavior

The video should play normally

Logs/Errors

No response

Browser, and OS with Version.

Safari and Firefox on iOS 18.3.1

Additional context

config-properties.txt docker-compose.txt

TheCrimsonLady avatar Mar 05 '25 08:03 TheCrimsonLady

I have the same error occurring with the latest docker builds and in my research came across this closed issue from shaka-player, https://github.com/shaka-project/shaka-player/issues/3509, though it remains unsolved and closed. Another project has a similar issue still open that also deals with streaming protocols and iOS Safari found here, https://github.com/servo/servo/issues/34174. I don't know if they are indeed related to this issue as I've not found anything definitive, the fact that one issue affects shaka-player and the other relates to HLS leads me to suspect it may be the same issue that is occurring here. Sorry if this is a completely off base assumption, but thought I would share in the hopes it gives some idea to someone far more knowledgeable than myself.

haderp avatar Mar 06 '25 19:03 haderp

That doesnt sound unlikely, but I can't test the HLS setting because the settings page does not save this specific item. All other options can be saved and are actually applied, except this one. Any ideas?

TheCrimsonLady avatar Mar 07 '25 16:03 TheCrimsonLady

Sorry, I haven’t delved into that yet. Given that it doesn’t appear to be an issue being more widely reported I speculate it may be something environmentally specific that is the cause more so than something seen by iOS users en masse. When I have time I planned to setup a test vm in order experiment with what could be the culprit. I wish I had a better answer, hopefully someone with more knowledge of how the player works will chime in with a more educated idea on troubleshooting.

haderp avatar Mar 10 '25 18:03 haderp

I'm also having this issue on iOS v16.7.10; it makes Piped entirely unusable, tested in Firefox and Safari. I couldn't test the "Prefer HLS over DASH" option since it resets whenever I enable it. If there's any testing I can do, I'd be happy to help.

Insprill avatar Mar 10 '25 19:03 Insprill

This issue seems to be related to #3981

takov751 avatar Mar 12 '25 16:03 takov751

I see the same on my local instance. No iPhone iOS safari or brave clients (18.3.1, 18.3.2) are able to play any videos (same 3016 error), but desktop clients (macos, windows, linux - any browser) and iPadOS clients (18.1.1 and 18.3.2) play videos just fine.

Nothing in the logs, everything looks fine from proxy and piped frontend, backend, ytproxy, bg-helper perspective. No particular configuration other than using BG_HELPER_URL set to my local bg helper instance.

oivindoh avatar Mar 15 '25 11:03 oivindoh

Chiming in here with the same experience. iOS 18.3.2, get the same error in Firefox and Safari and, I suspect, the Yattee app (it gives a different error, but quite generic, making me think it hit the same issue and couldn't play).

I can play just fine in Firefox on a Mac, though.

Edit: nothing useful in my proxy or backend container logs, and the frontend container only logs 4 requests, each with a 200 response, so nothing useful there either.

DeltaTangoLima avatar Mar 19 '25 07:03 DeltaTangoLima

why don't solve this problem??!!

qsfecdcdd avatar Mar 28 '25 07:03 qsfecdcdd

Anybody not want to fix problem. Right?

qsfecdcdd avatar Apr 10 '25 00:04 qsfecdcdd

Are you lazy? Didn’t fix problem!

qsfecdcdd avatar Apr 10 '25 01:04 qsfecdcdd

@qsfecdcdd This is an open source project. Write the code and fix it yourself if you think it’s that easy.

Calling the developers that donate their time to this project “lazy” is incredibly rude and disrespectful. This entire project is maintained by people who do this for free. If you want something addressed, I guarantee being rude and calling people lazy won’t help.

grantmatthews18 avatar Apr 11 '25 13:04 grantmatthews18

I've looked into this issue further and found the following:

  • This appears to only affect Apple WebKit Browsers (Safari on MacOS and all iOS Browsers)
  • These browsers all don't support Shaka Player for HLS Streams and will attempt to use Apple's AVPlayer instead to decode the HLS video stream. I'm not sure if my findings are correct from here onwards...
  • Youtube's DRM uses Widevine or some other DRM scheme when playing HLS streams via Shaka Player. Shaka Player + Piped Proxy can decode this DRM effectively (why HLS still works on other browsers and OSes)
  • Youtube's DRM has to use Apple Fairplay DRM when playing an HLS stream via AVPlayer (since AVPlayer doesn't support other DRM schemes). Piped Proxy + AVPlayer can't decode Youtube's Fairplay DRM implementation so the HLS stream can't be loaded in AVPlayer.

I think this means that the Piped Proxy is ultimately the issue here and the Proxy isn't successfully decoding the Fairplay DRM from Youtube's HLS Stream before passing it onwards to the clients. This would explain why I can't get a Piped HLS Stream to work in Yattee (via AVPlayer). Unfortunately, I don't know enough about how the Proxy works to debug it nor do I have the time to try and learn it. Hoping this comment is helpful to those with more familiarity with the project.

grantmatthews18 avatar Apr 29 '25 16:04 grantmatthews18

I've looked into this issue further and found the following:

* This appears to only affect Apple WebKit Browsers (Safari on MacOS and all iOS Browsers)

* These browsers all don't support Shaka Player for HLS Streams and will attempt to use Apple's AVPlayer instead to decode the HLS video stream.
  _I'm not sure if my findings are correct from here onwards..._

* Youtube's DRM uses Widevine or some other DRM scheme when playing HLS streams via Shaka Player. Shaka Player + Piped Proxy can decode this DRM effectively (why HLS still works on other browsers and OSes)

* Youtube's DRM _has_ to use Apple Fairplay DRM when playing an HLS stream via AVPlayer (since AVPlayer doesn't support other DRM schemes). Piped Proxy + AVPlayer can't decode Youtube's Fairplay DRM implementation so the HLS stream can't be loaded in AVPlayer.

I think this means that the Piped Proxy is ultimately the issue here and the Proxy isn't successfully decoding the Fairplay DRM from Youtube's HLS Stream before passing it onwards to the clients. This would explain why I can't get a Piped HLS Stream to work in Yattee (via AVPlayer). Unfortunately, I don't know enough about how the Proxy works to debug it nor do I have the time to try and learn it. Hoping this comment is helpful to those with more familiarity with the project.

I have this problem on Firefox on my Mac and also on my Android Phone. In most cases the videos play regularly, then at some time, abort. When i refresh i get Error 3016. I have this problem since i migrated my Piped instance from my old Synology to an Unraid Server.

zotac99 avatar Jun 04 '25 11:06 zotac99

Anyone here coming to look for clues: I've fixed "Error 3016" issues with reverting https://github.com/TeamPiped/Piped-Backend/commit/df57236657ab94ee7ee8890513e5cc567d26eeec - so I have enabled ump and srfvp (set to 1)

mdbraber avatar Aug 17 '25 12:08 mdbraber