platforms icon indicating copy to clipboard operation
platforms copied to clipboard

https://next-auth.js.org/errors#oauth_callback_handler_error Cannot set property error of

Open FethiAmari opened this issue 1 year ago • 3 comments

I'm getting this error when i run fresh install

Query: select "accounts"."userId", "accounts"."type", "accounts"."provider", "accounts"."providerAccountId", "accounts"."refresh_token", "accounts"."refresh_token_expires_in", "accounts"."access_token", "accounts"."expires_at", "accounts"."token_type", "accounts"."scope", "accounts"."id_token", "accounts"."session_state", "accounts"."oauth_token_secret", "accounts"."oauth_token", "users"."id", "users"."name", "users"."username", "users"."gh_username", "users"."email", "users"."emailVerified", "users"."image", "users"."createdAt", "users"."updatedAt" from "accounts" inner join "users" on "accounts"."userId" = "users"."id" where ("accounts"."provider" = $1 and "accounts"."providerAccountId" = $2) -- params: ["github", "10389192"] [next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR] https://next-auth.js.org/errors#oauth_callback_handler_error Cannot set property error of #<ErrorEvent> which has only a getter { message: 'Cannot set property error of #<ErrorEvent> which has only a getter', stack: 'TypeError: Cannot set property error of #<ErrorEvent> which has only a getter\n' + ' at formatError (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/utils/logger.js:42:17)\n' + ' at Object.error (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/utils/logger.js:52:20)\n' + ' at _callee2$ (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/core/errors.js:307:36)\n' + ' at tryCatch (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:36:24)\n' + ' at Generator.eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:123:25)\n' + ' at Generator.eval [as throw] (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:64:29)\n' + ' at asyncGeneratorStep (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/asyncToGenerator.js:4:21)\n' + ' at _throw (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:17)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', name: 'TypeError' }

FethiAmari avatar Aug 16 '24 14:08 FethiAmari

same issue

bhaktatejas922 avatar Aug 29 '24 03:08 bhaktatejas922

same issue

It's easy to fix Don't use Local Postgres just use Vercel Postgres database

FethiAmari avatar Aug 30 '24 17:08 FethiAmari

Yeah same resolution here. Error message can be improved here

bhaktatejas922 avatar Aug 30 '24 19:08 bhaktatejas922

Same error here, but Vercel Postgres is not available at vercel.com, can someone help me?

avelinocneto avatar Mar 14 '25 02:03 avelinocneto

use neon postgres, error still goes away, but this is annoying

Dinuda avatar Mar 29 '25 15:03 Dinuda

?sslmode=require at the end of the db url may be the difference. I haven't tested this yet but its the only thing different that I can tell from the db connection.

Joseffb avatar Apr 06 '25 00:04 Joseffb

👋 We've updated this repo to have a more simplified example + a new guide:

  • https://github.com/vercel/platforms/pull/451
  • https://vercel.com/guides/nextjs-multi-tenant-application

leerob avatar May 11 '25 14:05 leerob