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

likely crypto.randomUUID can only be used in https #25

Open
mobilestack opened this issue Oct 19, 2024 · 1 comment
Open

likely crypto.randomUUID can only be used in https #25

mobilestack opened this issue Oct 19, 2024 · 1 comment

Comments

@mobilestack
Copy link

The error line might have another choice to implement.

Unhandled Runtime Error

TypeError: crypto.randomUUID is not a function

Source

app/finance/page.tsx (378:18) @ randomUUID
  376 |
  377 |     const userMessage: Message = {
> 378 |       id: crypto.randomUUID(),
      |                  ^
  379 |       role: "user",
  380 |       content: input,
  381 |       file: currentUpload || undefined,

Call Stack

React
HTMLUnknownElement.callCallback
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (20565:1)
Object.invokeGuardedCallbackImpl
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (20614:1)
invokeGuardedCallback
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (20689:1)
invokeGuardedCallbackAndCatchFirstError
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (20703:1)
executeDispatch
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32128:1)
processDispatchQueueItemsInOrder
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32160:1)
processDispatchQueue
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32173:1)
dispatchEventsForPlugins
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32184:1)
eval
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32374:1)
batchedUpdates$1
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (24953:1)
batchedUpdates
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (28844:1)
dispatchEventForPluginEventSystem
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (32373:1)
dispatchEvent
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (30141:1)
dispatchDiscreteEvent
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (30112:1)

@mobilestack
Copy link
Author

Finally, I have solved it.

What I have done is to update the nodejs to newest version.

And if this still occurs, then make the website works in https.

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

No branches or pull requests

1 participant