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

TypeError: Cannot read properties of null (reading 'license') when trying to use DRMToday licenses #3960

Closed
5 tasks done
tomraut opened this issue Jun 19, 2022 · 4 comments
Closed
5 tasks done
Labels

Comments

@tomraut
Copy link

tomraut commented Jun 19, 2022

Environment
Steps to reproduce

Try to start stream https://ovpuspvod.a2d-stage.tv/16062866-7a02-4aa9-8dc7-4cd48fc66c9f/e58a6e60-ed3f-11ec-b3fa-4ba2bb9a9513_411.ism/.mpd using reference player. For DRM options, toggle Widevine and use this as license URL: https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true&assetId=tvmedia-staging-411 and remember also to toggle "DRM Today". Please also add additional header to the request which is "dt-custom-data: eyJ1c2VySWQiOiJyZW50YWwxIiwic2Vzc2lvbklkIjoiY2FsbGV0ZXN0MiIsIm1lcmNoYW50IjoiYTJkIn0="

Observed behavior

Player starts to load and it receives HTTP 200 response from the license request but error occurs and following is logged to console:

Console output
[125572][ProtectionController] DRM: initData: ����pssh����íï�©yÖJΣÈ'ÜÕ�!í���e����	Or>¢l9��;¤áÄ�ßÜ��castlabs"<eyJhc3NldElkIjoiZXUtbm9ydGgtMS1wcmVwcm9kLXR2bWVkaWEtNDExIn0=2�default���Xpssh������ðy�@B�«�æ[à�_����88�������.�<�W�R�M�H�E�A�D�E�R� �x�m�l�n�s�=�"�h�t�t�p�:�/�/�s�c�h�e�m�a�s�.�m�i�c�r�o�s�o�f�t�.�c�o�m�/�D�R�M�/�2�0�0�7�/�0�3�/�P�l�a�y�R�e�a�d�y�H�e�a�d�e�r�"� �v�e�r�s�i�o�n�=�"�4�.�0�.�0�.�0�"�>�<�D�A�T�A�>�<�P�R�O�T�E�C�T�I�N�F�O�>�<�K�E�Y�L�E�N�>�1�6�<�/�K�E�Y�L�E�N�>�<�A�L�G�I�D�>�A�E�S�C�T�R�<�/�A�L�G�I�D�>�<�/�P�R�O�T�E�C�T�I�N�F�O�>�<�K�I�D�>�P�n�J�P�C�W�y�i�m�T�m�B�O�6�T�h�x�J�z�f�3�A�=�=�<�/�K�I�D�>�<�L�A�_�U�R�L�>�h�t�t�p�s�:�/�/�l�i�c�.�s�t�a�g�i�n�g�.�d�r�m�t�o�d�a�y�.�c�o�m�/�l�i�c�e�n�s�e�-�p�r�o�x�y�-�h�e�a�d�e�r�a�u�t�h�/�d�r�m�t�o�d�a�y�/�R�i�g�h�t�s�M�a�n�a�g�e�r�.�a�s�m�x�<�/�L�A�_�U�R�L�>�<�L�U�I�_�U�R�L�>�h�t�t�p�s�:�/�/�p�l�a�y�r�e�a�d�y�-�u�i�.�e�x�a�m�p�l�e�.�c�o�m�<�/�L�U�I�_�U�R�L�>�<�C�H�E�C�K�S�U�M�>�z�V�Z�E�P�V�N�c�C�I�0�=�<�/�C�H�E�C�K�S�U�M�>�<�/�D�A�T�A�>�<�/�W�R�M�H�E�A�D�E�R�>����³pssh����=^m5��Aè¸CÝ<nrÄ,����{"version":"V1.0","kids":["CU9yPqJsOZmBO6ThxJzf3A=="],"contentID":"eyJhc3NldElkIjoiZXUtbm9ydGgtMS1wcmVwcm9kLXR2bWVkaWEtNDExIn0=","enschema":"cenc"} 
...
dash.all.debug.js:57752 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'license')
    at Object.getLicenseMessage (dash.all.debug.js:57752:42)
    at Object.getLicenseMessage (dash.all.debug.js:57797:37)
    at dash.all.debug.js:54329:50
