Artifact fails to install because of unexpected EOF

Building the artifact in Buildroot:

$ make
...
buildroot/output/host/usr/bin/mender-artifact write rootfs-image --file buildroot/output/images/rootfs.ext4 --output-path buildroot/output/images/foo-rootfs.mender --artifact-name foo-rootfs --device-type foo
Writing Artifact...
Version             	✓
Manifest            	✓
Manifest signature  	✓
Header              	✓
Payload
.............................................................. - 100 %
$ buildroot/output/host/usr/bin/mender-artifact --version
mender-artifact version 3.8.0

Attempting to install the artifact on the target:

# mender install ./foo-rootfs.mender 
INFO[0000] Loaded configuration file: /etc/mender/mender.conf 
INFO[0000] Mender running on partition: /dev/mmcblk0p2  
INFO[0000] Start updating from local image file: [./foo-rootfs.mender] 
Installing Artifact of size 26459648...
INFO[0000] No public key was provided for authenticating the artifact 
ERRO[0000] Reading headers failed: installer: failed to read Artifact: readHeaderV3: handleHeaderReads: r
eadHeader: readNext: Failed to get next header: reader: error reading archive: unexpected EOF 
ERRO[0000] installer: failed to read Artifact: readHeaderV3: handleHeaderReads: readHeader: readNext: Fai
led to get next header: reader: error reading archive: unexpected EOF 
# mender --version
3.4.0   runtime: go1.18.6

Note that when I upload the rootfs.ext4 directly to hosted.mender.io, which should generate a Mender artifact, I do not have this issue. Instead I run into the following:

I downloaded the pre-built mender-artifact version 3.9 and built a new artifact. That artifact installed successfully on the target.

1 Like

I bumped the version in Buildroot from 3.8.0 to 3.9.0 and it appears to also work successfully.

1 Like

Thanks for sharing the solution!