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

Middleware Issue on our Nextjs project

We are facing an issue on our existing middleware setup on our nextjs project, we use to check if a user is authenticated before using this code:
await convexAuth.isAuthenticated()
await convexAuth.isAuthenticated()
but now after upgrading convex auth from 0.0.74 to 0.0.80 we are getting this error: Middleware.ts file code...

Type Issue with gameId in Convex Query

Hi, I have an issue with TypeScript types in Convex. I'm looking at the example code in the Fast5 repo: ``` import { v } from "convex/values";...

Cannot solve "Convex functions should not directly call other Convex functions"

I searched, asked AI and tried to create helper functions but I can't get rid of this warn, it seems to be happening in my Promise.all() because I get a lot of logs. My helper functions: ```ts // convex/models/routes.ts ...

Sharing Convex Authentication State Between Main App and Share Extension in React Native

I'm building a React Native app with Convex and Clerk for authentication. I'm trying to implement a share extension that needs to access the authenticated Convex state from the main app. Current Setup - Main App:...

Error: Unexpected token 'N', "No matchin"... is not valid JSON

```ts http.route({ path: "/resources/", method: "GET", handler: httpAction(async (ctx, request) => {...

Could not load the "sharp" module using the linux-arm64 runtime

Trying to use a library that uses sharp inside a convex action and get this error. Using bun pkg manager. Any thoughts from anyone?

how do i skip indexed query field

it seems like i am forced to follow the order of the defined index in schema. I dont want to use filter because some of the query are hitting too many bytes read error. please help schema.ts ```ts .index("organizationId_postedAt_experiment", [...

PushNotifications component, should I also build out in app notifications?

I have an expo app with push notifications working, for users that decline the notification prompt should I build an in app notifications table or can I still leverage the data tables for notifications in the PushNotifications component?

Type 'Iterable<FromType>' can only be iterated through when using the '--downlevelIteration' flag

Type error: Type 'Iterable<FromType>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. 14 | let index = 0; 15 | list = await list;
16 | for (const item of list) {...

Error retrieving function spec from your Convex deployment......

I've also raised a GitHub Issue where I've explained the issue in more detail, do have a look on the screenshot as well.
No description

Best solution for checks like unique username

Right now I am building an app with Vite React and zod, react-hook-form. I have a form that does not check uniqueness on the username, but if I add a check, what would be the "best practice"? My Convext backend checks if already exists, I'm just wondering where to add the check on the frontend....

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...