Docker failed precondition

I’m trying to auto-deploy a remix app. Everything works locally, but not on GitHub Actions:

#4 ERROR: failed commit on ref "layer-sha256:7a6db449b51b92eac5c81cdbd82917785343f1664b2be57b22337b0a40c5b29d": "layer-sha256:7a6db449b51b92eac5c81cdbd82917785343f1664b2be57b22337b0a40c5b29d" failed size validation: 0 != 31381485: failed precondition

[110](https://github.com/cyprus-developer-community/cdc.cy/runs/8263999441?check_suite_focus=true#step:5:111)

https://github.com/cyprus-developer-community/cdc.cy/runs/8263999441

Any ideas?

1 Like

I’m seeing the same thing. Stuck on the same layer hash even. I tried deleting the builder and still no luck.

I had to delete the builder 3 times and then eventually one worked. The IAD and DFW builders both kept failing to pull that layer. But a builder in SJC worked. :man_shrugging:

I wonder if there is any issue with a cache :thinking: It would make sense for layers to be cached to avoid endlessly pulling the same ones. A quick Google for that “failed size validation” style error results in other people finding the same, seemingly randomly. Those responses suggest it is down to a prior failed pull. So perhaps that then persists. If the cache was per-region (don’t know how the innards work) that would follow, as yes, it would mean a subsequent builder in the same region would fetch the same failed cache … while one in a different region may see an empty cache and so pull it from the source. Total speculation though!

4 Likes

i guess we on the same workaround. deleted 4 times.

I think @greg’s theory is likely. We have VMs for our registry and our docker hub mirror in a bunch of regions. A bad layer was probably cached in IAD and DFW so moving to another region helped. I just wiped the cache in those two regions and I don’t see any errors so far, but let us know if you still have trouble.

1 Like