Win10 Balena Ethcher fails "Writer Process ended unexpectedly"

Hi - the old version of Etcher used to work great. Now with the new Balena version I get a vague “Writer process failed unexpectedly. Please contact the Etcher team…”

I have Win 10 and am flashing a Raspberry Pi image to a 32GB sd card. I tried running as adminstrator and it didnt help. ITs a brand new SD card. I tried from the package and also after fomatting with Windows.

I copied data files over to my laptop which has an older version of Etcher and it worked fine.

Is this the item you need to see from “ctrl-shift-i”? There are 9 tabs but Im guessing this is the critical info from the console? Let me know if you need whole log.

Sat Dec 07 2019 12:31:07 GMT-0600 (Central Standard Time) Flash error ({“error”:{“name”:“Error”,“message”:“Couldn’t clean the drive, Command failed: diskpart s n (code 2147755009)”,“stack”:“Error: Couldn’t clean the drive, Command failed: diskpart s n (code 2147755009)\n at Object. (C:\Users\Dad\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\etcher-sdk\build\diskpart.js:96:23)\n at Generator.throw ()\n at rejected (C:\Users\Dad\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\etcher-sdk\build\diskpart.js:20:65)”},“applicationSessionUuid”:“b84e4c56-6670-4607-8572-b0f79173b5f1”,“flashingWorkflowUuid”:“0bf84905-5d65-4ff7-b3e6-c31f9d3c704d”,“flashInstanceUuid”:“b3e58d07-2fc2-471d-b062-ae2738458dfd”,“image”:“W:\Raspbian\2019-09-26-raspbian-buster.zip”,“drives”:[{“size”:31708938240,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive3",“error”:null,“isReadOnly”:false,“displayName”:“E:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive3",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“E:\”}],“description”:“Mass Storage Device USB Device”,“isUAS”:false}],“driveCount”:1,“uuid”:“b3e58d07-2fc2-471d-b062-ae2738458dfd”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“trim”:false,“sample”:0.1})

Hi, it seems to be the same problem reported on github https://github.com/balena-io/etcher/issues/2882
It could be related to Windows Defender settings on your machine. If you have a chance to play with settings there and see if they give any effect, we’ll appreciate it.
Thanks!

hi, I have the same issue with windows 10 and balena etcher 1.5.68 , how to find the error log?

Hi @matteoraggi,
You can start balenaEtcher and then while it is your selected window you can press Ctrl+Shit+I.
This will bring up the Chrome Developer Tools, and by choosing the “console” tab you will be able to see the logs that balenaEtcher prints.

Kind regards,
Thodoris

Logged on today to try to figure out Windows Defender config (or turning off anti-virus), but – today it worked?! Flashing the drive now no problem.

Did I maybe get an auto-updated version of the software with a fix? I have BalenaEtcher version 1.5.64.

I’m glad it ended up working for you!
If it does happen again, please try to collect any logs that you can (using the console) and we may be able stop it in the future.

Here my error log:
Sun Jan 05 2020 16:32:23 GMT+0100 (Ora standard dell’Europa centrale) Flash error ({“error”:{“name”:“Error”,“message”:“Couldn’t clean the drive, Command failed: diskpart s n (code 2147943460)”,“stack”:“Error: Couldn’t clean the drive, Command failed: diskpart s n (code 2147943460)\n at n at Generator.throw ()\n at rejected (C:\Users\Matteo\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\etcher-sdk\build\diskpart.js:21:65)”},“applicationSessionUuid”:“76c2f2c5-5cf7-4869-9b89-8626c5335c0f”,“flashingWorkflowUuid”:“07e30a0b-2a2a-46ba-b807-0eaa675ea151”,“flashInstanceUuid”:“c6e32a45-3fe7-4e37-8ec5-386967b1ffee”,“image”:“D:\parent_1.4_4.4gb.img”,“drives”:[{“size”:7948206080,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive1",“error”:null,“isReadOnly”:false,“displayName”:“E:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive1",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“E:\”}],“description”:“SDHC Card”,“isUAS”:false}],“driveCount”:1,“uuid”:“c6e32a45-3fe7-4e37-8ec5-386967b1ffee”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“trim”:true,“sample”:0.1})
gui.js:10919 Finish: 0
gui.js:10997 Flash results
{results: {…}, cancelled: false}
gui.js:11018 Terminating IPC server
C:\Users\Matteo\AppD…\resin-corvus.js:39 Sun Jan 05 2020 16:32:24 GMT+0100 (Ora standard dell’Europa centrale) Open modal ({“name”:“warning”,“applicationSessionUuid”:“76c2f2c5-5cf7-4869-9b89-8626c5335c0f”,“flashingWorkflowUuid”:“07e30a0b-2a2a-46ba-b807-0eaa675ea151”,“sample”:0.1})

Preformatted text

Hi @matteoraggi

Based on the “Couldn’t clean the drive, Command failed: diskpart s n (code 2147943460)” error message that you are getting, we want to ask that you please run the following commands (Please note that this will erase everything on the drive you specify with select disk, so proceed with caution, and double-check that you select the storage that you want to flash your image to!)

