Context:
We have been successfully deploying updates to our site for months. Recently, we encountered deployment failures when pushing updates to our dev branch. The issue seems to be related to “Error uploading blobs,” and we are unsure how to resolve this as we have not configured blob management before.
Site Information:
- Site name:
dev-misinfo-dashboard.netlify.app
- DNS issues: None, we use the Netlify URL provided.
Build problems: from the deploy log:
12:38:01 PM: Uploading 24 blobs to deploy store...
12:38:01 PM: Error uploading blobs to deploy store: Netlify Blobs has generated an internal error (301 status code)
12:38:01 PM:
12:38:01 PM: Internal error during "Uploading blobs"
12:38:01 PM: ────────────────────────────────────────────────────────────────
12:38:01 PM:
12:38:01 PM: Error message
12:38:01 PM: Error: Failed while uploading blobs to deploy store
12:38:01 PM:
12:38:01 PM: Error location
12:38:01 PM: During Uploading blobs
12:38:01 PM: at coreStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins_core/blobs_upload/index.js:60:15)
12:38:01 PM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
12:38:01 PM: at async fireCoreStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/steps/core_step.js:11:98)
12:38:01 PM: at async tFireStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/time/main.js:18:63)
12:38:01 PM: at async file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/steps/run_step.js:69:283
12:38:01 PM: at async pReduce.index (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/steps/run_steps.js:12:349)
12:38:01 PM: at async Promise.all (index 0)
12:38:01 PM: at async next (file:///opt/buildhome/node-deps/node_modules/p-reduce/index.js:15:44)
12:38:01 PM:
12:38:01 PM: Resolved config
12:38:01 PM: build:
12:38:01 PM: command: yarn run build
12:38:01 PM: commandOrigin: config
12:38:01 PM: environment:
12:38:01 PM: - NEXT_FORCE_EDGE_IMAGES
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_API_KEY
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_APPCHECK_DEBUG_TOKEN
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_APP_ID
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_PROJECT_ID
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_RECAPTCHA_ENTERPRISE_SITE_KEY
12:38:01 PM: - NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
12:38:01 PM: publish: /opt/build/repo/.next
12:38:01 PM: publishOrigin: config
12:38:01 PM: functionsDirectory: /opt/build/repo/netlify/functions
12:38:01 PM: plugins:
12:38:01 PM: - inputs: {}
12:38:01 PM: origin: ui
12:38:01 PM: package: '@netlify/plugin-nextjs'
12:38:01 PM: redirects:
12:38:01 PM: - force: true
12:38:01 PM: from: /_next/image/*
query:
q: ':quality'
url: ':url'
w: ':width'
status: 200
to: /.netlify/images?url=:url&w=:width&q=:quality
- from: /_next/image
query:
q: ':quality'
url: ':url'
w: ':width'
status: 200
to: /.netlify/images?url=:url&w=:width&q=:quality
- from: /_ipx/*
query:
q: ':quality'
url: ':url'
w: ':width'
status: 200
to: /.netlify/images?url=:url&w=:width&q=:quality
redirectsOrigin: inline
12:38:01 PM: Build failed due to an internal system error: Build script returned non-zero exit code: 4
12:38:02 PM: Failing build: Failed to build site
12:38:02 PM: Finished processing build request in 5m25.144s
12:38:02 PM: Failed during stage 'building site': Build script returned non-zero exit code: 4 (https://ntl.fyi/exit-code-4)
Troubleshooting Steps Taken:
-
Checked Ask Netlify: We were directed to the Netlify Blobs documentation, but the troubleshooting tips provided did not resolve our issue.
-
Added the
next/image
redirect snippet for Netlify Image CDN to ournetlify.toml
file as a possible fix.
Netlify UI settings:
- Dependency management Node.js: 20.x
- Production branch: dev
- Runtime: Next.js
- Base directory:
/
- Package directory: Not set
- Build command:
yarn run build
- Publish directory: .next
- Functions directory: /Users/lukey/Sites/misinfo/misinfo-dashboard/netlify/functions
- Deploy log visibility: Logs are public
- Build status: Active
Local project versions:
- Yarn 1.22.11
- Node v20.12.2
- Next.js v14.2.3
- React ^18.3.0
- netlify-cli/17.23.8 darwin-arm64 node-v20.12.2
Request: We are seeking guidance on how to manage the blob configuration or any other steps we can take to resolve this deployment issue. Any help or pointers would be greatly appreciated.
Thanks again, Luke and the Dev Team