Amazon DrmError: MediaKeySession InvalidStateError: Promise still outstanding at MediaKeys shutdown

RESOLVED WORKSFORME

Status

()

Core
Audio/Video: Playback
P2
normal
RESOLVED WORKSFORME
2 years ago
2 years ago

People

(Reporter: cpeterson, Assigned: cpearce)

Tracking

(Blocks: 1 bug)

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 unaffected, firefox47 affected, firefox48 affected, firefox49 affected)

Details

(Reporter)

Description

2 years ago
Amazon reports the following error

DrmError - Failed to update MediaKeySession. caused by: InvalidStateError: Promise still outstanding at MediaKeys shutdown

cpearce says:

This happens when the last reference to the MediaKeys object is dropped, and the MediaKeys object is garbage collected and shutdown. My guess would be that you've somehow dropped your last JavaScript reference to the MediaKeys object while a MediaKeySession.update() is in flight. I will experiment to see if other browsers promises keep the corresponding MediaKeys object alive in this situation.
(Reporter)

Comment 1

2 years ago
cpearce says:

I can reproduce the "InvalidStateError: Promise still outstanding at MediaKeys shutdown" error with clearkey if I induce the to CDM crash while there's a MediaKeySession.update() promise waiting to be resolved. I have not been able to reproduce this any other way.

You would see this behaviour if the CDM crashed before you'd called HTMLMediaElement.setMediaKeys(). You can test this theory by checking whether the session's "closed" promise was unexpectedly resolved (i.e. MediaKeySession.closed resolved without you calling MediaKeySession.close() on the session first).

Note that if the CDM process crashes after you've called HTMLMediaElement.setMediaKeys(), you'll also get a decode error event fired at the video element, i.e. there's two ways a CDM crash is observable to you.

Hopefully some of the CDM crashes we've fixed will help reduce this error.
(Reporter)

Comment 2

2 years ago
This was mostly an OS X 10.6 issue, which we no longer support. The error count has gone down.
(Reporter)

Comment 3

2 years ago
We think Amazon has fixed this problem on their side.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.