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

crypto.randomUUID is not a function #54

Closed
donalmurtagh opened this issue Apr 11, 2023 · 2 comments · Fixed by #55
Closed

crypto.randomUUID is not a function #54

donalmurtagh opened this issue Apr 11, 2023 · 2 comments · Fixed by #55

Comments

@donalmurtagh
Copy link

donalmurtagh commented Apr 11, 2023

After upgrading from v1.8.1 to v1.8.2, I get the following error in the container when processing an email request

TypeError: crypto.randomUUID is not a function
at /usr/src/server/src/server/ExpressApp.js:55:32
at Layer.handle [as handle_request] (/usr/src/server/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/src/server/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/usr/src/server/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/usr/src/server/node_modules/express/lib/router/layer.js:95:5)
at /usr/src/server/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/usr/src/server/node_modules/express/lib/router/index.js:346:12)
at next (/usr/src/server/node_modules/express/lib/router/index.js:280:10)
at /usr/src/server/node_modules/body-parser/lib/read.js:137:5
at AsyncResource.runInAsyncScope (async_hooks.js:198:9)

This causes a 500 response status code with the following body

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Internal Server Error</pre>
</body>
</html>

No such error occurs with v1.8.1.

@janjaali
Copy link
Owner

Oh I see, we are using different node versions for tests and builds. Unfortunately the node version used in build is 14.15.x. This version does not yet support crypto.randomUUID (see https://nodejs.org/api/crypto.html#cryptorandomuuidoptions).

@janjaali
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants