server-components-notes-demo icon indicating copy to clipboard operation
server-components-notes-demo copied to clipboard

Error: Unsupported state or unable to authenticate data

Open eric12s opened this issue 3 years ago • 0 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

eric12s avatar Feb 17 '22 03:02 eric12s