ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Failed to get provision request: DRM vendor-defined error: -2990

Open ram992 opened this issue 9 years ago • 17 comments

Getting this exception : Failed to get provision request: DRM vendor-defined error: -2990 when any DRM enabled video is tried to play on a Le-Max Le X507 device.

I am attaching a LogCat Snippet here. If needed I will send the full bug report.

android.media.MediaDrm$MediaDrmStateException: Failed to get provision request: DRM vendor-defined error: -2990 at android.media.MediaDrm.getProvisionRequestNative(Native Method) at android.media.MediaDrm.getProvisionRequest(MediaDrm.java:881) at com.google.android.exoplayer2.drm.FrameworkMediaDrm.getProvisionRequest(FrameworkMediaDrm.java:107) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.postProvisionRequest(DefaultDrmSessionManager.java:437) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.openInternal(DefaultDrmSessionManager.java:423) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.acquireSession(DefaultDrmSessionManager.java:342) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:748) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:341) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readFormat(MediaCodecRenderer.java:501) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:484) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:464) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:207) at android.os.HandlerThread.run(HandlerThread.java:61) at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 07-21 12:35:14.677 22439-22439/com.myplex.sun.dev E/EventLogger: playerFailed [0.36] com.google.android.exoplayer2.ExoPlaybackException at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:207) at android.os.HandlerThread.run(HandlerThread.java:61) at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) Caused by: android.media.MediaDrm$MediaDrmStateException: Failed to get provision request: DRM vendor-defined error: -2990 at android.media.MediaDrm.getProvisionRequestNative(Native Method) at android.media.MediaDrm.getProvisionRequest(MediaDrm.java:881) at com.google.android.exoplayer2.drm.FrameworkMediaDrm.getProvisionRequest(FrameworkMediaDrm.java:107) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.postProvisionRequest(DefaultDrmSessionManager.java:437) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.openInternal(DefaultDrmSessionManager.java:423) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.acquireSession(DefaultDrmSessionManager.java:342) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:748) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:341) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readFormat(MediaCodecRenderer.java:501) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:484) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:464) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300) at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:207)  at android.os.HandlerThread.run(HandlerThread.java:61)  at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 

ram992 avatar Aug 07 '17 05:08 ram992

Also @ojw28, is there any way that I can check whether a device has a secure decoder, before I pass it a Modular DRM enabled url, cause I was able to reproduce this issue with demoPlayer if I select any option from "Widevine DASH policy tests(GTS)" and select any content which says secure videopath required.

I got this Idea, when I tried to run NetFlix app on the same device, and it throws me an error saying, " This device is not supported", as soon as I open app.

And how to handle this issue if this happens on Android N or O devices as they do not come with Classic DRM libraries anymore (I read it in a Google portal).

ram992 avatar Aug 07 '17 05:08 ram992

Also I just got my Hands on a Huawei Honor CHE1-L04. I face a different issue with it. The problem is Player is not requesting for a License but returning this: Huawei Honor CHE1-L04_Error.txt.

I checked it with charles proxy and even asked our API guys to check the logs. I have compared it with a Lenovo device, when I play any DRM content on Lenovo device, Server is logging the request and I can also see it in Charles logs. But from the Huawei device nothing happens except the error.

ram992 avatar Aug 07 '17 07:08 ram992

@wvpaf any update on the questions

ram992 avatar Aug 23 '17 10:08 ram992

@ram992 having full ADB bugreports and logcats is preferred as snippets do not provide full context of the errors.

wvpaf avatar Sep 05 '17 22:09 wvpaf

@ram992 to answer your question fro 8/6 : please see https://developer.android.com/reference/android/media/MediaCodecInfo.CodecCapabilities.html

and please provide full logs of the failing case..

wvpaf avatar Sep 12 '17 22:09 wvpaf

@wvpaf Sorry for the delay, but which issue you are pointing to that requires complete logs, I have two issues : 1) As the title says DRM vendor-defined error: -2990 happening on some mobiles, and 2) In Some devices player doesn't request for License but throws error which I have shared and happens on Huawei Honor CHE1-L04 I will try to provide the logcat output here, and mail the complete report to any private mail id that you can provide.

ram992 avatar Sep 14 '17 06:09 ram992

It would be far more efficient if you just provided full bug reports for every issue you file, as is requested in the issue template. The issue template also includes an email address to which you can send them. Thanks.

ojw28 avatar Sep 14 '17 08:09 ojw28

Faced the same issue and re-reporting the issue as comment in the official template

Thanks, Harish

Widevine DRM Playback issue on certain devices - Error thrown - Failed to get provision request: DRM vendor-defined error: -2990

Issue description

Whenever a Widevine DRM encrypted video played on certain devices, the player throws android.media.MediaDrm$MediaDrmStateException: Failed to get provision request: DRM vendor-defined error: -2990

Reproduction steps

  1. Clone the Exoplayer version v2.5.3
  2. Create a demo apk.
  3. Try playing the Widevine DRM videos in the demo app.

Link to test content

You can use any of the sample videos list in demo playlist in Widevine section or Use this exo playlist : harish.exolist.json

