Has anyone run into this js error? `TypeError: cry...
# prefect-ui
g
Has anyone run into this js error?
TypeError: crypto.randomUUID is not a function
I've installed prefect on a vm (ubuntu 22.04). Then I do the following: prefect config set PREFECT_API_URL=http://<my externalip>:4200/api prefect server start --host 0.0.0.0 And I've tried with prefect 2.10.14 and 2.10.15. I'm keep getting this error in both Edge and Chrome - and it breaks the page.
n
Hi @Gene - that error has to do with a missing implementation of the crypto module in whatever JS environment you’re working in. Browser support for the crypto module was pretty spotty until maybe 8 months ago - can you explain more where you’re running into this?
g
Thanks nicholas, i went back and added details (hit enter too quickly 🙂
I'm using Edge, Version 114.0.1823.51 (Official build) (64-bit) - on windows
I'm also seeing it in Chrome, Version 114.0.5735.134 (Official Build) (64-bit) And I tried using a different windows laptop and still got the same issue
j
Oh. It’s only available in secure contexts: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID So it could be because Prefect server installations are non-HTTPS by default
g
oh, ok - that's it. Thanks!
c
Hmm we should make that work in non secure contexts. It’s just for a unique id
n
we’ve got a shimmed version of that somewhere @Craig Harshbarger, I think the initial version of most of the graphs was using that before browser support was as good. I’ve opened a ticket in the main ui-library here - we’ll likely need to implement the shim in a couple of different places but I figure that’s a decent enough central place to track it
🙏 1
👍 2
k
Running into this too.. it causes spottiness in whether /deployments and other pages will load. Is there a web user workaround for this?
a
Me too effect 🙂
t
our local Prefect server is not available after updating from 2.10.13 to 2.10.15. Printing out this error in the logs 😞
c
I’ll get a PR together for this weeks oss release
n
Thanks @Craig Harshbarger - as a workaround in the meantime, I’d suggest something like ngrok - that’ll let you easily proxy your prefect instance through HTTPS
g
I see a the notes say this is fixed but I am still seeing it in the 2.10.17
👀 1
n
Following up here, looks like we introduced a different call to the crypto module at the same time as the other one and didn’t catch it - this’ll be fixed in the next release (see this PR for more details)
🙏 2
👍 1