dash.js icon indicating copy to clipboard operation
dash.js copied to clipboard

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

Open VyshnaviUmesh opened this issue 2 years ago • 6 comments

Environment
  • [X] The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/
  • [X] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [X] There are no network errors such as 404s in the browser console when trying to play the stream
  • [X] The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ
  • [X] The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
  • Link to playable MPD file: Unable to provide the content is hosted in our servers and not on production yet.
  • Dash.js version: Latest product
  • Browser name/version: Chrome latest version
  • OS name/version: MacOS Catalina and Monterey
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.

VyshnaviUmesh avatar May 24 '22 01:05 VyshnaviUmesh

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

dsilhavy avatar May 24 '22 12:05 dsilhavy

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

Aliendreamer avatar Jun 16 '22 12:06 Aliendreamer

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.

VyshnaviUmesh avatar Jun 16 '22 19:06 VyshnaviUmesh

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

dsilhavy avatar Jun 16 '22 19:06 dsilhavy

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.

VyshnaviUmesh avatar Jun 16 '22 23:06 VyshnaviUmesh

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

Aliendreamer avatar Jun 17 '22 05:06 Aliendreamer

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] avatar Nov 15 '22 03:11 stale[bot]

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.

stale[bot] avatar Nov 29 '22 03:11 stale[bot]

Please let me know if this should be reopened

dsilhavy avatar Nov 29 '22 07:11 dsilhavy

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.

anandpatel0123 avatar Jul 06 '23 06:07 anandpatel0123