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

RESTRICTIONS_CANNOT_BE_MET reported twice when there is an HDCP error #4190

Closed
albertdaurell opened this issue May 3, 2022 · 3 comments · Fixed by #4235
Closed

RESTRICTIONS_CANNOT_BE_MET reported twice when there is an HDCP error #4190

albertdaurell opened this issue May 3, 2022 · 3 comments · Fixed by #4235
Labels
priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@albertdaurell
Copy link
Contributor

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

Yes

What version of Shaka Player are you using?

Latest v4.0.0

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?

Demo app

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

Yes

What browser and OS are you using?

Chrome 100.0.4896.127 (Official Build) (x86_64)

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

N/A

What are the manifest and license server URIs?

HW secure all (L1) example extracted from ExoPlayer media.exolist.json

Shaka demo url: HW secure all (L1)

Manifest: https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd
License: https://proxy.uat.widevine.com/proxy?video_id=GTS_HW_SECURE_ALL&provider=widevine_test
DRM: com.widevine.alpha

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

Default

What did you do?

Play the content from a device without L1 and wait for an error:
image

What did you expect to happen?

Only 1 error should be thrown

What actually happened?

2 errors are thrown:
 image

@albertdaurell albertdaurell added the type: bug Something isn't working correctly label May 3, 2022
@albertdaurell
Copy link
Contributor Author

Also I can try to create a pull from there main...albertdaurell:feature/report-restrictions-cannot-be-met-once if you agree...

Thx

@github-actions github-actions bot added this to the v3.3 milestone May 3, 2022
@avelad avelad modified the milestones: v3.3, v4.1 May 4, 2022
@avelad
Copy link
Collaborator

avelad commented May 4, 2022

Please, open a PR and we'll review as soon as possible. Thanks!

@albertdaurell
Copy link
Contributor Author

albertdaurell commented May 4, 2022

main...albertdaurell:feature/report-restrictions-cannot-be-met-once

@avelad Opened PR, thx!

joeyparrish pushed a commit that referenced this issue May 17, 2022
…4194)

We want to avoid reporting MANIFEST RESTRICTIONS_CANNOT_BE_MET error twice.

This is because when error detected from `onKeyStatus_` calls `updateAbrManagerVariants_` which calls `checkRestrictedVariants_` and error is catched and propagated from `onError_` **but source code execution continues** 
and `chooseVariantAndSwitch_` triggers same error again:

```javascript
onKeyStatus_() {
  ....
  if (tracksChanged) {
    this.updateAbrManagerVariants_(); 
    //   -> checkRestrictedVariants_ 
    //     -> RESTRICTIONS_CANNOT_BE_MET
  }
  ...
  if (currentVariant && !currentVariant.allowedByKeySystem) {
    ...
    this.chooseVariantAndSwitch_(); 
    //  -> chooseVariant_
    //    -> updateAbrManagerVariants_ 
    //      -> checkRestrictedVariants_ 
    //        -> RESTRICTIONS_CANNOT_BE_MET
  }
```

Closes #4190
joeyparrish pushed a commit that referenced this issue May 17, 2022
…4194)

We want to avoid reporting MANIFEST RESTRICTIONS_CANNOT_BE_MET error twice.

This is because when error detected from `onKeyStatus_` calls `updateAbrManagerVariants_` which calls `checkRestrictedVariants_` and error is catched and propagated from `onError_` **but source code execution continues** 
and `chooseVariantAndSwitch_` triggers same error again:

```javascript
onKeyStatus_() {
  ....
  if (tracksChanged) {
    this.updateAbrManagerVariants_(); 
    //   -> checkRestrictedVariants_ 
    //     -> RESTRICTIONS_CANNOT_BE_MET
  }
  ...
  if (currentVariant && !currentVariant.allowedByKeySystem) {
    ...
    this.chooseVariantAndSwitch_(); 
    //  -> chooseVariant_
    //    -> updateAbrManagerVariants_ 
    //      -> checkRestrictedVariants_ 
    //        -> RESTRICTIONS_CANNOT_BE_MET
  }
```

Closes #4190
joeyparrish pushed a commit that referenced this issue May 17, 2022
…4194)

We want to avoid reporting MANIFEST RESTRICTIONS_CANNOT_BE_MET error twice.

This is because when error detected from `onKeyStatus_` calls `updateAbrManagerVariants_` which calls `checkRestrictedVariants_` and error is catched and propagated from `onError_` **but source code execution continues** 
and `chooseVariantAndSwitch_` triggers same error again:

```javascript
onKeyStatus_() {
  ....
  if (tracksChanged) {
    this.updateAbrManagerVariants_(); 
    //   -> checkRestrictedVariants_ 
    //     -> RESTRICTIONS_CANNOT_BE_MET
  }
  ...
  if (currentVariant && !currentVariant.allowedByKeySystem) {
    ...
    this.chooseVariantAndSwitch_(); 
    //  -> chooseVariant_
    //    -> updateAbrManagerVariants_ 
    //      -> checkRestrictedVariants_ 
    //        -> RESTRICTIONS_CANNOT_BE_MET
  }
```

Closes #4190
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
2 participants