Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.13k stars 1.68k forks source link

Error "DRM: unable to create session! --Error generating key request -- TypeError" #3949

Closed VyshnaviUmesh closed 1 year ago

VyshnaviUmesh commented 2 years ago
Environment
Steps to reproduce
  1. Please provide clear steps to reproduce your problem We observe the below error sometimes while playing back the encrypted DASH streams (ClearKey encryption is used) on https://reference.dashif.org/dash.js/v4.4.0/samples/dash-if-reference-player/index.html player. After refreshing the player and retrying the playback, error disappears.

  2. If the bug is intermittent, give a rough frequency if possible Mostly every playback the error pops up, but after refreshing the error disappears.

Observed behavior

Error seems to pop up unnecessarily.

Console output
main.js:333
{error: DashJSError, type: 'error'}
error: DashJSError {code: 113, message: 'DRM: unable to create session! --Error generating key request -- TypeError', data: null}
type: "error"
[[Prototype]]: Object
Debug.js:169 [3759615][Stream] DRM: unable to create session! --Error generating key request -- TypeError
doLog   @       Debug.js:169
fatal   @       Debug.js:124
onProtectionError       @       Stream.js:649
(anonymous)     @       EventBus.js:124
trigger @       EventBus.js:124
(anonymous)     @       ProtectionModel_21Jan2015.js:326
Promise.catch (async)
createKeySession        @       ProtectionModel_21Jan2015.js:321
createKeySession        @       ProtectionController.js:338
_loadOrCreateKeySession @       ProtectionController.js:285
(anonymous)     @       ProtectionController.js:224
Promise.then (async)
_selectInitialKeySystem @       ProtectionController.js:202
_selectKeySystem        @       ProtectionController.js:155
initializeForMedia      @       ProtectionController.js:136
_checkIfInitializationCompleted @       Stream.js:727
(anonymous)     @       Stream.js:297
Promise.then (async)
(anonymous)     @       Stream.js:289
_commonMediaInitialization      @       Stream.js:273
_initializeMedia        @       Stream.js:236
(anonymous)     @       Stream.js:214
activate        @       Stream.js:198
_activateStream @       StreamController.js:471
_onMediaSourceOpen      @       StreamController.js:442
Expected behavior

The error should not pop up as the encryption workflow is working after refresh.

dsilhavy commented 2 years ago

Can you reproduce the problem with one of the example streams in the reference client? Or only your own stream?

Aliendreamer commented 2 years ago

we have a similiar experience, from last week. Depoying a new version of our streaming application, But the problem seems only on Samsung tizen platform mainly with little exceptions for Lg webos platform, I will try to check if we can provide streams. We are currently on dash 4.2.0

VyshnaviUmesh commented 2 years ago

We are working with internal streams right now, so unable to provide the streams at this moment. Once we are able to publish the streams and software, we could share the public URL. Thanks.

dsilhavy commented 2 years ago

For Clearkey please check the current development branch or the nightly version of the player. There was a fix that might be related to this: https://github.com/Dash-Industry-Forum/dash.js/pull/3939

VyshnaviUmesh commented 2 years ago

We have been using the current dev branch and still observe the same issue. Just tested with the nightly version of the player and it has the same issue.

Aliendreamer commented 2 years ago

We can't shere streams too at least not drm protect. but I think we found he main source for us at least. In dash settings: protection: { keepProtectionMediaKeys: true, }, setting this seems to trigger the problem with 113, we tried this setting to mitigate 112 drm errors. And as I said before we are using dash 4.2.0 we havent tried 4.4

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. However, it might still be relevant so please leave a short comment if it should remain open. Otherwise the issue will be closed automatically after two weeks. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically closed because no further activity occurred. If you think this issue is still relevant please reopen it or contact @dsilhavy. Thank you for your contributions.

dsilhavy commented 1 year ago

Please let me know if this should be reopened

anandpatel0123 commented 1 year ago

Hi, Everyone Anyone found any solution to this? It is coming for specific device. We are using with ES5 build and getting the error on device but not on Browser like chrome, edge.