Shaka Playback FAILED_TO_CREATE_CDM error

:warning: Before you continue


Before submitting a bug report, please review our troubleshooting documentation at https://developer.amazon.com/docs/kepler-tv/troubleshoot-overview.html.

If you still want to file a bug report, please make sure to fill in all the details below and provide the necessary information.

NOTE: PLEASE ONLY REPORT A SINGLE BUG USING THIS TEMPLATE.
If you’re experiencing multiple issues, please file a separate report for each.


:backhand_index_pointing_right: Bug Description


1. Summary

After updating to the recommended 4.8.5 version of Shaka Player, fails with a FAILED_TO_CREATE_CDM / 6002 error for VOD DASH content with an unencrypted preroll period but encrypted content periods.

App Name:
App Link on Amazon Appstore (found through Developer Console → Actions column in App List → View on Amazon.com):

Bug Severity
Select one that applies

  • [x ] Impacts operation of app
  • Blocks current development
  • Improvement suggestion
  • Issue with documentation (If selected, please share the doc link and describe the issue)
  • Other

2. Steps to Reproduce

  1. Load the Shaka Reference App with DASH VOD content that has an unencrypted preroll period and encrypted content periods.
  2. Attempt to play the content.

3. Observed Behavior

Explain what actually happened, noting any discrepancies or malfunctions.

Playback fails at period transition between preroll and content with a FAILED_TO_CREATE_CDM / 6002 error.

4. Expected Behavior

Describe what you expected the SDK to do under normal operation.

Playback to start and play both the unencrypted preroll and encrypted content period without issue.

4.a Possible Root Cause & Temporary Workaround

Fill out anything you have tried. If you don’t know, N/A is acceptable

This is not an issue with the 4.6.18 version of Shaka we were previously using.
Appears to be a change in Shaka Player between the 4.6.18 and 4.8.5 versions.

5. Logs or crash report

(Please make sure to provide relevant logs as attachment and share VPKG file with your Amazon contact)

Relevent playback log with shaka error:

 (NOBRIDGE) WARN  Possible Unhandled Promise Rejection (id: 105):
Q {
  "category": 6,
  "code": 6002,
  "data": Array [
    "Cannot read property 'videoCapabilities' of undefined",
  ],
  "handled": false,
  "message": "Shaka Error 6002",
  "severity": 2,
  "stack": "Error: Shaka Error 6002
    at Q (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:150154:22)
    at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:153832:26)
    at Da (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148655:22)
    at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148681:70)
    at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148707:19)
    at tryCallTwo (InternalBytecode.js:61:9)
    at doResolve (InternalBytecode.js:216:25)
    at Promise (InternalBytecode.js:82:14)
    at Ga (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148703:27)
    at M (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148711:18)
    at wh (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:153728:17)
    at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:153542:17)
    at Da (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148655:22)
    at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148681:70)
    at b (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:148698:24)
    at tryCallOne (InternalBytecode.js:53:16)
    at anonymous (InternalBytecode.js:139:27)",
}

6. Environment

Please fill out the fields related to your bug below:

  • **SDK Version: 0.20.3207
  • App State: [Foreground]
  • OS Information
    Please ssh into the device via kepler exec vda shelland copy the output from cat /etc/os-releaseinto the answer section below. Note, if you don’t have a simulator running or device attached kepler exec vda shell will respond with vda: no devices/emulators found
NAME="OS"
OE_VERSION="4.0.0"
OS_MAJOR_VERSION="1"
OS_MINOR_VERSION="1"
RELEASE_ID="2"
OS_VERSION="1.1"
BRANCH_CODE="VegaMainlineTvIntegration"
BUILD_DESC="OS 1.1 (VegaMainlineTvIntegration/4404)"
BUILD_FINGERPRINT="4.0.140921.0(3072cab629675a74)/4404N:user-external/release-keys"
BUILD_VARIANT="user-external"
BUILD_TAGS="release-keys"
BUILD_DATE="Thu Jul 31 19:48:28 UTC 2025"
BUILD_TIMESTAMP="1753991308"
VERSION_NUMBER="201010440450"

7. Example Code Snippet / Screenshots / Screengrabs

Include any relevant code or component setup in React Native that can help reproduce the bug.

import { ExampleComponent } from 'custom-sdk';

<ExampleComponent config={{ key: 'value' }} />

:backhand_index_pointing_right: Playback Issues


If this is a playback issue, please provide your VPKG and/or content URL, any pre-conditions (like geo-location) [Share privately with your Amazon contact] , and let us know if it’s x86 or arm7.

After updating to the recommended 4.8.5 version of Shaka Player, fails with a FAILED_TO_CREATE_CDM / 6002 error for VOD DASH content with an unencrypted preroll period but encrypted content periods.

Please share the following details in addition:_

  • Player SDK: Shaka
  • Player SDK Version: 4.8.5
    • Audio Codecs: [AAC, ...]
    • Video Codecs: [h.264, mp4]
    • Manifest Types: DASH

Q: Would you like to be contacted to share your latest VPKG compiled with latest SDK:

Yes

Q: VPN or Login needed to verify functionality in VPKG?

[Y/N] [Share privately with your Amazon contact]

Q: If applicable, please provide your media/content url
If this is created dynamically, tokenized, etc please provide a way for us to access it

[N/A or Content / Media Url for testing] [Share privately with your Amazon contact]

Q: Are there any special headers required to reproduce the issue you are facing?

[N/A or Insert Headers]

Additionally please provide the following if possible
Provide Screenshots / Screengrabs / Logs. Please include as much information as you can that will help debug.

<!-- Answer here if applicable --> 

:backhand_index_pointing_right: Additional Context


Any Additional Context you would like to provide?
Add any other relevant information, such as recent updates to the SDK, dependencies, or device OS that may affect the bug.

<!-- Answer here if applicable  --> 

Hi @will.harris ,

I have reported this to our internal team.

Thanks,
Rohit

Hello, bumping for visibility. We have also seen this error on our project. It can be quite difficult to reproduce in our case. It appears to exhibit the same error (videoCapabilities of undefined).
Worth noting that when I do repro the error, it appears to fix itself upon switching to a different stream, and then remain fixed upon subsequent app launches. Current theory is that it is some issue with DRM module initialization on the native side (only a theory).

Hi @Jason_Aeschliman

The problem has been identified. The solution is being tested. It will be released as part of ShakaPlayer release package and OS image. Once released, we will update this thread.

2 Likes

@will.harris

Per confirmation via Slack, I am resolving this issue. Latest version of Shaka Player and OS update address this issue.

@Jason_Aeschliman - This was to resolve Shaka Player 6002 error when going from unencrypted to encrypted stream.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.