In Windows 10, open a Command Prompt (Admin) window, and run the following commands:

diskpart
list disk
select disk <disk number>   (please be sure to enter the correct number for the disk you want to clean here!)
clean
rescan

This essentially represents the first steps performed by Etcher. If this works, please try flashing your image with Etcher again, and let us know the outcome. Thank you!

Kind regards
Alida

I have the same problem.
BalenaEtcher version 1.5.70
Windows 10 Family version 1903

end of logfile:
C:\Users\Pete\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\resin-corvus\src\resin-corvus.js:39 Wed Jan 08 2020 10:30:55 GMT+0100 (heure normale d’Europe centrale) Flashing 1 devices, 100% at 6.3 MB/s (total 6.3 MB/s) eta in 0s with 0 failed devices
C:\Users\Pete\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\resin-corvus\src\resin-corvus.js:39 Wed Jan 08 2020 10:30:56 GMT+0100 (heure normale d’Europe centrale) Verifying 1 devices, 0% at 0 MB/s (total 0 MB/s) eta in undefineds with 0 failed devices
C:\Users\Pete\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\resin-corvus\src\resin-corvus.js:39 Wed Jan 08 2020 10:31:37 GMT+0100 (heure normale d’Europe centrale) Input/output error ({“applicationSessionUuid”:“101465e9-dad2-4310-a2a2-258fbfda9699”,“flashingWorkflowUuid”:“fdf9f823-c156-4aea-8b95-1a7b9da380ff”,“flashInstanceUuid”:“72796951-9492-4dc8-acd8-67e787ab9a60”,“image”:“C:\Users\Pete\Downloads\OSMC_TGT_rbp2_20191118.img.gz”,“drives”:[{“size”:17179869184,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive2",“error”:null,“isReadOnly”:false,“displayName”:“E:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive2",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“E:\”}],“description”:“SDHC Card”,“isUAS”:false}],“driveCount”:1,“uuid”:“72796951-9492-4dc8-acd8-67e787ab9a60”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“trim”:false,“sample”:0.1})
C:\Users\Pete\AppData\Local\Programs\balena-etcher\resources\app.asar\node_modules\resin-corvus\src\resin-corvus.js:39 Wed Jan 08 2020 10:31:37 GMT+0100 (heure normale d’Europe centrale) Validation error ({“applicationSessionUuid”:“101465e9-dad2-4310-a2a2-258fbfda9699”,“flashingWorkflowUuid”:“fdf9f823-c156-4aea-8b95-1a7b9da380ff”,“flashInstanceUuid”:“72796951-9492-4dc8-acd8-67e787ab9a60”,“image”:“C:\Users\Pete\Downloads\OSMC_TGT_rbp2_20191118.img.gz”,“drives”:[{“size”:17179869184,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive2",“error”:null,“isReadOnly”:false,“displayName”:“E:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive2",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“E:\”}],“description”:“SDHC Card”,“isUAS”:false}],“driveCount”:1,“uuid”:“72796951-9492-4dc8-acd8-67e787ab9a60”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“trim”:false,“sample”:0.1})
image-writer.js:141 Finish: 0
image-writer.js:229 Flash results {results: {…}, cancelled: false}
image-writer.js:249 Terminating IPC server
/C:/Users/Pete/AppData/Local/Programs/balena-etcher/resources/app.asar/lib/assets/icon.png:1 GET file:///C:/Users/Pete/AppData/Local/Programs/balena-etcher/resources/app.asar/lib/assets/icon.png net::ERR_FILE_NOT_FOUND

I can find app.asar but Windows doesn’t think this is a directory

Hey @pkirkham,

Can you please follow the above instructions from my colleague and let us know how it goes?

I did that before this attempt having had several attempts fail using different files.
Actually I don’t see why that should change anything since the problem appears to be that the script can’t fing icon.png

It looks like your log is showing the flash was OK but the IO/Error happened during the verfiy step… Can you confirm that the image was written OK?

It would appear not. The Raspberry Pi won’t boot with it.

it worked perfectly:

![2020-01-09 16_34_33-C__WINDOWS_system32_diskpart.exe|528x500](upload://m4ubmDoOTXkavZ5TzHuR6IISr16.png)

Hey @pkirkham the error you are hitting seems to be different from the original one in this thread. Do you also get the: Writer Process ended unexpectedly message? If not, would you mind opening another thread with a description of your issue?
Apologies for the inconvenience, but keeping different errors separated in different thread makes it easier for future user with issues to browse through these.

Yes I am getting the same error message

Ok thanks, I assumed that would not be the case as the error you posted seems to be related to the validation, rather than writing the image do the SD card. Did you have a chance to try with a different SD card, it could be that the SD card is broken and this causes the validation to fail.

@Pkirkham another item to try, based on that log you posted, is to upgrade to a newer release of Etcher, as I see you are running 1.5.x. Perhaps a simple uninstall and re-install from a fresh download would ensure that all files (including that logo.png) are where they should be. Hope that helps, thanks.

1.5.70 is the latest version isn’t it?

Yup, you may stay up to date, and download the latest available version here: https://www.balena.io/etcher/