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

Error with clearkey config on live streams #6710

Closed
FlowersPowerz opened this issue May 30, 2024 · 22 comments · Fixed by #6737
Closed

Error with clearkey config on live streams #6710

FlowersPowerz opened this issue May 30, 2024 · 22 comments · Fixed by #6737
Assignees
Labels
component: ClearKey The issue involves the ClearKey DRM priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Milestone

Comments

@FlowersPowerz
Copy link

FlowersPowerz commented May 30, 2024

Have you read the FAQ and checked for duplicate open issues?

If the problem is related to FairPlay, have you read the tutorial?

Not related to fairplay

What version of Shaka Player are you using?
v4.9.0-uncompiled

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
The demo

If custom app, can you reproduce the issue using our demo app?
N/A

What browser and OS are you using?
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

uri= [censored]/master_stereo.mpd
The mpd link I cannot share, it is from an ott service that I do not have the rights to disclose. However it happens with any mpd with clearkey so it is a general problem, not related to a single stream.

What configuration are you using? What is the output of player.getConfiguration()?

What did you do?

I started the stream with clearkey to test the functionality of chromecast, and this on the device does not start, it gives me error drm is not iterable. If I switch to an earlier version it works, but the cast of chromecast still does not work with any version of the demo, it returns this error if you try to cast a stream dash mpd:
undefined is not iterable (cannot read property X Symbol(Symbol.iterator))

What did you expect to happen?
It should work both on phone or pc and on chromecast (in this case ultra) without problems, as it worked until a few days ago. The error occurs starting with the current version 4.9.0, which makes clearkey streams completely unplayable on all devices, and has broken the cast function on all versions of shaka player, even earlier than this one, which previously worked perfectly.

What actually happened?
With cast to chromecast it gives
undefined is not iterable (cannot read property X Symbol(Symbol.iterator))
Also with earlier version too.

And it gives me this error on any device if I start a stream (any) with clearkey on v4.9.0:
drminfos is not iterable

@FlowersPowerz
Copy link
Author

A the moment the cast function for streams with clearkey, is completely broken. But the player work if I downgrade to earlier versions, like 4.7.14

@joeyparrish joeyparrish self-assigned this May 30, 2024
@joeyparrish
Copy link
Member

The first thing we checked was that the demo receiver app matches the demo version. We used to have receiver app IDs per release branch, but the last branch-specific receiver app was for v4.3. Since then, the demo app points at a nightly build of the receiver. So it should be up-to-date.

Still looking into it.

@joeyparrish
Copy link
Member

What are the manifest and license server URIs?

uri= [censored]/master_stereo.mpd The mpd link I cannot share, it is from an ott service that I do not have the rights to disclose. However it happens with any mpd with clearkey so it is a general problem, not related to a single stream.

That puts a quick end to my investigation.

Quoting the issue template:

@joeyparrish joeyparrish added type: bug Something isn't working correctly status: waiting on response Waiting on a response from the reporter(s) of the issue priority: P2 Smaller impact or easy workaround platform: Cast Issues affecting Cast devices labels May 30, 2024
@shaka-bot shaka-bot added this to the v4.10 milestone May 30, 2024
@FlowersPowerz
Copy link
Author

FlowersPowerz commented May 30, 2024

What are the manifest and license server URIs?
uri= [censored]/master_stereo.mpd The mpd link I cannot share, it is from an ott service that I do not have the rights to disclose. However it happens with any mpd with clearkey so it is a general problem, not related to a single stream.

That puts a quick end to my investigation.

Quoting the issue template:

@FlowersPowerz
Copy link
Author

The first thing we checked was that the demo receiver app matches the demo version. We used to have receiver app IDs per release branch, but the last branch-specific receiver app was for v4.3. Since then, the demo app points at a nightly build of the receiver. So it should be up-to-date.

Still looking into it.

I didn't know about this differentiation with the cast, actually trying with a version prior to 4.3, right now I tried with 4.2.14, the cast and the player work without problems and without errors, with the exact same configuration, so I exclude that there are problems on my part

@joeyparrish
Copy link
Member

That config looks right to me. Is it working on desktop browsers, but not with Cast?

@joeyparrish
Copy link
Member

I have The streams and clearkeys from the ott platform, but they are strictly confidential , in order to solve the problem send them to the indicated email is it safe?

