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

open-source

announcements

BUG: Convex Auth Instagram Login - pkce cookie is missing

I'm getting this msg after trying to authorize the callback webhook on https://developers.facebook.com/ I have set the instagram app and env (on convex) as said in the convex auth (and auth.js) docs. here is the error:...
No description

Help Needed: EAS Build Failing for iOS in Monorepo Setup (Module Resolution Issue)

Hi everyone, I’m running into an issue with my Expo project during an iOS build using EAS, and I’m hoping someone can help me figure out what’s going wrong. The Issue:...

What is the best approach for handling members?

In my application ill have teams and each team will have multiple projects, chats, etc... ANd I want to handle members. For the teams I have a team table and a teamMembers table (where I track members and roles). What about the projects and chats inside the team (ill have public ones -> Everyone is member, and then private ones -> the admin assigns who is a member there), so I don't know if I should store this chat/project members as an array of ids inside the project/chat table or also have sep...

Vector search with images using Convex

Hi, everyone. I'm considering using Convex for a react app where the input is an image(of a product) provided by the user, and the output should be the info of the product in the image. This would be a basic customer support app where the user take a picture of the product he has problems with and the app recognizes the product using the image and provides info(FAQs or related). The idea would be to vectorize all the product images, save them in a vector DB, and use it for a vector search. I have found examples using Supabase as the DB. How suitable would be Convex for this project? Do you have any sample project/repository I could use as a reference? Thx for your help....

Schema with array of objects

Is it efficient to have an array of objects? Let's say that I have a task with the field sub tasks, and I want those to be objects with x,y,z fields and each task can handle multiple sub taks.

Best Practices? SvelteKit5, Kinde, Server To Server Auth, Python as backend resource

Hi all, I am hoping you can give me a few pointers! First, I am using sveltekit5 and the Convex sveltekit libraries - I believe I have that working ok - has anyone else used this for a production project considering Sveltkit5 is in early release? Does Convex work on SvelteKit4? Second, I am using Kinde for authentication. I have that working perfectly for my sveltekit project, but the callbacks are against local api routes within the project. How do I pass this back to Convex so Convex recognizes the authentication? I've started doing some goofy things that just feel wrong such as passing the token in the request body to Convex in order to see who the user is. ...

invalid args for renaming a file

when calling a function to rename a file, it says that the arguments are invalid, although I specified everything that is needed ```tsx await renameFile({ fileId: file.fileId,...
No description

Struggling using convex mutations

Hey guys, I just switched from mongoDB to convex. I created some functions on my nextJS app, and connected it to my current front-end: - one dev dashboard to insert mocked data to try my app - one admin dashboard for the clients to insert/read data...

Using Convex Triggers Across Multiple Frameworks: Jetpack Compose, SwiftUI, and Next.js

I'm working on a multi-framework project using Jetpack Compose (Kotlin) and SwiftUI (Swift) for the native apps, and Next.js (React) for the admin dashboard. I want to implement a Convex trigger that logs every insert on the user table to an activity tracker table. Since each framework has its own "convex" folder at the root, do I need to set up the trigger in all three folders, or can I define it once for the entire project? How should I structure the Convex backend for such use cases? Here are convex sample project repos for reference:...

convex auth.getUserIdentity() is inconsistent

In my nextjs app, I have upgraded convex-dev/auth to the latest version 0.0.71. I went through the documentation and correctly setup authentication including properly setting up the middleware. (also I use email provider with resend). Now in my app, after login, I navigate to route /partners. This route accesses the session user (in the backend) by calling contex.auth.getUserIdentity(). This first call works fine as it returns the logged in user object. But when I navigate to the subroute /partners/[id] and makes the same call, this time it returns an empty. If I go back to the previous screen and refresh the page, I'm able to get the user object just fine....

Problem with internalAction

I'm calling this like this: const updatedRows: string[][] = await ctx.scheduler.runAfter( 0, internal.files.handleBatchEnhance, {...

Nextjs server actions does not work with revalidatePath

Hi there! I'm struggling with basic data refreshing on a simple next14 app directory page.tsx. Basically this is all code taken from https://docs.convex.dev/client/react/nextjs/server-rendering#server-actions-and-route-handlers. /src/app/testpage ```...

Issue with convex auth

when using convex auth and I try signing up with password when the account exists already but the email and password I use in signing up matches the one existing it just signs them in and I don't think that is the right behaviour

Cancel Running Action

Hi folks, is there a way to cancel a long running action? It is not scheduled and I can't see anything in the dashboard UI to cancel it.

Convex’s use of server vs client caching

I’ve been searching for any blog post or docs that break this topic down more. I know convex will cache server function queries so all clients that call the same function query will get the cached response. But what about repetitive calls from the client? I’ve seen a little reference that convex does client caching in 1 post but zero other info about it that I can find so far. I’m trying to decide how to architect the query patterns for some dynamic data heavy pages. Specifically large custom spreadsheets that every column, row, and cell value can be changed (though not frequently) and shared between users, organizations, teams. So striking the right balance of how granular to make the query subscriptions is important. And how this will affect the function call quotas for convex matters even if they are generous....

File serving in a nextjs app via http action authenticated with clerk

After looking at the docs, this is the implementation I came with for serving my files securely via http action. Any feedback appreciated. /convex/http.ts ```typescript import { HonoWithConvex, HttpRouterWithHono } from "convex-helpers/server/hono";...

Re execute query with React when parameter change

Hi everyone, I use useQuery with react to execute my query but one query's parameter depends from a select tag, How can I reexecute my query when the selected value change. I'm pretty sure I saw something to do that on discord or stack.convex, I didn't retrieve it. Thank for your help...

How to query an array in filter or withIndex

I want to query an array of users by either filter or withindex, any assistance will be great. Example of schema - chat: defineTable({ isGroupChat: v.boolean(),...

npx convex dev Doesn´t do anything after setup

Hello there! Just aquickone. When I run the npx convex dev in the terminal it does it's thing for just 1 second and turns red. I don´t even know if it did anything at all.. but My app is not running and I get the other error in when I run the app locally. "Unhandled runtime error" ...
No description

Connection to database never establishes

Hi, I'm having issues connecting to my convex backend. It seems the websocket connection never succeeds. This was working fine yesterday. Can anyone tell what's happening? I've attached screenshots of the console. I'm following the otp auth flow with resend from the docs. I can add additional context if needed. Any assistance is much appreciated. Thanks!...
No description