Process.env user-defined variables missing in scheduled/background functions and async-workloads

Site: https://autoaffiliate.netlify.app/

Issue: Since ~March 27, 2026, user-defined environment variables are no longer available via process.env in
scheduled functions, background functions, and the internally generated async-workloads-scheduler-aux
function. System variables (like AWS_LAMBDA_FUNCTION_NAME) are still present — only user-defined vars are
missing.

What works: The main API function using Functions v1 style (export const handler) — process.env contains all
user-defined variables as expected.

What doesn’t work: Scheduled and background functions using Functions v2 style (export default) — process.env
is empty for user-defined vars. I confirmed this by adding console.log(process.env) inside the handler at
runtime.

Impact:

  • All scheduled/background functions that rely on user-defined env vars crash on startup
  • The async-workloads-scheduler-aux function also crashes, which causes all async workload event sends to
    fail with 401 Unauthorized (the client can’t authenticate without env vars)

Error from triggers:
AsyncWorkloadsClient#send() did not get a event router ack - response status 401

What I’ve verified:

  • Env vars are configured with All scopes and Same value in all deploy contexts
  • No code changes were made to these functions before the issue appeared
  • Netlify.env.get() also returns undefined for user-defined vars in these functions
  • Hardcoding values directly in the function code works as a workaround
  • console.log(process.env) shows system vars are present but all user-defined vars are missing

No changes were made to function code, Netlify config, or environment variable settings before this started
happening. This appears to be a platform-level regression affecting Functions v2 and extension-generated
internal functions.

1 Like

Is this still an issue for you? I suddenly got env vars not being seen the last 24 hours, but it’s intermittent and I fixed it 3 times now by clearing deploy cache.

1 Like

OK I am still getting issue again with env vars not being seen intermittently

1 Like

Issue still there. Spend way too much time this weekend figuring out what was causing the issue, then finally found that redeploying and cache busting was the only solution. Thought I was going mad.

netlify deploy --prod --build --skip-functions-cache

Anyways, after fixing it yesterday, this morning the same issue was there. My debug-env-vars function I wrote confirmed the env vars were empty again.
Same command fixed it, but seriously, I need to depend on it.

Hi all, thanks for reporting this and we’re so sorry about this issue!

We currently have a status page up regarding env vars not being read at build time, and our engineers are currently investigating this with high priority! Please tune into the status page for updates.

Hey all,

Just a quick update on this one. We currently rolled out a fix and monitoring. Please do let us know if you continue to have issues.