google / google/ExoPlayer

DefaultDrmSessionManager: null exception fetching crypto type

Open
#11,008 9 comments 0 reactions 1 assignee Claimed by @icbaker View on GitHub
bug
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### ExoPlayer Version

2.18.2

### Devices that reproduce the issue

- Fire TV devices (AFTMM, AFTSSS, AFTSS).
- Chromecast Google TV.
- Samsung Galaxy TAB A7 / Samsung Galaxy S20 / Samsung Galaxy S10+.
- Most common in Android 7, 9 and 5, occurs in all versions but a lot less common.

### Devices that do not reproduce the issue

_No response_

### Reproducible in the demo app?

No

### Reproduction steps

Unsure how to reproduce, it's being picked up by our crash reporting system.

### Expected result

Media plays successfully without any issues.

### Actual result

Playback crashes with a null exception;

```stacktrace
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:154)
at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.getCryptoType(DefaultDrmSessionManager.java:599)
at com.google.android.exoplayer2.source.dash.DashMediaPeriod.buildPrimaryAndEmbeddedTrackGroupInfos(DashMediaPeriod.java:675)
at com.google.android.exoplayer2.source.dash.DashMediaPeriod.buildTrackGroups(DashMediaPeriod.java:518)
at com.google.android.exoplayer2.source.dash.DashMediaPeriod.(DashMediaPeriod.java:153)
at com.google.android.exoplayer2.source.dash.DashMediaSource.createPeriod(DashMediaSource.java:490)
```

### Media

It's a DASH stream with Widevine encryption, it's not restricted to a single stream though so I'm not sure it's applicable.

### Bug Report

- [ ] You will email the zip file produced by `adb bugreport` to dev.exoplayer@gmail.com after filing this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.