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

getting error after deployment on vercel

well my little project had some error i fixed them and it did work locally but when im pushing to vercel i get this error
No description

I don't recommend concatenating it into a string

I tried to output it to the console and it started eating up all the memory and the browser froze and was forced to kill the processor. Or you will hit the function call limit I have not tested pure js since this error is possibly related to Nuxt (from the fact that it transfers the console from the server to the client). and tries to condense all proxy objects into a string, which apparently made him feel bad šŸ™‚ ```ts...

how to refresh JWTs before they expire

The default jwt.durationMs is an hour and it seems like convex-auth does not automatically refresh jwt. Am I responsible for refreshing the JWT before it expires? Or did I misconfigure something? I am using Next.js, and I am handling auth stuff with middleware like below. ```ts import { convexAuthNextjsMiddleware,...

Convex auth: auth.getSessionId returns null

I have implemented the new convex auth lib in my nextjs app. Now I'm attempting to retrieve the session id or the logged in user in my server function (query). Following the tutorial here https://labs.convex.dev/auth/authz#use-authentication-state-in-backend-functions, calling auth.getSessionId(ctx) or auth.getUserId(ctx) returns null. The auth object has been properly setup ```typescript import Resend from "@auth/core/providers/resend";...

Best way to retrieve a large amount of data from a table?

I need to retrieve data from a table with more items than the query limits allow. Is there a way to retrieve a specific range of items from a table (e.g items 1000-2000) in order to split a larger query into several smaller ones?

conversation id undefiend error

getting this error when i click on a conversation in chat app and consol log says the conversation id is undefiend any idea how i can fix this ?
No description

Can't resolve node package when i use npm convex dev

X [ERROR] Could not resolve "path" node_modules/rimraf/node_modules/glob/common.js:14:19: 14 ā”‚ var path = require("path") ā•µ ~~...

Sorting records randomly

So I'm prototyping a feed-type page for users to view posts from around the app, that loads content in a random order. It's not dated content, so serving sorted by timestamp doesn't make much sense. It also serves to add a degree of freshness, I think, to show random unviewed posts. I know traditional SQL has a SORT BY random implementation, but was wondering if Convex had something similar out of the box to implement this feature. Else I'm open to advice on how to pull off something like this....

fetchQuery fails inside clerkMiddleware (clerk/nextjs)

I'll add a screenshot once I land, as I just found this issue right before boarding a flight. It seems that fetchQuery fails (with or without token added) when called inside the new clerkMiddleware (replacing their authMiddleware). Anyone have experience with fetchQuery inside nextjs middleware? I've checked the auth().getToken({ template: "convex" }) returning a proper token....

[ConvexAuth]: ERROR Auth token is not a valid JWT, cannot refetch the token

Hey, I'm using ConvexAuth in app, and specifically, using the password-code from the convex auth demo repo, i'm able to successfully sign up and verify with my email code. And also able to login when using the password-code provider and flow signIn...

Convex Ents: how to express optional reference in 1 to many relationship?

From this documentation https://labs.convex.dev/convex-ents/schema, I'm trying to figure out a common use case, how to express zero-or-many? Looking at the documentation's example, how can I express that a user can have zero or many messages? ``` defineEntSchema({...

Convex Ents: when defining m:m relationships, must the junction table have its own defineEnt()

when defining many to many relationships using Convex Ents, must the junction table have its own defineEnt()? - If I don't give the junction table its own defineEnt, then I get an error in npx convex dev like: Argument of type 'myJunctionTable"' is not assignable to parameter of type 'TableNamesInDataModel<EntDataModelFromSchema<SchemaDefinition<{...

[ConvexAuth]: additional fields passed to signIn, added to user document?

Hello, Is there a way to pass additional sign up values passed to signIn from useAuthActions like for example, here when i sign up my user, i let them define a name in my signup component. ```ts...

Conex Auth fatal error

While working, I tried to refresh but hit this error. No changes made.Error doesn't go away after emptyinh cache
No description

Integrating Clerk with Expo and Convex

I am integrating Clerk authentication in an Expo app with a Convex backend. I would like some guidance on setting up a proper architecture, the best implementation methods, and best practices to ensure that the system is strong and long-lasting without issues. Precisely, it is necessary to understand how to set up Clerk with Expo and Convex integration for database syncing and ensure fluent operation and efficient integration. Any person having experience with such a setup, or who would be able to point to detailed resources, example repositories, or step-by-step guides, would be highly welcome. thanks!...

Faster websocket connection? Or skip websocket connection?

I am building a chrome extension that saves the given page to a convex DB. When I press the browser action button it takes a second to load before it saves the page. The issue is the time it takes to connected the websocket for me here in Western Australia. If I use the HTTP client its lightning quick....

How to cascade delete an entity and all references to it in other entities

given a schema like this : ```ts modules: defineTable({ name: v.string(),...

Convex Auth: InvalidSecret

Hi guys, Im using convex auth in a vite app. Has been working like a charm for a week+ or so, but today I got this error(see picture) and can't authenticate. Any ideas? thanks
No description

Hover/select in dashboard project selector is confusing

More feedback for the amazing Convex dashboard šŸ’« I found that hovering over a project inadvertently selected it. This led to me picking the right deployment for the wrong project several times. I finally had to slow down and be really deliberate with my mouse movements to get it right. I get the idea of why it works this way, and I know nested menus and mega menus have worked this way for years - I think the subtletly of the hover-select outcome is what throws it. It's very easy to miss that it happened....
No description

Unable to push deployment config to convex cloud

I am suddenly unable to automatically push my changes to convex cloud. Every time convex attempts to push changes, it throws below error āœ– Error: Unable to push deployment config to https://joyous-xxxxxxxxxx.convex.cloud Error fetching POST https://joyous-xxxxxxxxxx.convex.cloud/api/push_config 500 Internal Server Error: InternalServerError: Your request couldn't be completed. Try again later. Failed due to network error, retrying in 18.88s......