question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DRM Cookie Authentication page does not store cookie

See original GitHub issue

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 2.5.20

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from master? N/A

Are you using the demo app or your own custom app? Demo and custom

If custom app, can you reproduce the issue using our demo app? N/A

What browser and OS are you using? Chrome (Version 88.0.4324.192)- Mac Catalina (10.15.7)

For embedded devices (smart TVs, etc.), what model and firmware version are you using? N/A

What are the manifest and license server URIs? Manifest - https://storage.googleapis.com/shaka-demo-assets/sintel-widevine/dash.mpd DRM server - https://cwip-shaka-proxy.appspot.com/cookie_auth

What did you do? Following the DRM tutorial and attempting to set the cookie auth option for DRM.

Setup request filter to allow cross site credentials as detailed in instructions (before player.load())

  player.getNetworkingEngine().registerRequestFilter(function(type, request) {
    if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
      request.allowCrossSiteCredentials = true;
    }
  });

What did you expect to happen? Visit set_cookie page (https://cwip-shaka-proxy.appspot.com/set_cookie), visit player page, cookie persists and playback is allowed (no error 6007)

What actually happened? When visiting the set_cookie page then the cookie is set (can see it is with the document.cookie() call) but navigating back to the player page does not have the cookie stored and the player throws a 6007 error

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joeyparrishcommented, Mar 12, 2021

That did the trick! I’m not sure when the “Secure” cookie attribute became a requirement, but we haven’t held any training classes since 2019, so that particular tutorial hasn’t been checked in a while. The fix has been deployed to the cwip-shaka-proxy service.

Thanks, @TheModMaker, for the fix, and @Alpenglow88 for pointing out the issue.

0reactions
TheModMakercommented, Mar 11, 2021

Can we set the cookie’s settings to allow cross-origin access? Does this doc help https://web.dev/samesite-cookies-explained/?

For example, can the server set CWIP-Auth-Cookie=abc; SameSite=None; Secure?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forms Authentication and authentication cookie not persisting
My problem is that my authentication cookies do not appear to be persisting after I close the browser. My Approach. I have written...
Read more >
Can't log in: "ERROR: Cookies are blocked or not supported ...
I get the "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." error when I...
Read more >
What to do if you receive errors about DRM when you attempt ...
What to do if you receive errors about DRM when you attempt to play video or audio. How to enable playback of DRM...
Read more >
Argus Content Platforms, Cookies and DRM Tools
If you do not set your browser to refuse cookies, a cookie will automatically be issued to you when you log on to...
Read more >
Use cookie authentication without ASP.NET Core Identity
The authentication cookie's IsEssential property is set to true by default. ... The user information is serialized and stored in the cookie.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found