Intermittent widevine provision request failures(404)
We are getting provisioning failures while playing a live stream which has clear ads and encrypted content together.
{
"name": "Test Stream ",
"uri": "https://content.uplynk.com/channel/3c367669a83b4cdab20cceefac253684.mpd?ad=cleardashnew",
"drm_scheme": "widevine",
"drm_multi_session": true,
"drm_license_url": "https://content.uplynk.com/wv",
"drm_key_request_properties": {
"X-DASH-SEND-ALL-KEYS": "1"
},
"extension": "mpd"
}
I tested on Exoplayer 2.9.0 and was able to reproduce on my pixel3. I believe it has something to do with the stream as it's not consistent and something is getting the player into a bad state where repeated provision requests are being made. We are able to repro the same intermittently on S8, S9 as well.
11-20 15:40:14.656 17017-17130/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Playback error.
com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: com.google.android.exoplayer2.upstream.YOkHttpDataSource$InvalidResponseCodeWithBodyException: Response code: 404
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.shouldWaitForKeys(MediaCodecRenderer.java:1022)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:975)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:650)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:530)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException
Trace caught on an error scenario(Exoplayer 2.9.0) is attached below:

Problems with key request in multi-period stream with clear/encrypted periods. Apparently root-caused by a server issue but probably worth to look into this more closely? Assigning.
We're unable to reproduce - how frequently does it occur for you?
There's also insufficient information for us to diagnose the issue. You say it's a Widevine provisioning request failure, but that seems unlikely if it's periodic. Are you sure it's not a key request failure? If so, isn't the problem that https://content.uplynk.com/wv is returning a 404? Which would be an issue with whoever owns that license server, rather than ExoPlayer.
Please clarify. Please also provide more than the tiny snippet of logging provided. The context either side is important (in particular the "Caused by" part of the stack trace that you've snipped off). Thanks!
It's also possible that https://github.com/google/ExoPlayer/commit/6e7b41512f7f7fd2910134a2dbe2621f68a36c84#diff-8361546ef273c43e4875a1317a77d0a7 fixes this issue, although I'm not sure I really understand how it occurs.
Thanks for taking a look. Here is a provisioning request url (definitely not license server) which got us 404 - https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE&signedRequest=CloKTAgAEkgAAAACAAAQcSDIyBtI7_NXAfE1rgYAD5NxSbnr1QkX0gSGAXT7IQ3vobO4bwvMzIDb7q_0bcG-gfpxn84SDdJDCSvDggvx2EoSBIpmn-MaBAgAEgASICXTFJm8q2HvFWgfN5QhGgiu6GVJzKYK6fgDZRoO9ZpH
Request header had only "User-Agent" key/value pairs added.
Will check out importing 6e7b415#diff-8361546ef273c43e4875a1317a77d0a7 .Thanks.
@paf-wv - Any idea why the provisioning request above would result in a 404?
we are also seeing 404s on https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create, which prevents the devices from playing any Widevine content. We have a few devices in our labs that show the issue, but also production devices.
Example request: https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE&signedRequest=CscFEgQf9A9IGgQIABIAKrgFCgx3aWRldmluZS5jb20SEFFDT-KkTHY7zCyCai1u-acagANvNWqy2JZt_IO-G3F6FOUm00XViO0WQb5XCCKlmkx4UZRNVVQzHKQlDJBl1WIhfkFS1QuE9djaeIwn-8BGFSr5pVK28LpbYZKe54BLHCsH7fRZ4k-avpQrjA8Zij3npFMO2Ro1i4gINmFEdeE5geD5Nif8G-ZZJ5O7-5Bo-mciJrAIgJZsl_X3hjUCE4kBUmhr0ou1STrPrDcx6rIY3YJdRZwlHOTUuwe_Y78BL4a3tA6Dib_YYNJJEC4Y2fiOBqJmGS7S_GKJoHNs3dsR6hxBsDTc_kPTH7eg-vOdcUv0nYwiNspSxxn5XMRe0WRl68qujF6xTlmCkd0pruG0YaS97Z_o6YT1Nd3b9B3yCN-Ynngfd4wXploPF8uuDC8iighH_1epH1Vg3_BWZiLbcCjrQfBdO3ncVsqhq5Zpx7zMm1uU5roAyofq81ASL4rU3rDdIAyA_bpNsgY8PuumXP2Yew52bn4mjeGOea1LN9kjY0Cpb5ESwcr5B0j93LKfRkQiECCcrCnzoMikiBW1DDVwidYqgAIfhM6qIqYfG5-qY5-XvxLFWT7GzEo9_JTBBpCWdHT6Qz0n2i216CigpOt1Ea_Ot_rK2snUlTHwovdCZYwYT1qg0ohDYQAzXEjfXHzpwl5oeUokiM5Ogq41ZaHbeGE9zXtMddcYGevyvzkD73K6oAuXRrbokWZboDCo7WjrTRY3jNMQh-5gIQ_eTJAdxoRQhqpasX9F2W2XXH5QOh6GPUOO9yEAdQU3axVYmC2rQVPV52Bw65uH71euT_bkMPtPyBkUuh0AsW-VHwYPMORhGt-_eQXkPnS8PY6Maq6gtEpRcJrnexgLSAo-8g0JLiUlzwQKBgO_X13to7aWfrzs1_qlEiAC7x4XPSCVZKHyQdQZJPELZMp6VnGteU8dSHi7ZxWtYhgC
Hi there, Thanks for reporting. According to the service's team the provisioning server accepts HTTP POSTs. Could that be the cause of the 404s?
Adding client eng to this to verify.
Hi there we are asking the service folks to take a look as well. However why are multiple provisioning requests required? The main use case is processioning should happen only once per device per app per factory reset.
Hi @paf-wv, in our case, we found the issue being caused by side-effect of the changes in DataSpec
in 2.9 ref: https://github.com/google/ExoPlayer/commit/d3686cf8a2fe4e959ed4e900bda5927b9eec5a88 . We have fixed our implementation by forcing an empty body for the provisioning requests, which then ensures the request will go out as a POST instead of a GET.
So that was basically an application specific issue, right? @juechemparathy - Are you sure your issue isn't similar?
closing as reporter resolved the issue. Sorry @ojw28 we may not get to know what the solution was...