Hi - I have a Next.js site that 502s on every freshly-deployed SSR function, and I’ve narrowed it down precisely but can’t fix it from my side because it appears to be a runtime Blobs-context injection issue specific to CLI deploys. Hoping a Netlify engineer can check the platform side.
Site: vouchtribe - site ID 77a2e380-09a2-445d-a9e0-deb10ece51c7
Symptom: every fresh deploy returns HTTP 502 error decoding lambda response: unexpected end of JSON input on all routes (/, /login, /api/*). Production is currently up only because Netlify is still serving an older cached function - so I can’t deploy anything, since a fresh prod deploy would replace the cached function and take the live site down.
Root cause (confirmed): @netlify/plugin-nextjs’s NetlifyCacheHandler throws MissingBlobsEnvironmentError on every request - the function runtime isn’t receiving NETLIFY_BLOBS_CONTEXT. Stack:
getDeployStore → getRegionalBlobStore → getMemoizedKeyValueStoreBackedByRegionalBlobStore → new NetlifyCacheHandler (handlers/cache.cjs:55)
Reproduced in isolation (deploy-free): I copied the deployed function bundle (.netlify/functions-internal/___netlify-server-handler) out and invoked the handler directly. Without a Blobs context → throws the MissingBlobsEnvironmentError above → 502. With a stub NETLIFY_BLOBS_CONTEXT supplied → returns a correct 401. So the app code is fine; the only missing piece is the runtime Blobs-context injection.
The distinguishing factor: this site deploys CLI-only (netlify deploy --build, no Git-connected builds). I suspect NETLIFY_BLOBS_CONTEXT isn’t being provisioned for my CLI/draft function deployments.
Already tried (all on draft deploys, all still 502):
- Netlify CLI 24.11.1 → 26.1.0 and @netlify/plugin-nextjs 5.15.11 → 5.15.12
- NETLIFY_NEXT_SKEW_PROTECTION=true
- Fully unpinned the adapter (removed from both package.json and netlify.toml per the docs) - Netlify auto-injected the runtime (Using Next.js Runtime - v5.15.12) but it still 502s
- Confirmed Netlify Blobs IS enabled for the site (a store lists fine)
Re: the Sydney-region Blobs incident (May 29–Jun 2): I’ve read that thread - my issue is separate. I re-tested a fresh draft after that incident was marked resolved and it still 502s with the identical error, and it’s specific to CLI deploys.
Environment: Next.js 16.2.3 · @netlify/plugin-nextjs 5.15.12 · Netlify CLI 26.1.0 · npm-workspaces monorepo (apps/web) · deploy command netlify deploy --build --filter @vouchtribe/web
Could a Netlify engineer check why NETLIFY_BLOBS_CONTEXT / Blobs runtime context isn’t being injected into CLI (and draft) function deployments for this site? I have a support ticket open as well but wanted to surface it here too. Happy to provide anything else. Thanks!