Version of ExoPlayer being used

v2.5.3

Device(s) and version(s) of Android being used

Redmi 4A - 6.0.1 (Fingerprint : Xiaomi/rolex/rolex:6.0.1)

Same issue was also found in following devices which my users reported

Redmi 3s - 6.0.1 (Fingerprint : Xiaomi/land/land:6.0.1) Lenovo K3 - 6.0 (Fingerprint : Lenovo/K50a40/K50a40:6.0)

Attachments

Logcat report : Redmi_4A_Logcat Bugreport : Redmi_4A_Bugreport (23.5 MB File - Might get timed-out / truncated, curl and download it)

sharish avatar Oct 09 '17 12:10 sharish

@wvpaf - PTAL. Thanks!

ojw28 avatar Oct 10 '17 19:10 ojw28

In the most recent logs there is an error which indicates there is a corrupted certificate. Reprovisioning the device may help. The App can force a reprovision; getProvisionRequest and provideProvisionResponse.

wvpaf avatar Nov 07 '17 23:11 wvpaf

Hi any update on trying a re-provisioning of the device?

wvpaf avatar Nov 21 '17 19:11 wvpaf

Nope. Calling getProvisionRequest throws the above exception. Tried replacing the constructor to the following and the exception is thrown right away there

private MyFrameworkMediaDrm(UUID uuid) throws UnsupportedSchemeException {
        this.mediaDrm = new MediaDrm(Assertions.checkNotNull(uuid));

        try {
            MediaDrm.ProvisionRequest provisionRequest = mediaDrm.getProvisionRequest();
            String defaultUrl = provisionRequest.getDefaultUrl();
            Log.d("DRM_ISSUE", "Default URL:"+defaultUrl);

        }catch (Throwable t) {
            Log.e("DRM_ISSUE", "Exception:"+t.getClass().getSimpleName()+":"+t.getMessage());
            t.printStackTrace();
        }

    }

Caught Stacktrace for above code

11-23 12:14:21.939   604  1510 I WVCdm   : Level3 Library Jun 15 2015 14:09:24
11-23 12:14:21.942   604  1510 W WVCdm   : Could not read /data/mediadrm/IDM1013/ay64.dat2: No such file or directory
11-23 12:14:21.942   604  1510 W WVCdm   : Could not load liboemcrypto.so. Falling back to L3.  dlopen failed: library "liboemcrypto.so" not found
11-23 12:14:21.945   604  1510 E WVCdm   : GetProvisioningRequest: fails to get token
11-23 12:14:21.947 14510 14510 E MediaDrm-JNI: Illegal state exception: Failed to get provision request: DRM vendor-defined error: -2990 (-2990)
11-23 12:14:21.947 14510 14510 D DRM_ISSUE: Exception:MediaDrmStateException:Failed to get provision request: DRM vendor-defined error: -2990
11-23 12:14:21.948 14510 14510 W System.err: android.media.MediaDrm$MediaDrmStateException: Failed to get provision request: DRM vendor-defined error: -2990
11-23 12:14:21.948 14510 14510 W System.err: 	at android.media.MediaDrm.getProvisionRequestNative(Native Method)
11-23 12:14:21.948 14510 14510 W System.err: 	at android.media.MediaDrm.getProvisionRequest(MediaDrm.java:881)
11-23 12:14:21.948 14510 14510 W System.err: 	at com.google.android.exoplayer2.drm.MyFrameworkMediaDrm.<init>(MarrowFrameworkMediaDrm.java:66)
11-23 12:14:21.948 14510 14510 W System.err: 	at com.google.android.exoplayer2.drm.MyFrameworkMediaDrm.newInstance(MarrowFrameworkMediaDrm.java:54)
11-23 12:14:21.948 14510 14510 W System.err: 	at com.example.video.builders.RenderersFactoryBuilder.build(RenderersFactoryBuilder.java:66)

Will try root the device to check these files '/data/mediadrm/IDM1013/ay64.dat2' and 'liboemcrypto.so' exist anywhere in the device and will update the thread.

Let me know if you need any other info.

Thanks, Harish

sharish avatar Nov 23 '17 07:11 sharish

Hello @wvpaf any update on this issue ? Also I have observed that this issue occurs randomly on Redmi 4A. Does this has anything to do with Max number of open sessions param that I can see if I use an app called DRM info which gives the details about the Modular DRM module drm info

This image will give you the details of the device's DRM Module. Also Sharing the logs, I hope they are helpful DRM ERROR -2990.txt The other thing I have noticed is that Player doesn't request for a license when this error comes up.

ram992 avatar Dec 01 '17 06:12 ram992

@ram992 can you please provide a full ADB bug report, the latest log provided is not complete.

wvpaf avatar Dec 05 '17 23:12 wvpaf

closing due to inactivity.

wvpaf avatar Jan 02 '18 23:01 wvpaf

@wvpaf, please don't lock the conversation, I will provide an adb report once I am able to get a device for a longer time.

ram992 avatar Jan 03 '18 04:01 ram992

@ram992 you are able to reopen this case once you have more info to share.

wvpaf avatar Jan 03 '18 18:01 wvpaf