Environment Variables Not Syncing to Backend Deployment
I am experiencing a critical issue where environment variables set in my project's dashboard are not being loaded into my backend functions.
The Problem:
My application requires a
STRIPE_SECRET_KEY to process payments. I have set this variable correctly in the Convex dashboard under Settings -> Environment Variables. However, when my backend action (checkout:createCheckoutSession) runs, the key is not present in process.env.Evidence from Logs:
We have added logging to the backend function to print all available environment variable keys. The
STRIPE_SECRET_KEY is consistently missing from this list. Here is a snippet from the server logs:As you can see, the Stripe key is not included. This results in a "Stripe not configured" error, which stops our checkout process.
Troubleshooting Steps Taken:
1. Verified the variable name is spelled correctly (
STRIPE_SECRET_KEY).2. Deleted and re-entered the key multiple times.
3. Confirmed we are using the correct Stripe Test Key (
sk_test_...).4. Added a new, temporary environment variable (
FORCE_REFRESH) to try and force a full environment sync, but this new variable also did not appear in the logs.This strongly indicates a platform-level synchronization issue between the dashboard settings and the running backend environment.
Could you please investigate the environment variable synchronization for my project and ensure that the variables I set in the dashboard are correctly loaded into the backend?
Thank you for your help.
