Error restoring images to CF or CFast-Devices with latest balenaEtcher versions

I am using balenaEtcher to restore images to CF or CFast cards. The images were generated by reading the contents of a disk of same type (including size) using e.g. dd-tool on a Linux machine.

Everything worked fine with balenaEtcher version 1.5.50, but after upgrading to version 1.5.100 I see the following error behaviour:

Etcher console output (Image file path and name modified):

Tue Jun 30 2020 12:58:37 GMT+0200 (Mitteleuropäische Sommerzeit) Drive unplugged ({“image”:“C:\FilePath.img”,“drives”:[{“size”:2048901120,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive2",“error”:null,“isReadOnly”:false,“displayName”:“H:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive2",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“H:\”}],“description”:“Multi Flash Reader USB Device”,“isUAS”:false}],“driveCount”:1,“uuid”:“893f6a1a-25f0-495e-8b12-361350c1a354”,“flashInstanceUuid”:“893f6a1a-25f0-495e-8b12-361350c1a354”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“sample”:0.1,“applicationSessionUuid”:“5a183c62-71b7-4996-b725-30b39228b2c3”,“flashingWorkflowUuid”:“aaae093c-8210-46a1-ad3a-48df3a673603”})
gui.js:7847 Flashing 0 devices, 99% at 15.20 MB/s (total 0.00 MB/s) eta in 0s with 1 failed device
gui.js:126777 Finish: 2047868928
gui.js:126777 Terminating IPC server
gui.js:126777 Flash results Object
gui.js:126777 Tue Jun 30 2020 12:58:40 GMT+0200 (Mitteleuropäische Sommerzeit) Done ({“image”:“C:\C:\FilePath.img”,“drives”:[{“size”:2048901120,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive2",“error”:null,“isReadOnly”:false,“displayName”:“H:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive2",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“H:\”}],“description”:“Multi Flash Reader USB Device”,“isUAS”:false}],“driveCount”:1,“uuid”:“893f6a1a-25f0-495e-8b12-361350c1a354”,“status”:“finished”,“flashInstanceUuid”:“893f6a1a-25f0-495e-8b12-361350c1a354”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“errors”:[{“name”:“Error”,“code”:“EUNPLUGGED”,“syscall”:“write”,“errno”:-4094,“device”:"\\.\PhysicalDrive2"}],“devices”:{“failed”:1,“successful”:0},“bytesWritten”:2047868928,“sourceMetadata”:{“size”:2048901120,“name”:“FileName.img”,“blocks”:[{“blocks”:[{“offset”:0,“length”:2048917504}]}],“blockmappedSize”:2048917504},“sample”:0.1,“applicationSessionUuid”:“5a183c62-71b7-4996-b725-30b39228b2c3”,“flashingWorkflowUuid”:“aaae093c-8210-46a1-ad3a-48df3a673603”})
gui.js:126777 Tue Jun 30 2020 12:58:40 GMT+0200 (Mitteleuropäische Sommerzeit) SafeWebview loaded ({“event”:{“id”:13,“url”:“https://www.balena.io/etcher/success-banner/?etcher-version=1.5.100&api-version=2&optOutAnalytics=true",“method”:“GET”,“timestamp”:1593514720882.52,“resourceType”:“mainFrame”,“ip”:“34.206.168.28”,“fromCache”:false,“statusLine”:"HTTP/1.1 200 OK”,“statusCode”:200,“responseHeaders”:{“Accept-Ranges”:[“bytes”],“Access-Control-Allow-Headers”:[“Origin, X-Requested-With, Content-Type, Accept”],“Access-Control-Allow-Origin”:["*"],“Cache-Control”:[“public, max-age=0”],“Connection”:[“keep-alive”],“Content-Encoding”:[“gzip”],“Content-Type”:[“text/html; charset=UTF-8”],“Date”:[“Tue, 30 Jun 2020 10:58:53 GMT”],“Etag”:[“W/“541f-17300538f58"”],“Last-Modified”:[“Mon, 29 Jun 2020 13:45:43 GMT”],“Server”:[“Cowboy”],“Transfer-Encoding”:[“chunked”],“Vary”:[“Accept-Encoding”],“Via”:[“1.1 vegur, 1.1 vegur”]},“referrer”:”",“error”:“net::OK”},“sample”:0.1,“applicationSessionUuid”:“5a183c62-71b7-4996-b725-30b39228b2c3”,“flashingWorkflowUuid”:“aaae093c-8210-46a1-ad3a-48df3a673603”})

Problem appears for compressed (.xz) or uncompressed Images. Please also note that on my machine for getting the required administrative privileges I need to enter credentials different from the user credentials I am logged in with.

At the moment I got around the problem by reverting Etcher software to version 1.5.50. But of course it would be great to stay able to use latest software.

Hey there! The error seems to indicate that Etcher lost the drive corresponding to H:. This is usually the case if someone unplugs the drive half-way through the flashing process, or if the USB slot is faulty and the drive sporadically comes and goes.

At the moment I got around the problem by reverting Etcher software to version 1.5.50. But of course it would be great to stay able to use latest software.

This is weird though. So it always fails with the new version, but it never fails on 1.5.50? Can you confirm that you are using the exact same USB drive, plugged into the exact same USB slot?

Exactly that is fact. Checked that multiple times. Failure of 1.5.100 was checked with compressed and uncompressed images, two different CF sizes and even different readers (CF / CFast).

Up to Etcher 1.5.50 never seen such a behaviour. Versions in between not tested.

Hey there! We identified an error on Etcher and we’re in the progress of sending a fix. From what we can tell, Etcher does finish flashing the image successfully despite the error, so its likely that the device will boot. Thanks a lot for the heads up!

You’re welcome. I only want to add, that in my case (writing full device space) the last partition on devices seems to miss last sector, causing the whole partition to be detected as faulty.

Thank you for investigation and feed-back. Looking forward to the fixed version.