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

First time setup runs each time I run `dev` from a convex chef project

Is this expected? It's kind of annoying having to go through these prompts each time I call bun dev, haven't modified the dev script at all
No description

Cursor MCP-server ENOENT error on Windows - please HELP

I assume this is a problem with Cursor on Windows and not Convex MCP server as it looks connected. I tried all workaround on web but nothing sorted this issue. Despite I am starting Cursor from the right project directory, it keeps telling me it cannot locate package.json: {"error":"Unable to read your package.json: Error: ENOENT: no such file or directory, open 'C:\Users\petr\AppData\Local\Programs\cursor\package.json'. Make sure you're running this command from the root directory of a Convex app that contains the package.json"} I have W11, Cursor 0.50.7 and following mcp.json:...
No description

Can I fetch then render/navigate?

iOS uses this pattern a lot I click an item, it shows a spinner in the item, then I can navigate once it’s been loaded (see video) If I fetch data one off with convex.query, will useQuery have that data preloaded on the next page upon navigating to it?...

MCPs refuses to connect

this is making me go crazy, the server is clearly connecting on the backend yet this somehow fails, and no detailed error? what does not connected mean 😭 i even have eventsouce, eventsource extended installed also tried streamable http i also have "use node" on the top n everything, please liberate me. I couldn't sleep the entire night....
No description

Help with RevenueCat webhook

Hello, I was trying to setup Convex with RevenueCat webhook. Mostly the logic works fine but it breaks after I fetched subscriber information from RevenueCat and tried to parse json from response. It seems like RevenueCat includes field with key $attConsentStatus and Convex doesnt like it because we are getting validator error: ``` Uncaught Error: Field name $attConsentStatus starts with a '$', which is reserved. at validateObjectField (../../node_modules/convex/src/values/value.ts:162:2) at convexToJsonInternal (../../node_modules/convex/src/values/value.ts:349:6)...

Using an existing convex backend/full stack app with expo app

Hello people, I've recently started using convex for my pet project and I am stuck on something trivial I'm making a food delivery app. I'm using convex auth for authentication. I used this authentication successfully on react based admin panel which is working as expected everytime. I'm now using this on expo but I'm running into some issues I've attached a few screenshots of the code and package.json. I'm using exactly the same thing on the admin panel side)...
No description

Optimistic Update conflict

I'm working on a 'favorites' feature for products, where you can like or unlike an item. When you like something, it shows up as liked right away on your screen because I save it locally. If you unlike it, it disappears from your local favorites immediately. The tricky part is when you quickly like and then unlike an item. Your screen shows it as unliked, which is correct. But, the 'like' action is still being processed by the server. If the server confirms the 'like' after you've already unliked it, the item flashes as 'liked' for a moment before going back to 'unliked'. It's a bit of a visual glitch. Is there a good way to stop this from happening and make sure the screen always shows what you actually last did, even if the server is a bit slow to catch up?...

Getting "No auth provider found matching the given token" with Convex Password Auth

I'm running basic Svelte Kit + Convex Dev locally, I have configured environment variables in my convex dev deployment and I'm even getting what seems to be a valid JWT token out of signIn action Since I'm not using Next and Svelte doesn't have a more automatic token store/retrieve/refresh mechanism yet, I set up the fetchTokens function as instructed in the site (and even though it isn't as automatic, it still seems pretty straightforward to configure, props for gud API design); However, with all that when the API calls it's Authenticate passing the token I got from login, I get a "No auth provider found matching the given token" error and then the websocket literally dies and stops retrying and the refresh token api call never resolves or rejects Anyone have any light to shed?...
No description

Deploying Convex in a Turborepo

I've been following along the guide to deploy Convex to Vercel. Owing to the fact that my repository is a turborepo, I'm finding the deployment instructions a bit confusing. I used Better T-Stack to create my repository. This means that the Convex directory is structured as such: ``` todo/ ├── apps...

Auth0 custom claims

I am using auth0 with convex, is there a way to get custom data when calling getUserIdentity, specifically something like roles, thanks in advance.

Convex auth + Electron

Have anyone tried to implement Convex auth in electron?

Restoring Backup Stuck Importing

I've been trying to restore a backup for about 2 days. It's stuck on: Restoring from a backup: Importing "authSessions" Not really sure what to do to get past this?...

How can I import only specific tables and their associated storage files from a Convex backup ZIP?

Hi Convex team! I have a backup ZIP from my dev deployment and I’d like to import only specific tables and their associated files (from storage) into my prod deployment. I see that importing individual tables via npx convex import --table ... doesn’t handle storage files, and the docs mention that manual changes to the ZIP for partial imports are possible but undocumented. Could you advise on the best way to import just certain tables and their related storage files, or help me with the process? Thanks!...

Convex storage GZIP compression

Hey guys! So, right now I'm storing a whole bunch of JSON files in my Convex storage that are all 300Kb-1Mb. They are highly repetitive, and compression would decrease the size drastically. Any suggestions on how to do this? Should I just GZIP them before uploading in my Convex function, and then un-GZIP before returning them to the client?...

Polar Component

Hi Guys, I am using Polar component to handle the subscriptions, and I want to trigger onSubscriptionUpdated, when I tried it, it's not working this is my code : polar.registerRoutes(http, { path: "/polar/events",...

Deploy to Vercel Failure

I'm trying to deploy my Convex Chef app to Vercel but the deployment build keeps failing with the log Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1. I've followed the guide on the docs but still face this issue

Query returns empty in production Next.js

I have a Next.js app integrated with Clerk and deployed on vercel and a query used on server and client side. `export const getLines = query({ args: { document_id: v.id("documents"),...

[convex-auth] How to get GitHub access token and set additional scopes? (repo & contents)

I would like to create subcells for GitHub using their Octokit library and reuse the access token that Convex auth received during the user's sign-in at my app. Also, I would like to specify which scopes should be requested for the GitHub provider ("rep" & "contents"). Is there a simple way to achieve this without reimplementing the createOrUpdateUser functionality from scratch as a callback?...

Deploying convex and astro on github pages with github action

I am looking at the Custom Domains & Hosting and it explains how to manually deploy to github pages. I am currently deploying to gh pages using a github action, I am using the withastro/action@v3 action to do the deployment. So I am unsure on how to do the step that says to run npx convex deploy --cmd 'npm run build' I am never runing npm run in the gh action. how am I supposed to do this? ...