Convex Community

CC

Convex Community

Join the community to ask questions about Convex Community and get answers from other members.

Join

support-community

show-and-tell

general

self-hosted

announcements

Issue with Google Login in Production

Hi everyone, I’m experiencing an issue with Google login in my production environment. Tech Stack: - Next.js: 15.1 - Convex: 1.17.4...

Can I use "skip" with zQuery?

I'm trying to get a files metadata if a file id exists and "skip" would be perfect for that use case. When inspecting useQuery I can pass skip, but when I try it throws an error because of my zod schema in the query definition. Is there a workaround for this? ``` const fileWithData = useQuery( api.files.getFile, stagedImageId...

Is the bound key required when reading an aggregate count with namespace?

First, I have defined an aggregation like so:
app.use(aggregate, { name: "partners_payments" });
app.use(aggregate, { name: "partners_payments" });
...

Action context inside auth callback

I'm trying to run an action inside of the afterUserCreatedOrUpdated callback, but I'm getting the following error:
Uncaught TypeError: ctx.runAction is not a function
A lot of the documentation talks about runAction, but I could only find examples of using it with useAction on the client. I really want to add details to the users table with 3rd party information after create. ...

how do i use convex auth without react.

do i just make a hyperlink in my html to blabla.convex.site/api/auth/signin/google?code=igeneratethegibberishmyselfontheclient

Deploy a Backend app with Bun-Convex on Vercel

I'm using Bun and convex, my app its a backend app, basically a CRUD I have some internalActions and I expose through http actions but I see I need to execute npx convex deploy every time that I want to deploy to prod, so I was thinking use Vercel but this project does not have an output dir and probably Vercel works for make a CI/CD convex deployment in production env

filtering documents with getPage

I'm looking at the getPage function so I can control the pagination more. But I can't seem to figure out how the filtering works. For example, I have a messages table that stores messages all the messages from many companies. However, I'm not sure how I would only include those results in the getPage return since I don't see a param that allows me to filter my index 🤔 eg this is my function right now and I only want the results with only a particular channelId and destinationId. How would I achieve this? Thank you for any advice in advance!...

Disable table

Hi! Is there any way to temporarily disble API calls? I somehow got a runaway function and its constantly uploading files to my _storage

Transient Error in Cron

We're seeing an error when our cron job runs: The error message is: 'Transient error while executing action' Action: actions/ai:checkAndRunScheduledReports...

Validation of (partial) Convex-schemas

I have a use-case where it would be super helpful to be able to call something like: ``` const schema = v.object({ "name": v.string() });...

Querying api for status

Hey! Anyone know how to run an asynchronous job or something like that can run in the background while I return a value to the user first? I've got this thing where I've got a prompt, generated using an LLM, I am currently calling this API within a convex action and now I need to pass this prompt to a text-to-image model. Problem now is that inference can take quite a while and I don't want users to wait forever on the main page....

ActionRetrier docs

Is the ActionRetrier still being actively maintained? I'm trying to look for documentation but can't seem to find a unything up to date

Querying array fields in Convex

I have a question about querying array fields in Convex. In my schema, articles have a 'tagIds' array field: ``` articles: defineTable({...

Issues running Convex Python client behind Docker

I'm running into an interesting issue while trying to utilize the Python sdk on a simple Flask application running on Gunicorn behind Docker. First off, the application works perfectly fine when not behind Docker. Usage of the sdk is fine. However the moment I set the application up behind Docker, any requests using the sdk suddenly timeout and I just get a stacktrace pointing to the sdk function called.
Looking through the docs for the sdk I noticed that there are technically 2 client objects, a websocket based one and an http one, my guess is I'm not exposing whatever port the websocket is trying to communicate through as the http client appears to work fine. ...

Return more detailed errors to the client (Convex Auth)

I am using Convex Auth to authenticate the user. I'd like to return more detailed errors to the client (as they appear in the logs), maybe via a throw new ConvexError, is it possible? I see in the Convex Dashboard, in the logs tab, that when a user enters the wrong password it is logged Invalid password. I'd like to know this and return a specific error in the client rather than a specific one. But right now I don't know if it is possible to do this. Thanks!...

Dynamic require of "stream" is not supported

Getting this error when deploying on Vercel

E-Mail verification without a verification Link

Hey all. Just started up the Free Plan and I wanted to add an additional e-mail account and make it my primary, but the e-mail verification that I get seems to be missing a verification link. What am I missing? And is this the correct channel to ask this?...

Large record update strategy

I have about 10k rows of data that changes daily for my company’s core product. I’m looking to import that as part of a nightly cron job for an internal tool I’m building in Convex to demonstrate its potential. I expect 70% of the data to remain the same. 10% to be removed and 20% to be added. I have an internal action to fetch the data nightly, but I’m unclear what next steps should be given that there’s no multi row functions in the Convex API. Do I really have to delete every row or do a lookup based on my internal ID and then perform the mutation for every record? Seems a bit inefficient....

What is the recommended way to do encryption?

I’m trying to encrypt API keys into a document but I’m running into some issues. I wanted to use node:crypto but I need the node environment for that but that environment doesn’t allow mutations. So I tried using the web crypto module but that is not fully implemented so I can’t get that working either. My other options are third-party libraries but crypto-js is deprecated and the alternatives seem unreliable I need to decrypt the value again later, so I can’t encrypt on the client either....

Convex Node runtime vs Node

Hi! I have a code that works outside of Convex runtime. It is short and simple so I put here for reference. When this runs on Convex, I get "Connection lost while action was in flight" and the logs show "Your request couldn't be completed. Try again later." The latter seems like a response from one of the external services I'm using. However, running the same code, with the same API keys, outside of Convex works perfectly fine. Has anyone came by something like this before? ```ts "use node"; ...