ERR_INVALID_ARG_TYPE

Hey, so suddenly my app auth just stopped working. if I go to a protected route I got redirected to the landing page, and if I try to login or signup I always get the same error now: ERROR [Better Auth]: Failed to create user TypeError: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date at Array.forEach (<anonymous>) { code: 'ERR_INVALID_ARG_TYPE' } I tried to change to my main branch, but it's still having the same behavior. Auth.js: import { betterAuth } from "better-auth"; import { nextCookies } from "better-auth/next-js"; import { drizzleAdapter } from "better-auth/adapters/drizzle"; import { db } from "@ideate/server/db"; export const auth = betterAuth({ plugins: [nextCookies()], database: drizzleAdapter(db, { provider: "pg", }), emailAndPassword: { enabled: true, autoSignIn: true, }, }); db schema (attached)
3 Replies
Isaac Fimbres
Isaac FimbresOP6d ago
I'm using the T3 stack btw (next 15, trpc, drizzle and postgresql database)
bekacru
bekacru6d ago
which verision of better auth are you using?
Isaac Fimbres
Isaac FimbresOP6d ago
Hey @bekacru I was using 1.1.18, then I upgraded it to 1.1.21 hoping to fix the issue. But the error persists.

Did you find this page helpful?