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

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....

/api/action returning 404

Hello, I have a convex deployment and I'm trying to send some data to my table using an action from a go program. From the docs it looks straightforwards but I was having some truouble. ...

Local development with none-localhost domain without HTTPS as "CONVEX_SITE_ORIGIN"?

For the locally hosted Convex backend, I use the domain http://site.convex.local instead of http://127.0.0.1:3211 for CONVEX_SITE_ORIGIN during development. Unfortunately, I get this error with npx convex dev: ```sh...

NODE_ENV always production

So I seem to be having the opposite problem to the rest of the people on here, in that my NODE_ENV variable is always set to "production" on my convex development branch, even when I explicitly set NODE_ENV to "development". I can work around it but it seems a bit odd.

Postgresql + Convex Docker Compose File

Hello its failing 2025-08-20T12:50:48.489253Z ERROR common::errors: Caught error (RUST_BACKTRACE=1 RUST_LOG=info,common::errors=debug for full trace): Error occurred while creating a new object: db error: FATAL: database "convex_self_hosted" does not exist: db error: FATAL: database "convex_self_hosted" does not exist: FATAL: database "convex_self_hosted" does not exist Error: Error occurred while creating a new object: db error: FATAL: database "convex_self_hosted" does not exist on backend container. Please help me fix my compose file....

Paginated query type error

Getting the following error from my paginated query ```Argument of type 'FunctionReference<"query", "public", { checklistId: Id<"checklists">; paginationOpts: { id?: number | undefined; endCursor?: string | null | undefined; maximumRowsRead?: number | undefined; maximumBytesRead?: number | undefined; numItems: number; cursor: string | null; }; }, PaginationResult<...> | null, string | un...' is not assignable to parameter of type 'PaginatedQueryReference'. Types of property '_returnType' are incompatible. Type 'PaginationResult<{ _id: Id<"checklistItems">; _creationTime: number; checklistId: Id<"checklists">; text: string; completed: boolean; }> | null' is not assignable to type 'PaginationResult<any>'....

Docker + Turbo + PNPM + Convex

Has anyone been able to get your app (web rr7) running in a docker container? I am getting a lot of module resolution errors at build time. In the dev environment it runs perfectly fine .. I am curious if anyone has an example repo?

Can the convex components switch to better lint tools like biome, that would catch errors better.

I've constantly run into issues every time I attempt to use a convex component. I'd recommend the convex components switch to biome, and strict type checking with verbatimModuleSyntax. I currently have an error that the only way around is to bypass CI checks to get this in(which we hate to do). Or have my team wait until a fix is pushed. These types of type-errors are 100% avoidable with a stricter type check and lint setup. In my case, as seen in the screenshot below, since our project is a monorepo. one breaking step breaks all the others. In this case, my attempt to use the convex rag component. Now my only choice is to bypass checks to get this in. Submit an issue or fork the repo and put up a PR, and have my team wait for this to get in....
No description

No loader is configured for ".node" files

I'm trying to use baml from the boudnaryml guys and they have some requirement of loading some native node modules that I'm not really sure how, or even if, convex can run. An example of the error: ``` ✘ [ERROR] No loader is configured for ".node" files: ../../node_modules/@boundaryml/baml-linux-x64-gnu/baml.linux-x64-gnu.node...

thread.`generateText/streamText` returns a validator error

Heya guys, I'm new! I am building a small chat app with Convex Agents and I've encountered an error that I don't seem to be able to solve: ```ts const response = await thread.generateText( {...
No description

Cannot use httpAction to send langgraph streaming events

I want to use httpAction to build an api for streaming events that produced by langgraph.js, below is what I do and errors I had encountered: 1. First, I made a very simple demo, only produce stream events by using langchain's openai model provider, is works fine 2. Next, I wrote a relative complex langgraph agent (I'm sure it works), this time convex throw an error to inform using "use node" 3. Since httpAction does not allow "use node", I extract all agent codes into a internal action...

transfer problem

hello i transfered my project to my friend but it didnt show up so i made him transfer it again to my acc but when i join the project its empty and i can't even access the project chat

Recommended way to handle mutation responses

Hey everyone, I've been exploring Convex lately and after reading the docs on mutations I couldn't find an answer for this. What is the recommended way to handle success/error responses from my mutations? Should I just include a try/catch in the handler function like this? ``` // mutations/myMutation.ts import { mutation } from "./_generated/server";...

BetterAuth User Type Safety

Any idea why the user returned from this function is of type "any"? Shouldn't it be typed according to the better auth user schema? async getAuthUser(ctx: RunQueryCtx & { auth: ConvexAuth }) { const identity = await ctx.auth.getUserIdentity();...

Convex Component for each app?

We have NextJS setup where we setup each Nextjs App to create a Convex Component in its own folder with dedicated schema, mutations and query files.
This allows us to keep each feature in its own separate area with custom tables. My question is do we need to create mutations and query’s? Or can we just use Convex components to generate custom Convex Components as a way of organizing the DB and schema?...

Lint return validators

Hi there - we have noticed a lot of errors in production where a handler's return value does not exactly match the return validators. This is super frustrating and we would ideally like to catch with a linter as opposed to at runtime. Should the existing linter be doing this? Does anyone have suggestions for how we can enforce this? We use typescript...

I wanted to use the mjml package to convert mjml to html inside an action (use node)

400 Bad Request: InvalidModules: Hit an error while pushing: Loading the pushed modules encountered the following error: Uncaught Failed to analyze _deps/node/XFDVFWVQ.js: Cannot find module '../lib/utils.js' Require stack:...

Batch operations and cache invalidation

Sometimes the thing that makes Convex amazing is also challenging. 😂 I have a React Native component that is built using a convex query to retrieve a set of data (for example, information on multiple people). The query returns a list of objects. In the UI, one person is displayed at a time and the user can decide what to do with them - delete, keep, etc. Very "tinder-vibes"....
Next