Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the fullstack TypeScript platform for developers and startup founders.

Join

support-community

show-and-tell

general

self-hosted

announcements

Why is my command line running convex stops

so why is my development stopes and when i try to run it again with npx convex dev it returns Unexpected error when authorizing - are you connected to the internet? ✖ TypeError: fetch failed ...

convex-auth: convexAuthNextjsToken next.js@v15 vercel production build error

(breaking-change) in next.js v15 u have to await the headers and cookies. i have this function to get the current loged in user: export async function getCurrentUser_nextjs_use() { const token = await convexAuthNextjsToken(); if(!token) return null; const user = await fetchQuery(api.auth.currentUser, {}, {token});...
No description

Google oauth broken - tried to set up custom domain

Steps I took from https://labs.convex.dev/auth/advanced and https://docs.convex.dev/production/hosting/custom: Set up custom domain for actions in settings. Set up CUSTOM_AUTH_SITE_URL in preoduction settings env variables Changed the Authorized redirect URIs in google developer console...
No description

Tansatack start with convex error

i followed the guide , when i run , npm run dev , i get : npm run dev
prodige@1.0.0 dev npx convex dev --once; npm-run-all --parallel dev:convex dev:start...

Permissions error on prod deployment even though I'm Project Admin

A couple of minutes ago I was made Project Admin for a project. I want to deploy to the prod deployment of that project and add an env var through the dashboard. In both cases I get the following error message: 403 Forbidden: ReadOnlyAdminKey: You do not have permission to perform this operation. I've logged out and back in on the dashboard without effect. Logging out and back in on the CLI did solve the problem there but it persists on the dashboard. Is it expected that permission updates take a whhile and require logging out / back in on the CLI?...

Can i retrieve storageId from image url

i want to get the storageid from image url

Many bytes read in a single function ERROR on ctx.db.get() where no element exceeds 5000 bytes

Hey so ive got a strange warning on a simple function thats just getting elements with a ctx.db.get query. Im wondering if this has to do with the query being called a lot from a parent mutation, but then I would expect the warning to only be there for the parent mutation (which by the way also shows a warning). The warnings are associated to the same request and the size of the element keeps going up, which again would make sense if the parent mutation is just piling on reads through this simple ctx.db.get...but my question is, why does the query get the warning too?...

`migrations:runAll` not showing expected output

I would have expected the following to show me the regular output of individual dry runs but for all migrations ``` npx convex run migrations:runAll '{dryRun: true}' [CONVEX ?(migrations:runAll)] [WARN] 'Running this from the dashboard? Here's some args to use:'...

Convex Dashboard erroneously prevents Save in Edit Document UX

Observed Behavior: Edit document panel shows disabled Save button with a validation message: Please fix the errors above to continue". Steps to reproduce:...
No description

Help understanding 'Validator error: Expected ID for table...'

If you query a document with by an ID, if the ID exists on the table, you get the document back. If it doesn't, you get null. However when testing, when I want to test that my function returns null (or throws a specific error) if the ID in the args is invalid, I instead get the error 'Validator error: Expected ID for table...' What is the purpose of this error? And why does it behave differently? Shouldn't passing 'not_a_valid_foo_id' for an arg fooId with type v.id('foos')and then calling ctx.db.get(fooId) just return null and I can handle that as I like? Why does it throw an error?...

getAuthUserId behaves oddly

In many of my functions, I use const userId = await getAuthUserId(ctx); to get the current user ID and check that it matches user IDs within requests. Works great! To my surprise though, while testing, it stopped working. So I added const userIdentity = await ctx.auth.getUserIdentity() and found that the value returned by getAuthUserId(ctx) was actually equal to subject rather than _id. How come? Is getAuthUserId first trying to get the ID and if it doesn't exist it returns the session? It can't always be using subject otherwise none of my functions would be working....

cross-device link not permitted

I for the life of me cant get past this error. ```ts https://docs.convex.dev/cli/local-deployments local deployment (BETA) ⠋ Reinitializing project 37186... ...

Local-first sync with Convex

Hello, I've read a bit about syncing mechanisms, but it seems there is no way to easily do this with Convex at this point in time?

Production deployment down.

My fairly large production environment went down an hour or so ago. Dashboard is unresponsive and apis do not work. When attempting to redeploy through CLI, I receive a 503 ServiceUnavailable: Service temporarily unavailable....

TS2589: Type instantiation is excessively deep and possibly infinite.

Getting this when calling internal and api like here ```ts await ctx.runMutation(internal.services.parkingSpot.createMany, { data: spots.map((parkingSpot) => ({...
No description

How to best model an eventually complete record in the schema?

We have a table in which some fields are not ready at creation, but are eventually filled out by scheduled functions. What would be the best way to model the schema for this in Convex and get type safety? Here's a complex approach that we're trying (that would obviously not scale well for more fields): ```typescript const commonFields = v.object({...

Transferring project not allowed

I have multiple teams but I'm not able to click on this drop down, is a Pro account required?
No description

Document in args VS db.get

Hi all! The topic is about passing documents as args between queries/mutations vs passing only the ids and fetching them from the db every time. I asked the AI in the docs and it recommended to pass the id, but I wanted to verify this with a human....

Tanstack: How to call a Convex mutation from createServerFn?

I'm lost on how I can use Convex from the serverFn in Tanstack. Here is my attempt ```typescript const convex = new ConvexHttpClient(import.meta.env.VITE_CONVEX_URL); // Define the input schema using Zod...

Another call to this mutation changed the document

I encountered this error and find it very confusing. I have some parallel actions going that should be updating totally separate batches of data, but still getting this error randomly. I made a minimal reproduction that should have no change of mutual edits, but still consistently fails with the error above... Can someone please tell me if I'm missing some fundamental concept of the db operations here? ...