Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to handle key response: DRM vendor-defined error #1437

Closed
tiger1990 opened this issue Apr 12, 2016 · 5 comments
Closed

Failed to handle key response: DRM vendor-defined error #1437

tiger1990 opened this issue Apr 12, 2016 · 5 comments

Comments

@tiger1990
Copy link

Please search the existing issues before filing a new one, including issues that are closed. When filing a new issue please include all of the following, unless you're certain that they're not useful for the particular issue being reported.

  • A description of the issue.
  • Steps describing how the issue can be reproduced, ideally in the ExoPlayer demo app.
  • A link to content that reproduces the issue. If you don't wish to post it publicly, please submit the issue, then email the link to dev.exoplayer@gmail.com including the issue number in the subject line.
  • The version of ExoPlayer being used.
  • The device(s) and version(s) of Android on which the issue can be reproduced, and how easily it reproduces. If possible, please test on multiple devices and Android versions.
  • A bug report taken from the device just after the issue occurs, attached as a file. A bug report can be captured using "adb bugreport". Output from "adb logcat" or a log snippet is not sufficient.
@tiger1990
Copy link
Author

Description:

I have installed the sample app given in exoplayer, I tried to play a widevine sample on given below device(Configuration are mentioned below). And got the above log.
(Error Log : com.google.android.exoplayer.demo E/MediaDrm-JNI: Illegal state exception: Failed to handle key response: DRM vendor-defined error: -2902 (-2902)
04-06 13:26:43.085 14713-14713/com.google.android.exoplayer.demo E/EventLogger: internalError [2.60, drmSessionManagerError])

Configuration Of Device On Which Getting This Error:
Below are the configuration of Nexus Device On Which i am getting this error:
Model : Nexus 5
Android Version: 6.0.1
BaseBand Version: M8974A-2.0.50.2.28
Kernel Version
3.4.0-gbaedb01
android-build@vped10.mtv.corp.google.com#1
Sat Jan 16 01:19:53 UTC 2016
Build Number: MMB29V

I have tried this sample on multiple android devices.
Some of the devices giving me this error.
eg. Htc, Lyf, Lenovo
You can easily reproduce this error on the above mention configuration of Nexus 5.

Complete Logs Are Given Below:

com.google.android.exoplayer.demo E/MediaDrm-JNI: Illegal state exception: Failed to handle key response: DRM vendor-defined error: -2902 (-2902)
04-06 13:26:43.085 14713-14713/com.google.android.exoplayer.demo E/EventLogger: internalError [2.60, drmSessionManagerError]
android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2902
at android.media.MediaDrm.provideKeyResponse(Native Method)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager.onKeyResponse(StreamingDrmSessionManager.java:392)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager.access$800(StreamingDrmSessionManager.java:45)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager$PostResponseHandler.handleMessage(StreamingDrmSessionManager.java:482)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
04-06 13:26:43.092 14713-15537/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2902
at com.google.android.exoplayer.MediaCodecTrackRenderer.shouldWaitForKeys(MediaCodecTrackRenderer.java:680)
at com.google.android.exoplayer.MediaCodecTrackRenderer.feedInputBuffer(MediaCodecTrackRenderer.java:630)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:459)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)

Caused by: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2902
at android.media.MediaDrm.provideKeyResponse(Native Method)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager.onKeyResponse(StreamingDrmSessionManager.java:392)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager.access$800(StreamingDrmSessionManager.java:45)
at com.google.android.exoplayer.drm.StreamingDrmSessionManager$PostResponseHandler.handleMessage(StreamingDrmSessionManager.java:482)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
04-06 13:26:43.104 14713-14713/com.google.android.exoplayer.demo E/EventLogger: playerFailed [2.62]
com.google.android.exoplayer.ExoPlaybackException: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2902
at com.google.android.exoplayer.MediaCodecTrackRenderer.shouldWaitForKeys(MediaCodecTrackRenderer.java:680)
at com.google.android.exoplayer.MediaCodecTrackRenderer.feedInputBuffer(MediaCodecTrackRenderer.java:630)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:459)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:431)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)

@ojw28
Copy link
Contributor

ojw28 commented Apr 12, 2016

Please provide a proper bug report, as clearly requested in the issue template:

A bug report taken from the device just after the issue occurs, attached as a file. A bug report can be captured using "adb bugreport". Output from "adb logcat" or a log snippet is not sufficient.

@tiger1990
Copy link
Author

I have also debug the exoplayer sourcecode.
I am getting error on:
passthroughEnabled is false;
and while initializing codec ( codec.configure(format, null, crypto, 0);) It throws an exception
in MediaCodecAudioTrackRenderer

@OverRide
protected void configureCodec(MediaCodec codec, boolean codecIsAdaptive,
android.media.MediaFormat format, android.media.MediaCrypto crypto) {
String mimeType = format.getString(android.media.MediaFormat.KEY_MIME);
if (true) {
// Override the MIME type used to configure the codec if we are using a passthrough decoder.
format.setString(android.media.MediaFormat.KEY_MIME, MimeTypes.AUDIO_RAW);
codec.configure(format, null, crypto, 0);
format.setString(android.media.MediaFormat.KEY_MIME, mimeType);
passthroughMediaFormat = format;
} else {
codec.configure(format, null, crypto, 0);
passthroughMediaFormat = null;
}
}

private void notifyDecoderInitializationError(final DecoderInitializationException e) {
if (eventHandler != null && eventListener != null) {
eventHandler.post(new Runnable() {
@OverRide
public void run() {
//@todo Deepak Decoder Not Initialized
eventListener.onDecoderInitializationError(e);
}
});
}
}

@andrewlewis
Copy link
Collaborator

We still don't have enough information to look into this. Your latest issue seems audio-related but your first comment was about DRM. For diagnosing DRM-related issues a full bug report (as requested above) is useful.

I am closing this issue because it is unclear what the bug is or how to reproduce the problematic behavior. Please file a new issue which includes all the information requested on the "New issue" page. Thanks!

@tiger1990
Copy link
Author

Please find the attached bugreport.

nexus5-bugreport.txt

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants