Next.js Discord

Discord Forum

Acme Dashboard Tutorial app works fine on my machine. Breaks when deployed.

Unanswered
Korat posted this in #help-forum
Open in Discord
KoratOP
Long story short. I went through the Acme Dashboard tutorial from the nextjs.org website yesterday and got it working. I had one issue where I was getting a "CallbackRouteError". I checked stackoverflow and was able to figure it out. It was because I placed the secret key I got from running the openssl command under the wrong environmental variable name. Once it was fixed, everything worked on my computer. I committed and pushed to Github, with Vercel deploying the most recent commit. It's here where the same error comes up again. Figuring that it is the same issue, I tried uploading the secret key from my machine, as well as adding the route for the project on Vercel, but it still gives me the error. Error from logs:

[auth][error] CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror
[auth][cause]: TypeError: "ikm"" must be an instance of Uint8Array or a string
at i (/var/task/.next/server/chunks/782.js:398:21462)
at /var/task/.next/server/chunks/782.js:398:21744
at s (/var/task/.next/server/chunks/782.js:398:21842)
at c (/var/task/.next/server/chunks/782.js:42:18958)
at Object.o [as encode] (/var/task/.next/server/chunks/782.js:42:18019)
at Object.c (/var/task/.next/server/chunks/782.js:42:26321)
at async c (/var/task/.next/server/chunks/782.js:42:42399)
at async u (/var/task/.next/server/chunks/782.js:42:17111)
at async a (/var/task/.next/server/chunks/782.js:398:72917)
at async b (/var/task/.next/server/app/login/page.js:8:408)
[auth][details]: {
"provider": "credentials"
}

I thought about trying to see if the Vercel CLI could generate the openssl key for me, but there didn't seem to be a command for that when I looked at the docs. If anyone would be willing to point me in the right direction, it would be appreciated. Thanks.

0 Replies