# Functions v2 (export default) intermittently missing all user-defined env vars at runtime

**URL:** <https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958>\
**Category:** Support\
**Tags:** environment-vars\
**Created:** [March 29, 2026, 8:14pm UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958 "2026-03-29T20:14:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mashdot](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mashdot/32/34384_2.png) [@mashdot](https://answers.netlify.com/u/mashdot)\
**Post date:** [March 29, 2026, 8:14pm UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/1 "2026-03-29T20:14:40Z")

</div>

Since ~March 28, 2026, user-defined environment variables are intermittently absent from process.env at runtime in a standard request/response function using the Functions v2 export default style. System variables and Netlify’s built-in URL var remain present. Netlify.env.get() also returns undefined for the affected vars.

**Setup:** Single request/response function (not scheduled or background), deployed with esbuild bundler. Env vars configured with All scopes in the Netlify dashboard. No code or config changes preceded the issue.

**What we’ve confirmed:**

- When it occurs, Object.keys(process.env).length shows 37 keys — all system vars, zero user-defined
- We implemented retry logic with exponential backoff (50–400ms, ~750ms total wait). The vars never appeared during retries — they are completely absent for the entire invocation, not delayed
- The issue is intermittent: some cold starts receive env vars normally, others do not
- –skip-functions-cache deploys do not resolve it
- Netlify.env.get() returns undefined for the same vars

**Impact:** Any handler that reads a user-defined env var (database connection, API keys, auth secrets) returns a 500. Login, checkout, and all authenticated routes fail intermittently with no code change on our side.

---

<div class="post-metadata">

**Author:** ![ayan2207](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/ayan2207/32/78187_2.png) [@ayan2207](https://answers.netlify.com/u/ayan2207)\
**Post date:** [March 29, 2026, 8:22pm UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/2 "2026-03-29T20:22:31Z")

</div>

Having the same issue. No code or config changes however getting a bunch of missing environment variables on both live and branch deploys

---

<div class="post-metadata">

**Author:** ![mashdot](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mashdot/32/34384_2.png) [@mashdot](https://answers.netlify.com/u/mashdot)\
**Post date:** [March 29, 2026, 8:26pm UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/3 "2026-03-29T20:26:19Z")

</div>

Thanks for confirming, as I thought I was going mad. I see no status issue or report anywhere for this over the last 24 hours. I just had multiple users tell me.

---

<div class="post-metadata">

**Author:** ![charlottechhum](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/charlottechhum/32/52466_2.png) [@charlottechhum](https://answers.netlify.com/u/charlottechhum)\
**Post date:** [March 30, 2026, 9:16am UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/4 "2026-03-30T09:16:04Z")

</div>

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.

> **[Environment Variables Issues](https://www.netlifystatus.com/incidents/qvlyvz9rj25f/)**
>
> Netlify's Status Page - Environment Variables Issues.

---

<div class="post-metadata">

**Author:** ![Andrew.H](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/andrew.h/32/59713_2.png) [@Andrew.H](https://answers.netlify.com/u/Andrew.H)\
**Post date:** [March 30, 2026, 7:46pm UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/5 "2026-03-30T19:46:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mattgow](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mattgow/32/79752_2.png) [@mattgow](https://answers.netlify.com/u/mattgow)\
**Post date:** [June 1, 2026, 2:01am UTC](https://answers.netlify.com/t/functions-v2-export-default-intermittently-missing-all-user-defined-env-vars-at-runtime/160958/6 "2026-06-01T02:01:54Z")

</div>

Opened this ticket  
[Functions v2: user-defined env vars completely absent from `process.env` AND `Netlify.env.get()` - Support - Netlify Support Forums](https://answers.netlify.com/t/functions-v2-user-defined-env-vars-completely-absent-from-process-env-and-netlify-env-get/163080)

Seems to be a regression of the fix on this thread?
