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?
14 Replies
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)
Yes. From the production deployment.
Also which version of convex are you on? (from your package.json)
1.8.0
I triggered a redeploy from the vercel dashboard after updating my env vars. Not sure if that matters
If the env vars are saved that should be fine
Yes. They are synced from doppler
And I verified that it is in the dashboard and in the correct env
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)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.
Oh this could be the issue, can you make sure you do not have CONVEX_DEPLOYMENT set?
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.
Convex Dashboard
Manage your Convex apps
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.
Ok. Great. Thanks so much.