<@ULVA73B9P> I have just updated my self-hosted op...
# ask-marvin
r
@Marvin I have just updated my self-hosted open source Prefect to version 3.7.1 and wanted to try the new UI v2. I could see the original UI v1 page, so the connection was established. When I clicked the banner with suggestion to try new UI, I got just a blank page. The error displayed in Inspect window of my browser was: crypto.randomUUID is not a function Is it possible that the cause is that I access the page via HTTP instead of HTTPS? Or what can I do to fix the issue and see UI v2?
m
thought for 124.7 seconds
Yes — HTTP is very likely the cause. In Prefect 3.7.1, UI v2 can hit a blank page if the browser console shows:
Copy code
crypto.randomUUID is not a function
That happens because UI v2 was calling
crypto.randomUUID()
directly, and that API is only available in a secure context in browsers — typically: *
https://...
works *
<http://localhost>...
usually works * plain
http://<server-or-ip>
often does not work So if your self-hosted Prefect UI is being accessed over regular HTTP, that can absolutely explain the failure. What to do Best fix: upgrade beyond 3.7.1 This was fixed upstream after 3.7.1 by adding a fallback when
crypto.randomUUID()
is unavailable. If you can, upgrade to a newer 3.7.x release. Relevant source: * Fix in `ui-v2/src/api/csrf.ts`: csrf.ts * Fix commit: d4554c3022 Alternative fix: serve Prefect over HTTPS If you need to stay on 3.7.1, put the UI behind HTTPS via your reverse proxy/load balancer (nginx, Traefik, Caddy, etc.). Make sure the browser actually sees an
https://
URL. For example, with a reverse proxy you generally want TLS termination and forwarded headers such as:
Copy code
X-Forwarded-Proto: https
Quick checks 1. Open the UI using
https://...
instead of
http://...
2. If possible, test from
<http://localhost>...
* if localhost works but remote HTTP does not, that strongly confirms this is a secure-context issue 3. Check browser dev tools console again after switching to HTTPS Bottom line * Yes, accessing via HTTP can cause this exact UI v2 error. * The most reliable solution is to upgrade to a version newer than 3.7.1. * If you stay on 3.7.1, serve the UI over HTTPS. If you want, I can also help you verify: * whether your current Prefect version already includes the fix, or * how to configure HTTPS for your specific setup (Docker Compose, nginx, Traefik, Kubernetes, etc.).
n
in case its helpful: https://tangled.org/zzstoatzz.io/my-prefect-server/blob/main/deploy/prefect-values.yaml#L18-30 (ie my config for running my prefect server on a single hetzner node w k3s, using the new UI)
haven't seen this before tho 🤔
crypto.randomUUID is not a function