DRM Widevine (L1) exception Android 7 (Nougat)
See original GitHub issueHi I have a problem with a playback with DRM. The media is playing well with other device with Android 9 and Widevine L3, but with Android Nougat and L1 is failing. I used the exoplayer demo release v2 and I have included my asset
- ExoPlayer version number 2.13.3
- Android version 7.0
- Android device Nvidia Shield Tablet
This is the logcat:
2021-05-05 17:00:10.840 14628-14628/com.google.android.exoplayer2.demo E/EventLogger: internalError [eventTime=6.21, mediaPos=0.00, window=0, period=0, drmSessionManagerError
com.google.android.exoplayer2.drm.MediaDrmCallbackException: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:194)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:101)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:81)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:75)
at com.google.android.exoplayer2.util.Util.toByteArray(Util.java:174)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:177)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
]
2021-05-05 17:00:10.840 14628-14674/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: com.google.android.exoplayer2.drm.MediaDrmCallbackException: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.drm.DefaultDrmSession.onError(DefaultDrmSession.java:524)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:519)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:482)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.MediaDrmCallbackException: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:194)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:101)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:81)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:75)
at com.google.android.exoplayer2.util.Util.toByteArray(Util.java:174)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:177)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
2021-05-05 17:00:10.920 14628-14628/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [eventTime=6.29, mediaPos=0.00, window=0, period=0
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: com.google.android.exoplayer2.drm.MediaDrmCallbackException: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.drm.DefaultDrmSession.onError(DefaultDrmSession.java:524)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:519)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:482)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.MediaDrmCallbackException: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:194)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 500
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:101)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:81)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.read(DataSourceInputStream.java:75)
at com.google.android.exoplayer2.util.Util.toByteArray(Util.java:174)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executePost(HttpMediaDrmCallback.java:177)
at com.google.android.exoplayer2.drm.HttpMediaDrmCallback.executeKeyRequest(HttpMediaDrmCallback.java:153)
at com.google.android.exoplayer2.drm.DefaultDrmSession$RequestHandler.handleMessage(DefaultDrmSession.java:602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
]
Using the same media with my app I’ve got this one:
2021-05-05 17:09:56.739 748-1116/? E/bt_btm: BTM_BleObserve Observe Already Active
2021-05-05 17:09:57.488 662-709/? E/wifi: wifi_get_supported_feature_set returned error = 0xffffffa1
2021-05-05 17:09:57.535 748-1116/? E/bt_btm: BTM_BleObserve Observe Already Active
2021-05-05 17:10:00.496 662-5491/? E/ActivityManager: applyOptionsLocked: Unknown animationType=0
2021-05-05 17:10:00.708 269-11014/? E/oemcrypto_cenc: OEMCrypto_APIVersion: 11
2021-05-05 17:10:00.764 269-269/? E/oemcrypto_cenc: OEMCrypto_APIVersion: 11
2021-05-05 17:10:00.801 267-1105/? E/OMXNodeInstance: setConfig(10b0059:Nvidia.h264.decode.secure, ??(0x7fc0001f)) ERROR: UnsupportedIndex(0x8000101a)
2021-05-05 17:10:00.801 267-267/? E/OMXNodeInstance: setConfig(10b0059:Nvidia.h264.decode.secure, ??(0x7fc00020)) ERROR: UnsupportedIndex(0x8000101a)
2021-05-05 17:10:00.808 267-1108/? E/OMXNodeInstance: getConfig(10b0059:Nvidia.h264.decode.secure, ConfigCommonOutputCrop(0x700000f)) ERROR: BadParameter(0x80001005)
2021-05-05 17:10:00.809 267-334/? E/OMXNodeInstance: setConfig(10b0059:Nvidia.h264.decode.secure, ??(0x7fc0001f)) ERROR: UnsupportedIndex(0x8000101a)
2021-05-05 17:10:00.810 267-1100/? E/OMXNodeInstance: getConfig(10b0059:Nvidia.h264.decode.secure, ??(0x7fc00020)) ERROR: UnsupportedIndex(0x8000101a)
2021-05-05 17:10:00.876 267-1105/? E/OMXNodeInstance: setConfig(10b005a:google.aac.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2021-05-05 17:10:00.877 267-1108/? E/OMXNodeInstance: setConfig(10b005a:google.aac.decoder, ConfigOperatingRate(0x6f800003)) ERROR: Undefined(0x80001001)
2021-05-05 17:10:01.326 269-11015/? E/WVCdm: CdmEngine::AddKey: no key_data
2021-05-05 17:10:01.327 14628-14860/com.google.android.exoplayer2.demo E/MediaDrm-JNI: Illegal state exception: Failed to handle key response: DRM vendor-defined error: -2965 (-2965)
2021-05-05 17:10:01.328 14628-14628/com.google.android.exoplayer2.demo E/EventLogger: internalError [eventTime=0.78, mediaPos=0.00, window=0, period=0, drmSessionManagerError
android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2965
at android.media.MediaDrm.provideKeyResponse(Native Method)
at com.google.android.exoplayer2.drm.FrameworkMediaDrm.provideKeyResponse(FrameworkMediaDrm.java:228)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:492)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
]
2021-05-05 17:10:01.338 14628-14860/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2965
at com.google.android.exoplayer2.drm.DefaultDrmSession.onError(DefaultDrmSession.java:524)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:519)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:504)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2965
at android.media.MediaDrm.provideKeyResponse(Native Method)
at com.google.android.exoplayer2.drm.FrameworkMediaDrm.provideKeyResponse(FrameworkMediaDrm.java:228)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:492)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
2021-05-05 17:10:01.426 14628-14628/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [eventTime=0.88, mediaPos=0.00, window=0, period=0
com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2965
at com.google.android.exoplayer2.drm.DefaultDrmSession.onError(DefaultDrmSession.java:524)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:519)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:504)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.media.MediaDrm$MediaDrmStateException: Failed to handle key response: DRM vendor-defined error: -2965
at android.media.MediaDrm.provideKeyResponse(Native Method)
at com.google.android.exoplayer2.drm.FrameworkMediaDrm.provideKeyResponse(FrameworkMediaDrm.java:228)
at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeyResponse(DefaultDrmSession.java:492)
at com.google.android.exoplayer2.drm.DefaultDrmSession.access$100(DefaultDrmSession.java:58)
at com.google.android.exoplayer2.drm.DefaultDrmSession$ResponseHandler.handleMessage(DefaultDrmSession.java:563)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Automatically fallback to Widevine L3 in case there is a DRM ...
This causes the affected devices to be unable to play DRM content by default, ... DRM Widevine (L1) exception Android 7 (Nougat) #8905....
Read more >How to check if your Android device supports Widevine DRM
Want to know if your Android device can stream HD videos from Netflix and Amazon Prime Video? Here's how to check for Widevine...
Read more >MediaDrm - Android Developers
The MediaDrm APIs are designed to support the ISO/IEC 23001-7: Common Encryption standard, but may also be used to implement other encryption schemes....
Read more >What is Widevine digital rights management (DRM)?
Google's Widevine DRM is used to check if your phone can stream HD content from ... Android devices support either L1 or L3...
Read more >App "keeps stopping" on Nougat 7.0 - android - Stack Overflow
Did you use the badge content provider? Samsung Nougat 7.0 may have caused the crash: Caused by: java.lang.SecurityException: Permission ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe that the Nvidia Shield K1 Tablet has had its Widevine L1 license revoked (similar to #7986 and #8075). I also have the same tablet, and Widevine L1 stopped working at some point.
The only workaround I found was to force L3 instead of L1 (which may not be possible in your case). There is an open ticket to automatically fallback to L3 if playback with L1 fails: #8108
@Stonos finally that workaround it worked for me!!. Forcing L3 does the trick for this device. Notce that the same problem occoured with Nexus5 and the fix worked again. Many thanks.
@icbaker I could see both errors in diferent executions, I mean, sometimes I have seen the http 500 error, and sometimes I’ve seen the -2965 vendor error. I know it sounds strange, maybe while debugging the system thinks the response is delaying, I do not know exactly. Anyway, I thank you your efforts to go deeply with this issue.
Now I am working in a fix that applies the force L3 workaround, I’ve seen some code in Exoplayer2, at
com.google.android.exoplayer2.drm.FrameworkMediaDrm
that patches L3 with a specific device model ASUS_Z00AD (Zenfone2, Android 6.0.1, also with Widevine L1), it would be nice to have a list of affected device in order to patch all of them.