Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the open-source reactive database for app developers.

Join

support-community

show-and-tell

general

self-hosted

announcements

STUCK ON ⠼ Finding component definitions...

You're trying out the beta local deployment feature! To learn more, read the docs: https://docs.convex.dev/cli/local-deployments To opt out at any time, run npx convex disable-local-deployments ✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its: name as CONVEX_DEPLOYMENT to .env.local...

Convex region question

Is there a way to choose the region of a convex app? I am asking in the context of eu data locality regulations. Thanks...

Could not resolve "crypto" (or "node:crypto")?

```bash ✘ [ERROR] Could not resolve "node:crypto" convex/workpools/queues.nobundle.ts:24:27: 24 │ import { createHash } from "node:crypto";...

Random 400 errors errors with convex better auth

Hey, I am using convex with better-auth but I am always randomly getting a 400 error on the /api/auth/sign-in/social route with the error:
{"code":"VALIDATION_ERROR","message":"Invalid body parameters"}
{"code":"VALIDATION_ERROR","message":"Invalid body parameters"}
Has anyone experienced this before? I am just using this code for signing in: await authClient.signIn.social({ provider: "discord" });...

Aggregates - TS2589: Type instantiation is excessively deep and possibly infinite.

I am getting the error when defining bounds for aggregates. ``` export const incomingAggregate = new TableAggregate<{ Namespace: Id<"users"> | Id<"organization">; // album name...
No description

Best way to connect different projects?

Hey guys. I setup a project just to house a Vector DB. I want to use the DB in a few projects, so that's why it's a standalone project....

vector is so slow.

I'm just doing some testing.. I might have 10 total vectors in the DB and searching a query takes 122s. That's can't be normal....

Types not generating

I'm using next.js and convex, npx convex dev running, but npm run build is failing to build as the types aren't be generated. And the same thing is happening within my ide. Interestingly, in my ide, if I go to the convex file where the action/mutation is located, the ide resolves the errors for that usage, but the other usages still fail....

Local backend did not start on port 3210 within 10 seconds

I checked nothing is running on that port tried restarting tried with updaint backend and not tried bumping convex in package.json ...

Infinite loop trying to use preloadQuery and usePreloadedQuery

I am essentially trying to copy this pattern from the better-auth examples https://github.com/get-convex/better-auth/blob/main/examples/next/app/(auth)/dashboard/server/client.tsx I end up with an infinite loop somehow ```...

Workflow vs Workpool Use Case

I'm building a demo that syncs users' calendars with my database. Each time a user sets up their account, they can sync all their events from Google Calendar. I can achieve this using workflows. First, I would obtain their credentials, then fetch their accounts, and finally retrieve their events. If a user has, for example, 1,000 calendar events, I want to process these in batches of 100 per loop. For each loop, I would call workflow.start to initiate the flow. However, I am confused about a few things: First, how does maximum parallelism apply in this scenario? Second, is a workflow or workpool more suitable here? Third, if a workpool is preferable, how do you implement batching? Lastly, if you are batching in a workpool, how would you apply maximum parallelism?...

create convex app should include stack-auth as template

My default stack is nextjs + stack auth + prisma. I wanna switch to convex. But I can't without bringing stack auth with me. Can I create a new nextjs - stack auth template for convex so it becomes available in the create convex cli wizard?...

Monorepo setup/management via Convex CLI

Would be awesome if the process of creating and managing monorepos could be streamlined via the CLI.

Index must be duplicated to handle search index empty query

Search indexes seem to not return any results if the user hasn't entered a search query yet (e.g. let someSearchField === ""). This is problematic because we now need to create an entirely separate index to return all records instead of handling that by default when no filtering criteria is provided. This also would align with other search engines like elastic. Schema: foo: defineTable({ name: v.string() }).searchIndex("name", { searchField: "name" }) ...

When running locally, anonymous the auth.config.ts is ignored by Convex?

I'm running an app locally in anonymous mode and my authentication defined in convex/auth.config.ts is not provisioned. This works fine when running on local or cloud versions. The message I get on the console is: *Failed to authenticate: "No auth provider found matching the given token (no providers configured). Check convex/auth.config.ts.", check your server auth config * ...

bandwith usage trespassed heavily

Hello! I have been using Convex to create a web application that stores a bunch of API data that is referenced in other projects. Before i continue i want to emphasize that i am no experienced coder or DB handler, i have more or less let Claude Code do the lifting in this specific use case. Now, in building my appication i have gotten the DB functionality to work as intended, and so came the time to import the entire API database to convex. The DB itself is just a bunch of data exported from chm files and the total size is only 32mb. The problem is that the script that i unfortunatley did not think through had a couple of features that caused a massive bandwith explosion. This is more or less the cascading failure that caused this - ...

Activation DeniedWe are not able to activate your device.

When I run convex dev or npm convex dev -local I keep getting Activation Denied for no reason. Have search docs and cant find anything about it. Any tips on why this is happening? We're on github behind SSO, I've logged into Github and authorized convex. I've tried incognito. Nothing is really working. ...

Unexpected query invalidation behavior — mutation waits for refetches across unrelated queries

Hi Convex team, I built a minimal reproduction and wanted to report the unexpected behavior I observed when calling a mutation that inserts a new message. Short summary...
No description

How do I check a role in a server component?”

I have role based access in my app and what’s the fastest way to check roles with the least delay on Next.js server components? Should I use an HTTP client or prefetch a query? My overall goal is the fastest load time....

Implementing distributed tracing with Sentry

Hi, we are currently using Sentry to track errors across our services, and it’s working well. We’re pleased to see that there’s a built-in integration for Convex too. To enhance our error observability, we’d like to implement Distributed Tracing across our services to track execution flows between them. Is it possible to implement distributed tracing with Convex? This would involve passing a trace_id and initializing a new transaction with that ID. Since the Convex ↔ Sentry integration doesn’t expose the Sentry SDK, I’m not sure how to proceed. I’d love to learn if this is feasible and how we could implement it....