thedevstockgirl
thedevstockgirl11mo ago

Vercel missing accesstoken errro

Hi, I am trying to deploy our convex api to production. I followed the preview and production guide and generated Convex deploy keys and have them showing up in the correct env in vercel. But there is an error that says MissingAccessToken. Can you please help?
No description
No description
No description
No description
14 Replies
Michal Srb
Michal Srb11mo ago
Hey @thedevstockgirl, this all looks correct. Is the first screenshot coming from a Vercel production deployment, not from a Vercel preview deployment for example? Also which version of convex are you on? (from your package.json)
thedevstockgirl
thedevstockgirlOP11mo ago
Yes. From the production deployment.
Michal Srb
Michal Srb11mo ago
Also which version of convex are you on? (from your package.json)
thedevstockgirl
thedevstockgirlOP11mo ago
1.8.0
No description
thedevstockgirl
thedevstockgirlOP11mo ago
I triggered a redeploy from the vercel dashboard after updating my env vars. Not sure if that matters
Michal Srb
Michal Srb11mo ago
If the env vars are saved that should be fine
thedevstockgirl
thedevstockgirlOP11mo ago
Yes. They are synced from doppler And I verified that it is in the dashboard and in the correct env
Michal Srb
Michal Srb11mo ago
Hmm, this is very surprising. Maybe one thing I would try is to change the build command to echo CONVEX_DEPLOY_KEY and see that the deploy key is printed as expected (and reads what you expect)
thedevstockgirl
thedevstockgirlOP11mo ago
Ok. I'll try that and share the result here. One thing. Well two things. I have NEXT_PUBLIC_CONVEX_URL and CONVEX_DEPLOYMENT inheriting from development env. Would this matter? In Doppler I need to have values for all envs. But hoped that it would not matter during the deploy and properly get overwritten. Second, after generating the keys in Convex for both preview and production, once I copied it, and navigated away from the page and back, I don't see any indication on the convex dashboard that I had any keys. Not sure if it is by design, but would be great to have some visual indication of past keys, even if the last few digits. I did copy over the values to preview and production in doppler, but had to second guess myself on if I had to hit save or something as it was just as if nothing had happened. Not sure if that makes sense.
Michal Srb
Michal Srb11mo ago
Oh this could be the issue, can you make sure you do not have CONVEX_DEPLOYMENT set?
thedevstockgirl
thedevstockgirlOP11mo ago
Ok. Let me do that. Ok. That worked. Thank you. But now I have a different 500 internal error. Will troubleshoot that as it likely does not have to do with convex. One question, what env does the preview env use, since there is no gui to update the env for preview.
Michal Srb
Michal Srb11mo ago
The GUI is here: https://dashboard.convex.dev/project/settings Default Environment Variables
Convex Dashboard
Manage your Convex apps
Michal Srb
Michal Srb11mo ago
Glad you figured it out, the CLI should work regardless, I think that's a small regression that should get fixed in the next release.
thedevstockgirl
thedevstockgirlOP11mo ago
Ok. Great. Thanks so much.