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

Trouble Creating Preview Deployment

I’m having trouble deploying a Preview Deployment. I am not using Vercel or Netflify. 
Just Convex Cloud for the backend, and the React/Vite frontend is hosted on Cloudflare Pages. I did the following: 1. Created a Preview Deploy key under Project Settings in the dashboard....

Adding a secondary email to Convex account

I'm trying to add a secondary email to my Convex account, as I stupidly signed up and built an app with an email address I may not always have access to. when adding the secondary email, Convex sends a verification email to the secondary account. however when I click the link to verify with this email address, it always gives me the same error. "The provided email verification code is invalid, or the email has already been verified. Follow the link sent to your email to verify an email address."...

Advanced Sorting, Filtering and Pagination Help

I'm implementing the search functionality for a table in my database, and because of Convex DB's lack of advanced filtering/sorting, I'm sort of forced to .collect() the entire indexed table into memory and do the filtering/sorting via JS. Because of this also, I must do pagination in memory as I can't get the next set of results without doing all the filtering/sorting. Does anyone have any advice for this specific use case?...

Can't access WorkOS dashboard

When I tried the convex quickstart a while back I think I didn't claim my account in WorkOS Now I'm trying to login but it says the invitation has expired, request a new one However I can't request a new inv because I am the admin......

Stuck in permanent unauthenticated state after access token expiry (AuthKit, Next.js)

I'm using WorkOS AuthKit together with Convex in a Next.js App Router project, and I'm consistently hitting an auth edge case: * After the WorkOS access token expires, the next Convex queries that call auth.getIdentity() throw. * AuthKit refreshes the token (verified in useAccessToken()). * The Convex backend starts accepting the new token — new successful queries appear in the Convex dashboard....

Failed to import Prod to Dev due to crons component validation

I’m trying to export my prod Convex DB and import it into dev, but I’m consistently blocked by schema validation on the crons component table. What I’m doing Export from prod:...

Does await block next query?

Is the sequential await blocking? Or does convex special magic sauce call them at the same time? As I'm typing out this question, I'm realizing it must block it in case the second query needs data from the first. But I guess I'll ask in case anyone else questions this. ``` const users1 = await promise.all( userIds.map((userId) => ctx.db.get(userId))...

Convex Account SAML SSO

Hi there! I recently got the green light to use Convex for an app we intend on bringing to market later this year and I was wondering if you guys had plans to integrate some sort of SAML SSO integration for team members within a Convex team? I think one of the things we would like to see in the future especially if we end up growing and require more heads in our team internally is to be able to assign a new account and have them access it via Okta....

using functions from betterAuth component

Hi, I'm trying to get user on server.I cannot follow normal path with getUserIdentity as I use it in cronjob. How do i use function from different component or how do i query table in different component? I've tried importing it's generated api but it's not working: `` smsyjyazn3s7vmadb:' [Error: Could not find public function for 'adapter:findOne'. Did you forget to run npx convex dev or npx convex deploy`?]...

Convex Components for Mini-Game Isolation (Recommended Usage?)

Hello! 👋 I'm building multiple mini-games within a single Convex app (thinking 20+ games). Each game will have its own significant internal reactive state and logic. My concern is that managing all this game-specific internal data within the main Convex app's schema and functions will become a "nightmare" of complexity and potential naming collisions. I'm considering using Convex Components to completely isolate each mini-game:...

Calling Convex queries and mutations from Next JS API routes validated by WorkOS API keys

I'm building a web application that is primarily an api accessed application. Most of the front end is just configuring what will be eventually called via the API. Since WorkOS has API keys generated at the organization level, I don't believe there is a way to use ctx.auth.getUserIdentity() since there is no user tied to the request. That being said, how do I authenticate the organization in the Convex queries? If I just have the NextJS Api routes pass up the org ID obtained from verifying the API key to the Convex queries, doesn't that pose a security risk? Wouldn't that allow anyone to arbitrarily pass up the org id, or is the query only callable by my server? TL;DR How do I authenticate convex queries at an organization level if the authentication needs to happen on API routes with WorkOS API keys?...

Large codebase: internal type only shows one module

Apologies for the AI summary of the issue, but I've been banging my head on this all day. Could really use some help! Problem: TypeScript says internal.todoist doesn't exist, but it's in the generated api.d.ts. Environment: ~200 Convex functions, TypeScript strict mode, Bun runtime...

Issue with login

Hi, when I try to log on to convex, and use the email login, it still takes me to github or google login options and there is no other way for me to login by the looks of it. I tried google, and it creates a new account.

How to handle Websocket Errors

hello, when I use : ``` import { useConvexConnectionState } from "convex/react"; const connectionState = useConvexConnectionState();...

(Convex Auth) Uncaught Error: InvalidKey

Hi, I’m using Convex Auth with a custom Password provider and a React hook to handle sign-in. My backend code looks like this: ```ts...
No description

Can't Push code to dev server or connect via cli

Every time i try to push/connect to dev server via cli, it just hangs. Issue started 2 hrs ago, before that i had no problems. I even just upgraded to Pro and it has same issue
No description

(Convex website itself) Error 11 Chrome/Mac opening https://dashboard.convex.dev/t/teamname

I get an Error 11 in Chrome (142.0.7444.162 official build arm64) on my Mac (15.6.1 (24G90))(142.0.7444.162 official build arm64) every time I try to open my team's page (https://dashboard.convex.dev/t/teamname). It shows up for half a second and switches to Error 11. ✅ what works:...

Unique indexes when using Convex Ents

Hi people, Given this example schema: ```typescript const schema = defineEntSchema({...
Next