Error: No transactions support in neon-http driver - unable_to_create_user

Signup is not working on all of my Better Auth projects. This is the error:
2025-09-18T11:23:56.744Z ERROR [Better Auth]: Error: No transactions support in neon-http driver
2025-09-18T11:23:56.745Z ERROR [Better Auth]: unable_to_create_user
2025-09-18T11:23:56.744Z ERROR [Better Auth]: Error: No transactions support in neon-http driver
2025-09-18T11:23:56.745Z ERROR [Better Auth]: unable_to_create_user
i created GitHub issue: https://github.com/better-auth/better-auth/issues/4747
GitHub
Error: No transactions support in neon-http driver - unable_to_crea...
Is this suited for github? Yes, this is suited for github To Reproduce Create a project with Next.js, Drizzle and Neon. drizzle.ts should look like this: import { neon } from "@neondatabase/se...
10 Replies
Roman
Roman3w ago
What’s your auth config?
OrcDev
OrcDevOP3w ago
drizzle-orm/neon-http dependency is the problem auth config is not the problem, it's happening on all of my projects here is auth.ts from one of those projects
import { checkout, polar, portal, usage, webhooks } from "@polar-sh/better-auth";
import { Polar } from "@polar-sh/sdk";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { nextCookies } from "better-auth/next-js";
import { Resend } from "resend";

import ForgotPasswordEmail from "@/components/emails/forgot-password";
import db from "@/db/drizzle";
import { schema, Subscription } from "@/db/schema";
import { updateSubscription } from "@/server/subscriptions";

const resend = new Resend(process.env.RESEND_API_KEY);

const polarClient = new Polar({
accessToken: process.env.POLAR_ACCESS_TOKEN,
// Use 'sandbox' if you're using the Polar Sandbox environment
// Remember that access tokens, products, etc. are completely separated between environments.
// Access tokens obtained in Production are for instance not usable in the Sandbox environment.
server: process.env.APP_ENV === "production" ? "production" : "sandbox"
});


export const auth = betterAuth({
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
emailAndPassword: {
enabled: true,
sendResetPassword: async ({ user, url }) => {
await resend.emails.send({
from: `${process.env.EMAIL_SENDER_NAME} <${process.env.EMAIL_SENDER_ADDRESS}>`,
to: [user.email],
subject: "Reset your password",
react: ForgotPasswordEmail({ resetLink: url, username: user.name }),
});
},
},
database: drizzleAdapter(db, {
provider: "pg",
schema: schema
}),
plugins: [polar({
client: polarClient,
createCustomerOnSignUp: true,
use: [
checkout({
products: [{ productId: "533c4351-04d5-4739-a465-e1883307e5df", slug: "pro" }],
successUrl: "/play/payment",
authenticatedUsersOnly: true,
}),
portal(),
usage(),
webhooks({
secret: process.env.POLAR_WEBHOOK_SECRET!,
onOrderPaid: async (payload) => {
if (payload.data.paid) {
await updateSubscription(
payload.data.customer.externalId as string,
Subscription.PRO,
true
);
}
},
onSubscriptionCanceled: async (payload) => {
if (payload.data.canceledAt) {
await updateSubscription(
payload.data.customer.externalId as string,
Subscription.FREE,
false
);
}
}
})
],
}), nextCookies()],
});
import { checkout, polar, portal, usage, webhooks } from "@polar-sh/better-auth";
import { Polar } from "@polar-sh/sdk";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { nextCookies } from "better-auth/next-js";
import { Resend } from "resend";

import ForgotPasswordEmail from "@/components/emails/forgot-password";
import db from "@/db/drizzle";
import { schema, Subscription } from "@/db/schema";
import { updateSubscription } from "@/server/subscriptions";

const resend = new Resend(process.env.RESEND_API_KEY);

const polarClient = new Polar({
accessToken: process.env.POLAR_ACCESS_TOKEN,
// Use 'sandbox' if you're using the Polar Sandbox environment
// Remember that access tokens, products, etc. are completely separated between environments.
// Access tokens obtained in Production are for instance not usable in the Sandbox environment.
server: process.env.APP_ENV === "production" ? "production" : "sandbox"
});


export const auth = betterAuth({
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
emailAndPassword: {
enabled: true,
sendResetPassword: async ({ user, url }) => {
await resend.emails.send({
from: `${process.env.EMAIL_SENDER_NAME} <${process.env.EMAIL_SENDER_ADDRESS}>`,
to: [user.email],
subject: "Reset your password",
react: ForgotPasswordEmail({ resetLink: url, username: user.name }),
});
},
},
database: drizzleAdapter(db, {
provider: "pg",
schema: schema
}),
plugins: [polar({
client: polarClient,
createCustomerOnSignUp: true,
use: [
checkout({
products: [{ productId: "533c4351-04d5-4739-a465-e1883307e5df", slug: "pro" }],
successUrl: "/play/payment",
authenticatedUsersOnly: true,
}),
portal(),
usage(),
webhooks({
secret: process.env.POLAR_WEBHOOK_SECRET!,
onOrderPaid: async (payload) => {
if (payload.data.paid) {
await updateSubscription(
payload.data.customer.externalId as string,
Subscription.PRO,
true
);
}
},
onSubscriptionCanceled: async (payload) => {
if (payload.data.canceledAt) {
await updateSubscription(
payload.data.customer.externalId as string,
Subscription.FREE,
false
);
}
}
})
],
}), nextCookies()],
});
OrcDev
OrcDevOP3w ago
It's probably because of this update here: https://www.better-auth.com/changelogs#v1.3.10
Changelogs | Better Auth
Latest changes , fixes and updates.
OrcDev
OrcDevOP3w ago
I fixed it by downgrading to version 1.3.9 The problem is in this transactions update here: https://www.better-auth.com/changelogs#v1.3.10
Changelogs | Better Auth
Latest changes , fixes and updates.
Roman
Roman3w ago
Try setting transaction: false in drizzleAdapter That worked for me, although I was using Cloudflare d1, not neon, so I’m not sure
OrcDev
OrcDevOP3w ago
bot on GitHub said the same thing, but he also said it's risky:
There’s no built-in workaround for transactionless drivers in Better Auth. Disabling transactions globally (by setting transaction: false in your adapter config) is possible for some adapters, but it’s risky and not recommended unless you’re only targeting databases that lack transaction support, since it compromises data integrity and atomicity for multi-step operations like signup and social login
There’s no built-in workaround for transactionless drivers in Better Auth. Disabling transactions globally (by setting transaction: false in your adapter config) is possible for some adapters, but it’s risky and not recommended unless you’re only targeting databases that lack transaction support, since it compromises data integrity and atomicity for multi-step operations like signup and social login
bekacru
bekacru3w ago
@OrcDev we're going to disable transactions for drivers that doesn't support it automatically on the next release. We should improve our messaging here as it's in a controlled environment, so the risk isn't that high. And we often do rollback changes programmatically if they compromise atomicity
OrcDev
OrcDevOP3w ago
Thanks for answering @bekacru, the problem is that all my apps just stopped working without me even knowing. Definitely need to put this in docs, and explain it better
bekacru
bekacru3w ago
Thanks for the feedback @OrcDev sorry for the interruption. We're rolling back changes and we'll add a section on the docs and explain it better should be fixed on 1.3.12
OrcDev
OrcDevOP3w ago
Amazing! Thanks @bekacru!

Did you find this page helpful?