That email will go to myself and the three other Googlers who work on Shaka, plus our two non-Google maintainers @avelad and @littlespex.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label May 30, 2024
@FlowersPowerz
Copy link
Author

That config looks right to me. Is it working on desktop browsers, but not with Cast?

They currently do not work on either desktop, mobile, or cast with 4.9.0. While switching to an earlier version works on desktop or other browser, but not on cast since as you told me it points directly to the latest version, which precisely has problems. On the other hand, if I use a pre 4.3 version it also works perfectly on cast

@joeyparrish
Copy link
Member

Ah, so the issue is not cast-specific. It is only that clearkey config doesn't work on newer versions.

If you can't share a URI with us, you can debug it yourself with git bisect:

  1. Run git checkout main && git pull origin
  2. Run git bisect start
  3. Build and test locally from main. If failing, run git bisect bad.
  4. Run git checkout v4.2.0 or any other .0 version you know works.
  5. Build and test locally. If passing, run git bisect good.
  6. Now git-bisect will take over and run you through more revisions to bisect the range of commits.
  7. At each commit, build and test locally. Run git bisect bad if failing, git bisect good if passing.
  8. At the end of this process, git will tell you the first bad commit. Report that here.
@joeyparrish joeyparrish removed the platform: Cast Issues affecting Cast devices label May 30, 2024
@joeyparrish joeyparrish changed the title Error stream with clearkey and cast to chromecast May 30, 2024
@FlowersPowerz
Copy link
Author

I honestly cannot even compile the code. I can't seem to link the dist folder, and when I start the web demo either the css is corrupt and missing, or if I manually link the css from the dist folder, the web graphics work, but the rest doesn't, this on both mac and windows and linux. I don't have time to try to solve this problem right now, so I'll email you the uri, hoping for your discretion

@avelad
Copy link
Collaborator

avelad commented May 31, 2024

For clearkey to work you need to have a clearkey ContentProtection element, for example:

<ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b" cenc:default_KID="feedf00d-eede-adbe-eff0-baadf00dd00d">
  <cenc:pssh>AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAH+7fAN7t6tvu/wuq3wDdANAAAAAA==</cenc:pssh>
</ContentProtection>

An example of a working clear is at:
https://storage.googleapis.com/shaka-demo-assets/angel-one-clearkey/dash.mpd

@avelad avelad added the status: working as intended The behavior is intended; this is not a bug label May 31, 2024
@avelad avelad removed this from the v4.10 milestone May 31, 2024
@avelad avelad added status: waiting on response Waiting on a response from the reporter(s) of the issue and removed type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround labels May 31, 2024
avelad added a commit that referenced this issue May 31, 2024
joeyparrish pushed a commit that referenced this issue May 31, 2024
@sandrossano
Copy link

I having the same problem, I downgraded to a previous version (even before 4.3) but it works from desktop not from chromecast.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 2, 2024
@fkoemep
Copy link

fkoemep commented Jun 2, 2024

Done some tests and can confirm that issue this affects 4.8.9, 4.8.10, 4.9.0 and 4.9.1 versions. Previous versions seem to be unaffected by this (but they are all affected by the cast issue).

The last version that seems to be able to cast is 4.2.14, I don't know exactly what's going on but seems like something big happened...

@FlowersPowerz
Copy link
Author

Done some tests and can confirm that issue this affects 4.8.9, 4.8.10, 4.9.0 and 4.9.1 versions. Previous versions seem to be unaffected by this (but they are all affected by the cast issue).

The last version that seems to be able to cast is 4.2.14, I don't know exactly what's going on but seems like something big happened...

Same thing I reported, I am currently using 4.2.14, although it has a lot of missing features being a very old version. The problem is quite serious, but yet the insider thinks everything is working as it should, when in fact it is not, and it is a relief to know that I am not the only one who has noticed it

@avelad
Copy link
Collaborator

avelad commented Jun 3, 2024

Are you using clearkeys with Clearkey DRM, right?

@sandrossano
Copy link

sandrossano commented Jun 3, 2024

yes but since 4.9.0 they no longer work

player.configure({
drm: {
clearKeys: {
'xxx':'xxx'
}
}
});

@avelad
Copy link
Collaborator

avelad commented Jun 3, 2024

I have added an integration test with this case to verify that there is no problem with this, see: #6736

I have launched all the tests in github actions and in our lab to verify that everything works correctly.

@avelad
Copy link
Collaborator

avelad commented Jun 3, 2024

