#Vercel deployment

3 messages · Page 1 of 1 (latest)

woeful wigeon
#

I just deployed an application to Vercel following the docs https://docs.convex.dev/production/hosting/vercel.

The site loads as expected, but if I try to sign-up or sign-in via username/password or anonymously I get an error. The table entries in users and authAccounts are created, but I get a console error.

index-k5IQGmW4.js:50  Uncaught (in promise) Error: [CONVEX A(auth:signIn)] [Request ID: 1edf2d6980ee8189] Server Error
  Called by client
    at nL.action (index-k5IQGmW4.js:50:37677)
    at async index-k5IQGmW4.js:50:55066
#

My first thought was that I needed an environment variable for SITE_URL. That was created by chef for the development environment.

I don't see any documentation for SITE_URL, but I've tried setting that to the vercel url. Still no dice

woeful wigeon
#

Still learning how to debug convex. Looks like it's missing the JWT private key.

Uncaught Error: Uncaught Error: Missing environment variable `JWT_PRIVATE_KEY`
    at requireEnv (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/utils.ts:4:2)
    at generateToken (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/tokens.ts:17:9)
    at generateTokensForSession (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/sessions.ts:77:18)
    at async maybeGenerateTokensForSession (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/sessions.ts:32:10)
    at async signInImpl (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/mutations/signIn.ts:34:0)

    at async handleCredentials (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/signIn.ts:193:19)
    at async handler (../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_react@_02cdd496d493ee8b71c747f4706c30aa/node_modules/@convex-dev/auth/src/server/implementation/index.ts:416:10)