Etcher: Etcher doesn't like this image, gives no feedback on why.

Created on 15 Sep 2017  路  7Comments  路  Source: balena-io/etcher

I have been preparing Raspberry Pi images in this manner (Ubuntu 16.04):

  • SD card with expanded filesystem into the computer.
  • Shrink EXT4 partition with GParted
  • parted <sd card device> -s print to find End of ext4 partition in MB
  • dd bs=1M count=#from parted+1
  • right click resulting .img file in nautilus and click compress....zip

Now I have a .img.zip file, etcher has been perfectly happy with these *.img.zip files except for one.

This is the .img.zip file in question. When I select this file from the file browse dialog, etcher behaves as if I had pressed 'cancel'. It returns to the main ui, it still says 'select image', and it gives no feedback on why the image I selected is not showing up. When I unzip this file, etcher lets me select and writes the resulting .img normally, and it functions normally in the Pi afterward. I have also tried compressing the image from the command line using zip with the same results.

Here is another .img.zip prepared in the same manner, that works as expected.

all bug

All 7 comments

PS: same behavior on Etcher 1.0.0 and 1.1.2.

Looks like a potential bug in a dependency we use to handle zip files;

buffer.js:829 Uncaught RangeError: Index out of range
    at checkOffset (buffer.js:829)
    at Buffer.readUInt32LE (buffer.js:891)
    at FsRead.readUntilFoundCallback [as callback] (/Applications/Etcher.app/Contents/Resources/app.asar/node_modules/node-stream-zip/node_stream_zip.js:190)
    at FsRead.readCallback (/Applications/Etcher.app/Contents/Resources/app.asar/node_modules/node-stream-zip/node_stream_zip.js:798)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:603)

I'll do some fiddeling to see what's going on with that in detail.

The zip file itself being faulty can also be ruled out:

$ unzip -v -t Downloads/ardusub-raspbian-0.0.9.img.zip
Archive:  Downloads/ardusub-raspbian-0.0.9.img.zip
    testing: ardusub-raspbian-0.0.9.img   OK
No errors detected in compressed data of Downloads/ardusub-raspbian-0.0.9.img.zip

Turns out this was an upstream bug that has already been fixed in a newer version, so updating to node-stream-zip to 1.3.7 in https://github.com/resin-io/etcher/pull/1730 will fix this.

Reminds me of the "dinosaur error" we had with lzma a while back ;-)

Closing as this has been fixed in https://github.com/resin-io/etcher/pull/1730 and will land in the next Etcher release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lurch picture lurch  路  3Comments

zamber picture zamber  路  5Comments

m-p-3 picture m-p-3  路  5Comments

jwa5426 picture jwa5426  路  5Comments

jviotti picture jviotti  路  5Comments