Question

Unexpected status code 401 Unauthorized / HEAD responses have no body

Can someone please help me with this issue? I started getting this error when trying to build. What could be causing this?

Force rebuild and deploy did not help, as some other users suggested.

2024-12-07T17:49:12.226017062Z │ 
2024-12-07T17:49:12.226152922Z │ command exited with code 246
2024-12-07T17:49:12.274886528Z │ 
2024-12-07T17:49:12.275675118Z │  » an error occurred, trying again (attempt #4)
2024-12-07T17:49:18.847623068Z │ Adding layer 'heroku/nodejs-engine:nodejs'
2024-12-07T17:49:20.168892421Z │ Adding layer 'heroku/nodejs-engine:yarn'
2024-12-07T17:49:30.588161899Z │ Adding 2/2 app layer(s)
2024-12-07T17:49:30.596281323Z │ Adding layer 'launcher'
2024-12-07T17:49:30.634613129Z │ Adding layer 'config'
2024-12-07T17:49:30.635732397Z │ Adding label 'io.buildpacks.lifecycle.metadata'
2024-12-07T17:49:30.636463389Z │ Adding label 'io.buildpacks.build.metadata'
2024-12-07T17:49:30.636584080Z │ Adding label 'io.buildpacks.project.metadata'
2024-12-07T17:49:30.637429575Z │ Saving <image-1>...
2024-12-07T17:49:30.691447267Z │ *** Images (sha256...):
2024-12-07T17:49:30.691652214Z │       <image-2> - HEAD <registry-uri-3> unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
2024-12-07T17:49:30.758917154Z │ ERROR: failed to export: failed to write image to the following tags: [<image-4>: HEAD <registry-uri-5> unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)]
2024-12-07T17:49:30.762275070Z │ 
2024-12-07T17:49:30.762402318Z │ command exited with code 246
2024-12-07T17:49:30.830389363Z │  ✘ image upload failed


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
December 8, 2024

Hi there,

It looks like there was an incident reported that was affecting App Platform deployments:

https://status.digitalocean.com/incidents/0xr1g55hnlhc

Are you still seeing the problem? If so, it might be best to reach out to the DigitalOcean support team:

https://www.digitalocean.com/support/

- Bobby.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.