getLicenseMessage @ dash.all.debug.js:57752
getLicenseMessage @ dash.all.debug.js:57797
(anonymous) @ dash.all.debug.js:54329
Promise.then (async)
onLoad @ dash.all.debug.js:54328
xhr.onload @ dash.all.debug.js:54441
load (async)
_doLicenseRequest @ dash.all.debug.js:54437
(anonymous) @ dash.all.debug.js:54362
Promise.then (async)
_issueLicenseRequest @ dash.all.debug.js:54361
_onKeyMessage @ dash.all.debug.js:54252
(anonymous) @ dash.all.debug.js:18171
trigger @ dash.all.debug.js:18170
handleEvent @ dash.all.debug.js:57064
dash.all.debug.js:18001 
Expected behavior

License request should success and playback should start.

@dsilhavy can you please take a look at this? I'm wondering why DRM initData refers to PlayReady in this case and not Widevine..?

@tomraut tomraut added the Bug label Jun 19, 2022
@dsilhavy
Copy link
Collaborator

The format of your license response looks different from what we implemented against in #3711

In this case they respond with:

{
  "status": "OK",
  "status_message": "",
  "license": "CAIS4gMKNAoQo/TowglF6Lb3AHxL8FpvUhIQo/TowglF6Lb3AHxL8FpvUhoAIAEoADgAQABIveXVlQYSDAgBEAEYACAAKABgARpmEhA8t4GYCu5bjAgz/Dd6po4SGlBlkf3UAJ8DEfXT1DUVVBRGlMtfhfYbK2I/HPVCUrDuO5eeHrft3gmZVx0CzhBSPxTlMUwgHH8KEGyGIf/lOpN9ROUnmWKWRxxXVMidZ+f6lCABGmIKEOnNnS5ouU00kQg2gQvMycISEA+P6A/ZwUI5SP5kMzCuYSkaIGYnXaEMwNM5FLehODbzZU1GqqAuS2ZT9Ndd4/p7//ssIAIoAUISChBrYzE2AAAAADOUIm6AAAAIYgJIRBpiChBJQNh/0X9HPp57HTVy1586EhCD0rq/aMLysRLBe60upxRcGiC1cfAns/4EHtWHpa5m8Ptm5R38H6lgxzTgrh06UBC/0CACKAFCEgoQa2MxNgAAAAAzlCJugAAACGICSEQaYgoQYMjSd+85QgyB4Sz0gsUJ0RIQASr58QXu4KuNpCox75WTVBoguyAmoR9rfXQY8NNZpeDzSOPd+fsReSQk8dD0fdCWupQgAigBQhIKEGtjMTYAAAAAM5QiboAAAAhiAkhEIL3l1ZUGOABQBRogGEcEi8tpF7ghlgn0tw0FcVd9BXFxrj1Nn3s5pg9jgswigAHWcgMxYVv646OaiJHrGan/oC2ANzrhOnbNyPAqSCKv8vhYmwAVx52/4jfBDYqqJMJdYa7F3g5zxEm3zV3Bkmkc+PqobNaCBk5CHwKvfhXa6PkJqX29PgOZPPOTUanL7Iy2lHkuU6efUs/iamBlKJMfRNwP8vKaquKyFQ8dabFUczozCjExNi41LjAgQnVpbHQgb24gRGVjIDE1IDIwMjEgMTA6Mjc6MTcgKDE2Mzk1OTI4MTUpQAFKgAIAAAACAAABAAAFABAzlCJuruefzwAAAEgAAAAQAAAAWgAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAALAAAAAQAAAAwgAAABAAAADUAAAAEAAAAAAAAAAAAAAA/AAAABAAAAEUAAAAEAAAASYAAAAQAAABOAAAABAAAAAAAAAAAAAAAPwAAAAQAAABeAAAABAAAAGKAAAAEAAAAZwAAAAQAAAAAAAAAAAAAAD8AAAAECAPFQ+T4fc3LK7c2WTls1ca3xwBEsu3/cthNjthnP3oWAE=",
  "license_metadata": {
    "content_id": "ZXlKaGMzTmxkRWxrSWpvaVpXMXdjbVZtWlhOMGNtVmhiU0o5",
    "license_type": "STREAMING",
    "request_type": "NEW"
  },
  "supported_tracks": [
    {
      "type": "HD",
      "key_id": "6c2dLmi5TTSRCDaBC8zJwg=="
    },
    {
      "type": "HD",
      "key_id": "SUDYf9F/Rz6eex01ctefOg=="
    },
    {
      "type": "HD",
      "key_id": "YMjSd+85QgyB4Sz0gsUJ0Q=="
    }
  ],
  "make": "Google",
  "model": "ChromeCDM-Mac-x64-7",
  "security_level": 3,
  "internal_status": 0,
  "session_state": {
    "license_id": {
      "request_id": "o/TowglF6Lb3AHxL8FpvUg==",
      "session_id": "o/TowglF6Lb3AHxL8FpvUg==",
      "purchase_id": "",
      "type": "STREAMING",
      "version": 0,
      "original_rental_duration_seconds": 0,
      "original_playback_duration_seconds": 0,
      "original_start_time_seconds": 1656058557
    },
    "signing_key": "qSbZYNWws7Kpq92pui9lJ+LTxmoOzzsO5pLmQnsMQE9kgofCRWZ77ywijSQwZGdsqQsY3jBLX3d3SozPjcX1zg==",
    "keybox_system_id": 21891,
    "license_counter": 0
  },
  "drm_cert_serial_number": "YTIxOWI0MmE2ZDY2Yjc2ZDM3YjY4OWU0MTI0OTE2OWEwYQ==",
  "device_whitelist_state": "DEVICE_NOT_WHITELISTED",
  "message_type": "LICENSE",
  "platform": "macos",
  "device_state": "RELEASED",
  "pssh_data": {
    "key_id": [
      "SUDYf9F/Rz6eex01ctefOg=="
    ],
    "content_id": "ZXlKaGMzTmxkRWxrSWpvaVpXMXdjbVZtWlhOMGNtVmhiU0o5"
  },
  "client_max_hdcp_version": "HDCP_NONE",
  "client_info": [
    {
      "name": "architecture_name",
      "value": "x86-64"
    },
    {
      "name": "company_name",
      "value": "Google"
    },
    {
      "name": "model_name",
      "value": "ChromeCDM"
    },
    {
      "name": "platform_name",
      "value": "MacOSX"
    },
    {
      "name": "widevine_cdm_version",
      "value": "4.10.2449.0"
    }
  ],
  "is_live": true,
  "platform_verification_status": "PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED",
  "content_owner": "castlabs",
  "content_provider": "castlabs",
  "system_id": 21891,
  "oem_crypto_api_version": 16,
  "resource_rating_tier": 0,
  "service_version_info": {
    "license_sdk_version": "16.5.0 Built on Dec 15 2021 10:27:17 (1639592815)",
    "license_service_version": "widevine_license_wls_20211215_101655-RC00"
  },
  "soc": "x64",
  "client_capabilities": {
    "session_token": true,
    "video_resolution_constraints": true,
    "supported_key_type": []
  }
}

@tomraut
Copy link
Author

tomraut commented Jul 25, 2022

@dsilhavy can you elaborate on what kind of a response you had implemented against then?

@dsilhavy
Copy link
Collaborator

Example can be found in the ticket mentioned above #3711

@tomraut
Copy link
Author

tomraut commented Jul 25, 2022

Got this working now, thanks for your assistance @dsilhavy !

@tomraut tomraut closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants