rovrav
rovrav2mo ago

Convex is only working in development and not production - how to fix?

I tried switching my convex deployment from development into production but it seems to be failing. I'm deploying to vercel and I followed the guide but I'm simply unable to push any data when I'm in production mode. When I revert back to the previous url then I'm able to get everything working. What might be causing this? I notice the color of the production is pink while development is green so I'm not sure if that is indicating anything.
Also I did add the deploy key to vercel and redeployed multiple times but in the URL & deploy key settings it showed that the deploy key has never been used.
How can I fix this issue? Let me know if you need any other questions answered.
6 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
rovrav
rovravOP2mo ago
I'm also getting errors like this for reference which don't make any sense
Access to XMLHttpRequest at 'https://api.digital-garden.nudgepixels.com/api/auth/user/v1/is-authenticated' from origin 'https://www.memorylink.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to XMLHttpRequest at 'https://api.digital-garden.nudgepixels.com/api/auth/user/v1/is-authenticated' from origin 'https://www.memorylink.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Or this
/home:1 Access to XMLHttpRequest at 'https://api.digital-garden.nudgepixels.com/api/auth/user/v1/is-authenticated' from origin 'https://www.memorylink.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

background.js:404 error in the uploadHistoryItemMutation Error: [Request ID: 43667bca1b691210] Server Error
at Ig.mutationInner (background.js:382:47975)
at async Ig.processMutationQueue (background.js:382:48268)

auth-loading-skeleton-pT8VgB8p.js:445 Uncaught (in promise) Error: [CONVEX M(chromeExtension/mutations/createUrlPrimitives:createUrlPrimitivesMutation)] [Request ID: 395912a7cd8be2f4] Server Error
Called by client
at i9.mutation (auth-loading-skeleton-pT8VgB8p.js:445:39229)
/home:1 Access to XMLHttpRequest at 'https://api.digital-garden.nudgepixels.com/api/auth/user/v1/is-authenticated' from origin 'https://www.memorylink.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

background.js:404 error in the uploadHistoryItemMutation Error: [Request ID: 43667bca1b691210] Server Error
at Ig.mutationInner (background.js:382:47975)
at async Ig.processMutationQueue (background.js:382:48268)

auth-loading-skeleton-pT8VgB8p.js:445 Uncaught (in promise) Error: [CONVEX M(chromeExtension/mutations/createUrlPrimitives:createUrlPrimitivesMutation)] [Request ID: 395912a7cd8be2f4] Server Error
Called by client
at i9.mutation (auth-loading-skeleton-pT8VgB8p.js:445:39229)
erquhart
erquhart2mo ago
I tried switching my convex deployment from development into production
Can you explain exactly what steps you took here?
I'm deploying to vercel and I followed the guide but I'm simply unable to push any data when I'm in production mode.
The title says only production works, but here you say production doesn't work? Any details you can provide on the steps you took to get from working to not working would help
rovrav
rovravOP2mo ago
The title is incorrect. I’m deployed to vercel, I modified the build script and when I tried moving over into production I’m not able to get any write operation to work. Even though I added the deploy key it showed that it was never used. So I tried deploying locally via the CLI with pnpm dlx convex deploy but even after successfully doing that it was shown that the deploy key was still not used. So I’m unsure how to proceed forward when everything was originally working in development. Basically all I did was create a production deployment, got the new convex URLs, put them into the .env variables and then when I try doing anything with the db, any operations I'm only getting failures. I have no clue what is causing this.
erquhart
erquhart2mo ago
Does this url look familiar to you from the errors https://api.digital-garden.nudgepixels.com/api/auth/user/v1/is-authenticated
rovrav
rovravOP2mo ago
That URL did not make sense but I ended up fixing the issue I didn't have the webhook signing secret so when I logged in, there was not entry in the profile table so I couldn't mutate or read any data Thanks for the help though

Did you find this page helpful?