David Alonso
David Alonso7mo ago

Convex queries running on Clerk sign up page causing uncaught errors

I have this ConvexClientProvider:
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export default function ConvexClientProvider({
children,
}: {
children: ReactNode;
}) {
return (
<ClerkProvider
publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
{children}
</ConvexProviderWithClerk>
</ClerkProvider>
);
}
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export default function ConvexClientProvider({
children,
}: {
children: ReactNode;
}) {
return (
<ClerkProvider
publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
{children}
</ConvexProviderWithClerk>
</ClerkProvider>
);
}
and this sign up page:
import { SignUp } from "@clerk/nextjs";

export default function Page() {
return <SignUp />;
}
import { SignUp } from "@clerk/nextjs";

export default function Page() {
return <SignUp />;
}
When I go to the sign-up page, after deleting all users from clerk and with no special Clerk middleware, I get a brief flash of the correct Clerk sign up component and then the app crashes because of this error:
[CONVEX Q(queries/firestoreProjects:getFirestoreProjects)] Uncaught ConvexError: Workspace not found
[CONVEX] at handler (../../convex/queries/firestoreProjects.ts:11:4)
[CONVEX Q(queries/firestoreProjects:getFirestoreProjects)] Uncaught ConvexError: Workspace not found
[CONVEX] at handler (../../convex/queries/firestoreProjects.ts:11:4)
I'm not really sure what's causing this query to run.. Any thoughts?
1 Reply
David Alonso
David AlonsoOP7mo ago
I even wrapped my main layout with <Authenticated> but I still have the same issue ah nvm, it was a modal that sneaked into the main layout, resolved! Keeping this here in case anyone experiences the same issue

Did you find this page helpful?