Search code examples
angulardockersslcryptographyuuid

ERROR TypeError: window.crypto.randomUUID is not a function - Angular


I have a problem with a deployment to a local server through a private network.

This would be the error: enter image description here

I have not used any process related to uuids, which is why I cannot identify what causes this error and how I could solve it.

When accessing my application within the server, as localhost I have no problems, the problem only appears when I access from a host.

Would there be a way to enable access for HTTP and not need an SSL certificate?


Solution

  • crypto.randomUUID requires a secure context. The browser won't allow you to use it outside of HTTPS when not accessing via localhost.