Build fails with error - Cannot overwrite digest

A recent build has failed with the following error.

[interface]        Step 1/24 : FROM balenalib/raspberrypi3-node:12-stretch-build as build
[interface]        Cannot overwrite digest sha256:39e1529973265976a80a22cc17650daefc2bd0a24cb12fd2a370fc17747190a1

Between this build and the previous we had not made any updates to the interface service.

I am attempting to build the same commit again at the moment, it has started the build from the beginning, therefore, I assume that this issue will be resolved.

I am not looking for help with the above but thought it would be useful to share.

Hi, thanks for letting us know. We’d appreciate if you could follow up with the result of the rebuilt too.

Hi @alexgg,

The following build failed with a “no such image” error (although the error message is slightly more verbose than when I have seen this error before).

Here is a section from the build output, the controller service has not been changed in this push so it should be using a cache for all layers of the dockerfile.

[controller]       Step 18/22 : WORKDIR /app
[controller]       Using cache
[controller]        ---> 26dd7c91f442
[controller]       Step 19/22 : COPY --from=build /app .
[Info]             Still Working...
[controller]       failed to get destination image "sha256:26dd7c91f4427270d3aae1c9cf428836297156758e5d5218032bb9f3ff670de3": No such image: sha256:26dd7c91f4427270d3aae1c9cf428836297156758e5d5218032bb9f3ff670de3 

I am running another build and I will share the results from my next build when it finishes.

Thanks

Hi there. Is this using our builders or are you using balena build locally?

This was running on the Balena servers

Did it say which builder it was running on?

It was using arm03, I hope this is helpful.

I cannot report on the subsequent build as it is still running after 3+ hours.

Ahh. Just how big is the image?

There are 5 services which create images between 0.2 and 1.2 GB. I have not cancelled the build and will try starting it again. Mostly they take 10 - 20 minutes to build but we have not been able to get any of our code onto devices today.

Okay cool. Just out of interest, have you tried balena build locally?

We have spent some time today moving our CI to do local building, however facing some issues with emulated builds where the context and dockerfile for a service are in different folders.

I see. I’ll follow up in that thread.

1 Like

Hi. We’re looking into the builder errors. Are the logs you posted everything or is there something after the Cannot overwrite digest.... and failed to get destination image....?

Hi @Ereski,

That was the last output from the interface service. At the end of the build it did share a summary output from the build:

[Success]          Successfully uploaded images
[Error]            Some services failed to build:
[Error]              Service: interface
[Error]                Error: Cannot overwrite digest sha256:39e1529973265976a80a22cc17650daefc2bd0a24cb12fd2a370fc17747190a1
[Info]             Built on arm03
[Error]            Not deploying release.

I have the full output if that is useful? Let me know where I can send it over to.

Thanks

Thank you. I’ll pass this on to the builder maintainer.

Hi, just an update we are looking into this. Will get back to you when this is resolved. Thanks!

1 Like