#Production Deployment Not Loading NEW Environment Variables (Request ID: 240ef5c77e57d120)

12 messages · Page 1 of 1 (latest)

obtuse axle
#

I am experiencing a critical issue where my production deployment is not loading any new environment variables set in the dashboard. Existing variables work correctly, but any newly added secrets are undefined.
The Anomaly:

  • Working Keys: My pre-existing secrets like RESEND_API_KEY and the JWKS/JWT_PRIVATE_KEY auth keys are loading and working perfectly.
  • Failing Keys: Any new keys I add, specifically STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET, are consistently undefined inside my Convex actions.
    Irrefutable Proof:
    To prove this is a platform sync issue, I ran a specific test:
  1. I added a new environment variable in the production dashboard named DUMMY_TEST with a value of 1234.
  2. I triggered a fresh deployment and called an action that logs this variable.
  3. The server logs for Request ID 240ef5c77e57d120 confirm the result: [LOG] 'Attempting to read DUMMY_TEST value:' undefined.
    This test proves that my deployment is not receiving any new secrets from the dashboard. Standard redeployments have not fixed this.
    My Specific Question:
    Could you please investigate Request ID 240ef5c77e57d120 for my deployment? The logs clearly show a failure to load a newly added DUMMY_TEST variable. Why is my production instance failing to sync with new secrets added to the dashboard, while older secrets continue to work?
hybrid lynxBOT
#

Hi @obtuse axle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources provided do not contain information about investigating specific request IDs (such as 240ef5c77e57d120) or accessing internal Convex platform logs. As an AI assistant, I do not have access to Convex's internal systems or the ability to directly investigate deployment-specific issues.

However, I can summarize relevant best practices and troubleshooting steps for environment variable issues in Convex production deployments:

  • Environment variables are set per deployment and must be added via the Convex dashboard or CLI for each deployment (dev, prod, etc.). After adding or updating environment variables, you must redeploy your project for the changes to take effect in your Convex functions. This is typically done with npx convex deploy for production deployments. If you have already done this and the new variables are still undefined, it suggests a deeper issue or a possible platform bug Environment Variables.

  • CLI Verification: You can verify the value of an environment variable in your deployment using:

    npx convex env get DUMMY_TEST --prod
    

    This will show you what value is currently set for that variable in your production deployment.

  • Known Issues: There are no documented issues in the provided sources about new environment variables failing to sync after a redeploy, as long as the variables are set correctly and a redeployment has occurred.

  • Common Pitfalls: Make sure you are not relying on .env files for production Convex deployments—environment variables must be set in the Convex dashboard or via the CLI, not just in your local files Environment Variables.

#
  • If the problem persists: If you have confirmed that the variable is set in the dashboard, have redeployed, and it is still undefined, this may be a platform issue. The knowledge sources do not provide a solution for this scenario. In such cases, the recommended action is to contact Convex support directly, referencing your deployment and request ID, as only they can investigate platform-level sync issues.

In summary, based on the knowledge sources, your steps are correct, and this behavior is not expected. Please reach out to Convex support for further investigation, as the knowledge sources do not contain enough information to resolve this specific issue.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse axle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse axle
#

I have definitive proof of a critical bug. When I add a new environment variable in the production dashboard, it is not being saved to my project's backend configuration.
The Proof:

  1. I added a new variable DUMMY_TEST with the value 1234 in my production dashboard UI.
  2. I then ran the official CLI command to verify this: npx convex env get DUMMY_TEST --prod.
  3. The CLI returned the error: ✖ Environment variable "DUMMY_TEST" not found.
    This result proves the Convex dashboard is not correctly saving new secrets to my production environment. This is a platform bug that has completely blocked my development.
    Please investigate why my project's environment variables are not saving from the dashboard.
obtuse axle
#

Kapa, answer the above question

obtuse axle
#

@hybrid lynx

hybrid lynxBOT
#

Let me check the knowledge base for you again. One moment! :books:

obtuse axle
#

I have definitive proof of a critical bug. When I add a new environment variable in the production dashboard, it is not being saved to my project's backend configuration.
The Proof:
I added a new variable DUMMY_TEST with the value 1234 in my production dashboard UI.
I then ran the official CLI command to verify this: npx convex env get DUMMY_TEST --prod.
The CLI returned the error: ✖ Environment variable "DUMMY_TEST" not found.
This result proves the Convex dashboard is not correctly saving new secrets to my production environment. This is a platform bug that has completely blocked my development.
Please investigate why my project's environment variables are not saving from the dashboard.

hybrid lynxBOT
#

Sorry @obtuse axle, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

obtuse axle
#

<@&1228088700710293556>. I tried again (18 hours later). same problem.