Fairplay launch the error always "FAILED_TO_GENERATE_LICENSE_REQUEST" but with the Apple demo page it's working
See original GitHub issueHave you read the FAQ and checked for duplicate open issues? Yes
What version of Shaka Player are you using? 2.5.0
Can you reproduce the issue with our latest release version? Yes
Can you reproduce the issue with the latest code from master? Yes
Are you using the demo app or your own custom app? Demo app
If custom app, can you reproduce the issue using our demo app?
What browser and OS are you using? Safari 12.1 over Mojave
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
There is a discussion already started by mail with the link
What did you do?
Load a Fairplay stream
What did you expect to happen? Works without problem
What actually happened?
but the video works (Note, that the screen is in blank due to Fairplay)
Note: I changed the custom.js in the demo to support Fairplay with the next change: const commonDrmSystems = new Set([ ‘com.widevine.alpha’, ‘com.microsoft.playready’, ‘com.adobe.primetime’, ‘com.apple.fps.1_0’, ‘org.w3.clearkey’, ]);
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (10 by maintainers)

Top Related StackOverflow Question
Having the same issue as @KieronAllsop. Init data is generated 2 times, first time the DRM flow passes, and second time it throws FAILED_TO_GENERATE_LICENSE_REQUEST error. The stream can be played. Found out that encrypted event is triggered twice, so if in drm_engine.js I change:
// Explicit init data for any one stream or an offline session is // sufficient to suppress 'encrypted' events for all streams. const cb = (e) => this.newInitData( e.initDataType, shaka.util.BufferUtils.toUint8(e.initData)); this.eventManager_.listen(this.video_, 'encrypted', cb);to
// Explicit init data for any one stream or an offline session is // sufficient to suppress 'encrypted' events for all streams. const cb = (e) => this.newInitData( e.initDataType, shaka.util.BufferUtils.toUint8(e.initData)); this.eventManager_.listenOnce(this.video_, 'encrypted', cb);it goes away. Not sure what this in-code comment means, should this somehow already be suppressed to trigger just once?
Having just integrated against shaka 2.5.2 I can confirm this is an issue and hope that the following debug helps. This is in Safari in Mojave.
For a single key encrypted fairplay asset there are two sessions created, one with the correct initData and second one containing skd://uuid as the initData.
The second session then gives the following error which results in the “FAILED_TO_GENERATE_LICENSE_REQUEST” error we are seeing.
The first session created (with the correct initData) completes and the content plays.