vercel / server-components-notes-demo

Experimental demo of React Server Components with Next.js. Deployed serverlessly on Vercel.

Home Page:https://next-rsc-notes.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Unsupported state or unable to authenticate data

eric12s opened this issue · comments

Hey, I get an error in the crypto functions with your new version.
Tried to run in https too, but I get 'ERR_SSL_PROTOCOL_ERROR'.

When running in HTTP, this is the error I get when clicking on the 'add a note' button:

Error: Unsupported state or unable to authenticate data
    at Decipheriv.final (node:internal/crypto/cipher:193:29)
    at Function.decryptAesGCM (C:\Users\erics\Desktop\Web\server-components-notes-demo\node_modules\next\dist\compiled\@peculiar\webcrypto\webcrypto.js:46:14381)
    at Function.decrypt (C:\Users\erics\Desktop\Web\server-components-notes-demo\node_modules\next\dist\compiled\@peculiar\webcrypto\webcrypto.js:46:12612)    
    at AesGcmProvider.onDecrypt (C:\Users\erics\Desktop\Web\server-components-notes-demo\node_modules\next\dist\compiled\@peculiar\webcrypto\webcrypto.js:46:18905)
    at AesGcmProvider.decrypt (C:\Users\erics\Desktop\Web\server-components-notes-demo\node_modules\next\dist\compiled\@peculiar\webcrypto\webcrypto.js:31:83609)
    at SubtleCrypto.decrypt (C:\Users\erics\Desktop\Web\server-components-notes-demo\node_modules\next\dist\compiled\@peculiar\webcrypto\webcrypto.js:31:97842)
    at decrypt (webpack-internal:///(middleware)/./libs/session.js:60:46)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.middleware [as handler] (webpack-internal:///(middleware)/./pages/note/edit/_middleware.js:16:21)
get all items from redis: 1.007s

Closing this as stale, worth trying again after #33 👍