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

Safari 11 Requested Key System Config Unavailable for clear content #1479

Closed
grantg182 opened this issue Jun 28, 2018 · 12 comments
Closed

Safari 11 Requested Key System Config Unavailable for clear content #1479

grantg182 opened this issue Jun 28, 2018 · 12 comments
Assignees
Labels
flag: Why didn't we catch this sooner This issue is embarassing; we may still need an automated test that could have prevented this issue status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@grantg182
Copy link

Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
v2.4.1-master-11-g759eef96-debug
Can you reproduce the issue with our latest release version?:
Yes
Can you reproduce the issue with the latest code from master?:
Yes
Are you using the demo app or your own custom app?:
Own
If custom app, can you reproduce the issue using our demo app?:
Uncertain
What browser and OS are you using?:
Safari 11.0.3 on macOS High Sierra (10.13.3)
What are the manifest and license server URIs?:
Will deploy to an accessible server for this to be possible to check over the internet.
What did you do?
Upgraded from 2.2 to 2.4, played an unencrypted MPD.

What did you expect to happen?
Successful playback.
What actually happened?
Playback failure with the following error:-

shaka.util.Error { "severity": 2, "category": 6, "code": 6001, "data": [], "handled": false, "message": "Shaka Error DRM.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE ()", "stack": "Error@http://localhost/content/shaka-player/dist/shaka-player.compiled.debug.js:79:779\nhttp://localhost/content/shaka-player/dist/shaka-player.compiled.debug.js:149:216\npromiseReactionJob@[native code]" }

Now, I was unsure why I would hit a Category 6 error (DRM) with an unencrypted, clear piece of content. Since we may play DRM items, we tell shaka the drm servers and advanced policies within the configure() method. Removing this from the configure() method restores functionality pre-2.4 - i.e. successful playback of non-drm content in Safari using Shaka 2.4.

Any ideas? Thanks

@grantg182 grantg182 changed the title Safari 11 Safari 11 Requested Key System Config Unavailable for clear content Jun 28, 2018
@TheModMaker
Copy link
Contributor

This is caused by #1094. Since you have DRM config, we try to initialize EME since we assume there will be encrypted content eventually. Since Safari doesn't have any EME systems, we fail to initialize. We should probably not fail if there aren't any key systems in this case.

It should be reproducible with this. It is a DashIF clear live stream with a Widevine license server URL given to it. It plays in Chrome (and probably Firefox) but not Safari.

https://shaka-player-demo.appspot.com/demo/#asset=https://vm2.dashif.org/livesim/testpic_2s/Manifest.mpd;license=https://proxy.uat.widevine.com/proxy;lang=en-US;build=uncompiled

@TheModMaker TheModMaker added type: bug Something isn't working correctly flag: Why didn't we catch this sooner This issue is embarassing; we may still need an automated test that could have prevented this issue and removed needs triage labels Jun 28, 2018
@TheModMaker TheModMaker added this to the v2.5 milestone Jun 28, 2018
@theodab theodab self-assigned this Jun 28, 2018
@grantg182
Copy link
Author

Yeah, after wasting the better part of 2 days trying to figure out if this was something I had done (after making several changes to the frontend before upgrading to 2.4), I suspected something had gone awry in 2.4. Will have to revert back to 2.2 unless there's some quick fix to implement.

Thank you for the quick response 👍

@theodab
Copy link
Contributor

theodab commented Jun 28, 2018

I just put a CL out to fix it. Hope to have it submitted by the end of the day, if possible.

@grantg182
Copy link
Author

Great, will keep an eye out. Would be great to not have to revert back to the old methods. I've actually got Shaka set up with a handler which handles pre-roll ads before we init() - coincidentally the exact purpose of the change which caused this broken behaviour! 😿

shaka-bot pushed a commit that referenced this issue Jun 28, 2018
We still load up EME for unencrypted assets if configured.
This helps us mix unencrypted ads with encrypted content.

However, this had the side effect that if the user sets DRM
configuration, the player would try to load up EME systems for
unencrypted assets, which would make it fail on platforms with no EME
systems.
That failure shouldn't really be fatal, so this silences the errors in
that case.

Issue #1479

Change-Id: I01a9a3dad8a7f7974e54a6424be8a6515a8e5f99
@theodab
Copy link
Contributor

theodab commented Jun 28, 2018

Okay, hopefully that will fix your issue. If not, though, be sure to tell us.

@grantg182
Copy link
Author

grantg182 commented Jun 28, 2018

Thanks.

So I've yet to have had a need to bring in a specific commit. Instead, just pulled master and ran with it.

So here's what I've done:-

Dropped drm_engine.js from this commit into /lib/media/ then did a rebuild, using python build/all.py then took the new shaka-player.compiled.js and shaka-player.uncompiled.js and replaced the old version of these (i.e. from 2.4 master).

Cleared all browser cache in Safari and unfortunately I'm still hitting the same error.

Please forgive my noob error. I forgot we referenced shaka-player.compiled.js in another location - replaced that version and we have lift off! Thank you very much.

Working just fine with clear (Safari and Chrome) and DRM (Widevine - Chrome) content.

@theodab
Copy link
Contributor

theodab commented Jun 28, 2018

Hm. My change fixed playback for the assets Jacob provided. I don't think you could have installed it wrong, since the changes were pretty standalone.

Well, whatever. I can look into this more next week. In the meantime, it'd help if you could provide a public server link for the assets in question, to [email protected]. Plus steps to reproduce on the demo app, if possible?

@grantg182
Copy link
Author

grantg182 commented Jun 28, 2018 via email

@theodab
Copy link
Contributor

theodab commented Jun 28, 2018

No worries! Glad to have helped.

@theodab theodab closed this as completed Jun 28, 2018
@joeyparrish
Copy link
Member

This change will be cherry-picked for v2.4.2.

joeyparrish pushed a commit that referenced this issue Jun 29, 2018
We still load up EME for unencrypted assets if configured.
This helps us mix unencrypted ads with encrypted content.

However, this had the side effect that if the user sets DRM
configuration, the player would try to load up EME systems for
unencrypted assets, which would make it fail on platforms with no EME
systems.
That failure shouldn't really be fatal, so this silences the errors in
that case.

Issue #1479

Backported to v2.4.x

Change-Id: I01a9a3dad8a7f7974e54a6424be8a6515a8e5f99
@joeyparrish
Copy link
Member

Cherry-picked for v2.4.2.

joeyparrish pushed a commit that referenced this issue Jun 29, 2018
We still load up EME for unencrypted assets if configured.
This helps us mix unencrypted ads with encrypted content.

However, this had the side effect that if the user sets DRM
configuration, the player would try to load up EME systems for
unencrypted assets, which would make it fail on platforms with no EME
systems.
That failure shouldn't really be fatal, so this silences the errors in
that case.

Issue #1479

Backported to v2.3.x

Change-Id: I01a9a3dad8a7f7974e54a6424be8a6515a8e5f99
@joeyparrish
Copy link
Member

Cherry-picked for v2.3.10.

@shaka-project shaka-project locked and limited conversation to collaborators Aug 27, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: Why didn't we catch this sooner This issue is embarassing; we may still need an automated test that could have prevented this issue status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants