vercel / platforms

A full-stack Next.js app with multi-tenancy and custom domain support. Built with Next.js App Router and the Vercel Domains API.
https://app.vercel.pub
5.73k stars 767 forks source link

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

Open FethiAmari opened 3 months ago

FethiAmari commented 3 months ago

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/next-auth@4.24.7_next@14.0.2_react-dom@18.3.1_react@18.3.1/node_modules/next-auth/utils/logger.js:42:17)\n' + ' at Object.error (webpack-internal:///(rsc)/./node_modules/.pnpm/next-auth@4.24.7_next@14.0.2_react-dom@18.3.1_react@18.3.1/node_modules/next-auth/utils/logger.js:52:20)\n' + ' at _callee2$ (webpack-internal:///(rsc)/./node_modules/.pnpm/next-auth@4.24.7_next@14.0.2_react-dom@18.3.1_react@18.3.1/node_modules/next-auth/core/errors.js:307:36)\n' + ' at tryCatch (webpack-internal:///(rsc)/./node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:36:24)\n' + ' at Generator.eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:123:25)\n' + ' at Generator.eval [as throw] (webpack-internal:///(rsc)/./node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:64:29)\n' + ' at asyncGeneratorStep (webpack-internal:///(rsc)/./node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/asyncToGenerator.js:4:21)\n' + ' at _throw (webpack-internal:///(rsc)/./node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:17)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', name: 'TypeError' }

bhaktatejas922 commented 3 months ago

same issue

FethiAmari commented 3 months ago

same issue

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

bhaktatejas922 commented 3 months ago

Yeah same resolution here. Error message can be improved here