It seems that the test works well on all platforms, so I think that the problem is configuration or manifest issue, can you share one adaptationSet of your manifest? (in plain text) Thanks!

Working example: https://github.com/shaka-project/shaka-player/pull/6736/files#diff-4858346fde772dc3bf916326618a6658b977e23a784a57ffe64ca293ee435a40

What model of Chromecast are you using?

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 3, 2024
avelad added a commit that referenced this issue Jun 3, 2024
@FlowersPowerz
Copy link
Author

It seems that the test works well on all platforms, so I think that the problem is configuration or manifest issue, can you share one adaptationSet of your manifest? (in plain text) Thanks!

Working example: https://github.com/shaka-project/shaka-player/pull/6736/files#diff-4858346fde772dc3bf916326618a6658b977e23a784a57ffe64ca293ee435a40

What model of Chromecast are you using?

I had sent the indicated email a few days ago an uri accompanying clearkey, can you test with that manifest? All the other streams that have problems have more or less the same pattern as that manifest, so if you can correct the playback with that manifest, most likely it will work out for everyone. It cannot be a problem with the manifest because it works perfectly in any other player as well as Pre 4.8.9 versions of shaka player itself

However I personally use a chromecast ultra, but since this one works with an earlier build, I doubt it is a compatibility issue.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 3, 2024
@avelad
Copy link
Collaborator

avelad commented Jun 3, 2024

It seems that the test works well on all platforms, so I think that the problem is configuration or manifest issue, can you share one adaptationSet of your manifest? (in plain text) Thanks!
Working example: https://github.com/shaka-project/shaka-player/pull/6736/files#diff-4858346fde772dc3bf916326618a6658b977e23a784a57ffe64ca293ee435a40
What model of Chromecast are you using?

I had sent the indicated email a few days ago an uri accompanying clearkey, can you test with that manifest? All the other streams that have problems have more or less the same pattern as that manifest, so if you can correct the playback with that manifest, most likely it will work out for everyone. It cannot be a problem with the manifest because it works perfectly in any other player as well as Pre 4.8.9 versions of shaka player itself

However I personally use a chromecast ultra, but since this one works with an earlier build, I doubt it is a compatibility issue.

In your manifest I don't see schemeIdUri="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e". This is necessary for clearkey to work

@FlowersPowerz
Copy link
Author

It seems that the test works well on all platforms, so I think that the problem is configuration or manifest issue, can you share one adaptationSet of your manifest? (in plain text) Thanks!
Working example: https://github.com/shaka-project/shaka-player/pull/6736/files#diff-4858346fde772dc3bf916326618a6658b977e23a784a57ffe64ca293ee435a40
What model of Chromecast are you using?

I had sent the indicated email a few days ago an uri accompanying clearkey, can you test with that manifest? All the other streams that have problems have more or less the same pattern as that manifest, so if you can correct the playback with that manifest, most likely it will work out for everyone. It cannot be a problem with the manifest because it works perfectly in any other player as well as Pre 4.8.9 versions of shaka player itself
However I personally use a chromecast ultra, but since this one works with an earlier build, I doubt it is a compatibility issue.

In your manifest I don't see schemeIdUri="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e". This is necessary for clearkey to work

But it actually works even if it is not explicitly stated in the manifest if the keys are the right ones. It doesn't have to be explicit, because otherwise it wouldn't make sense that it works everywhere except in the latest versions. I invite you to try playing the manifest with the clearkeys sent on a pre 4.8.9 version, any version, and the player magically manages to play them.
The problem lies that until 4.8.8, the player had no problem playing manifest that did not have the clearkeys explicit in the manifest, now it does.

tykus160 pushed a commit to sky-hugolima/shaka-player-contrib that referenced this issue Jun 3, 2024
tykus160 pushed a commit to sky-hugolima/shaka-player-contrib that referenced this issue Jun 3, 2024
@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround component: ClearKey The issue involves the ClearKey DRM and removed status: working as intended The behavior is intended; this is not a bug labels Jun 3, 2024
@avelad avelad added this to the v4.10 milestone Jun 3, 2024
@avelad avelad assigned avelad and unassigned joeyparrish Jun 3, 2024
avelad added a commit that referenced this issue Jun 3, 2024
joeyparrish pushed a commit that referenced this issue Jun 3, 2024
joeyparrish pushed a commit that referenced this issue Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ClearKey The issue involves the ClearKey DRM priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
6 participants