Flash SD 32GB Failed

Hi,
I am trying to flash a microSD card Kingston 32GB, but at beginning the procedure returns the follow error:

From Developer Tool, I get the follow output;


gui.js:46 
Tue May 31 2022 10:53:21 GMT+0200 (Ora legale dell’Europa centrale) 
Open image selector ({"sample":0.1,"applicationSessionUuid":"28b7d91e-62c5-401f-80ce-14146bce8f7e","flashingWorkflowUuid":"8ec928fa-35f5-4a26-9e42-8c15ad093718"})

gui.js:46 
{"stack":"Error: spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin ENOENT\n   at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n    at onErrorNT (internal/child_process.js:465:16)\n    at processTicksAndRejections (internal/process/task_queues.js:80:21)","message":"spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin ENOENT","errno":-4058,"code":"ENOENT","syscall":"spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin","path":"bin","spawnargs":["-c","tmp23a8ebb70496.tmp\""],"cmd":"tmp23a8ebb70496.tmp\"","stdout":"","stderr":""}

gui.js:46 
Tue May 31 2022 10:53:26 GMT+0200 (Ora legale dell’Europa centrale) Select image ({"image":{"size":3774873600,"name":"bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img","hasMBR":true,"partitions":
[{"offset":4194304,"size":3770679296,"type":131,"index":1}],"extension":"img","path":"C:\\Users\\GiovanniMo\\Desktop\\bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img","logo":false,"blockMap":false},"sample":0.1,"applicationSessionUuid":"28b7d91e-62c5-401f-80ce-14146bce8f7e","flashingWorkflowUuid":"8ec928fa-35f5-4a26-9e42-8c15ad093718"})

gui.js:46 
Tue May 31 2022 10:53:37 GMT+0200 (Ora legale dell’Europa centrale) Flash ({"image":"size":3774873600,"name":"bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img","hasMBR":true,"partitions":{"offset":4194304,"size":3770679296,"type":131,"index":1}],"extension":"img","path":"C:\\Users\\GiovanniMo\\Desktop\\bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img"},"drives":
[{"size":31292129280,"isVirtual":false,"enumerator":"USBSTOR","logicalBlockSize":512,"raw":"\\\\.\\PhysicalDrive3","error":null,"isReadOnly":false,"displayName":"F:\\","blockSize":512,"isSCSI":false,"isRemovable":true,"device":"\\\\.\\PhysicalDrive3","busVersion":"2.0","isSystem":false,"busType":"USB","isCard":false,"isUSB":true,"devicePath":null,"mountpoints":[{"path":"F:\\"}],"description":"Generic Mass-Storage USB Device","isUAS":false,"partitionTableType":"mbr"}],"driveCount":1,"uuid":"dcb8fd04-bc06-40b2-b540-50d191d1d61e","status":"started","flashInstanceUuid":"dcb8fd04-bc06-40b2-b540-50d191d1d61e","sample":0.1,"applicationSessionUuid":"28b7d91e-62c5-401f-80ce-14146bce8f7e","flashingWorkflowUuid":"8ec928fa-35f5-4a26-9e42-8c15ad093718"})

gui.js:46 
Elevating command: C:\Users\GiovanniMo\AppData\Local\Programs\balena-etcher\balenaEtcher.exe C:\Users\GiovanniMo\AppData\Local\Programs\balena-etcher\resources\app\generated\child-writer.js

gui.js:46 
Terminating IPC server

gui.js:46 
Flash results 
{}

gui.js:46 
Tue May 31 2022 10:53:37 GMT+0200 (Ora legale dell’Europa centrale) Write failed ({"image":{"size":3774873600,"name":"bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img","hasMBR":true,"partitions":[{"offset":4194304,"size":3770679296,"type":131,"index":1}],"extension":"img","path":"C:\\Users\\GiovanniMo\\Desktop\\bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img"},"drives":[{"size":31292129280,"isVirtual":false,"enumerator":"USBSTOR","logicalBlockSize":512,"raw":"\\\\.\\PhysicalDrive3","error":null,"isReadOnly":false,"displayName":"F:\\","blockSize":512,"isSCSI":false,"isRemovable":true,"device":"\\\\.\\PhysicalDrive3","busVersion":"2.0","isSystem":false,"busType":"USB","isCard":false,"isUSB":true,"devicePath":null,"mountpoints":[{"path":"F:\\"}],"description":"Generic Mass-Storage USB Device","isUAS":false,"partitionTableType":"mbr"}],"driveCount":1,"uuid":"dcb8fd04-bc06-40b2-b540-50d191d1d61e","status":"failed","flashInstanceUuid":"dcb8fd04-bc06-40b2-b540-50d191d1d61e","error":{"errno":-4058,"code":"ENOENT","syscall":"spawn Program Files\\Java\\jre1.8.0_301\\bin","path":"C:\\Program Files\\Java\\jre1.8.0_301\\bin","spawnargs":["-c","fltmc"],"cmd":"fltmc","stdout":"","stderr":""},"sample":0.1,"applicationSessionUuid":"28b7d91e-62c5-401f-80ce-14146bce8f7e","flashingWorkflowUuid":"8ec928fa-35f5-4a26-9e42-8c15ad093718"})

gui.js:46 
{"stack":"Error: spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin ENOENT\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n    
at onErrorNT (internal/child_process.js:465:16)\n    at processTicksAndRejections (internal/process/task_queues.js:80:21)","message":"spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin ENOENT","errno":-4058,"code":"ENOENT","syscall":"spawn C:\\Program Files\\Java\\jre1.8.0_301\\bin","path":"bin","spawnargs":["-c","fltmc"],"cmd":"fltmc","stdout":"","stderr":"","image":"bone-debian-9.12-imgtec-armhf-2020-04-06-4gb.img"}

gui.js:35  
0 devices, 0% at 0.00 MB/s (total 0.00 MB/s)  with 0 failed devices

​

Can you please share the following details:
What version of Etcher are you using?
What OS are you running Etcher on?
What are image are you trying to flash?

Hi jmakivic,
I am using the last version of Etcher 1.7.9 on Windows 10 Pro.


It is not portable version.
I am trying to flash an image of Debian 10.3 from from this source
https://debian.beagleboard.org/images/bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz

What happens when you uncompress the image? Are you able to flash it then?

No, I tried to flash with both files and the error is the same.

Not compressed image

Hm, I don’t know what the error means and why it always refers to the Java JRE folder, but I would nonetheless update your Java version. It is from mid 2021 and has some security flaws, so it would not hurt getting it up to speed.

I tried to flash the mentioned image with 1.7.9 and it worked on my side, so it could be something wrong with your system configuration.
Do you happen to have 7zip installed on your system? If not, please do that and after updating Java, installing 7zip try again - if it is still faulty, please try to use the portable version of etcher.
Maybe this helps :slight_smile:

Hi, Etcher should not be spawning any java processes. Can you make sure you’ve downloaded Etcher from balenaEtcher - Flash OS images to SD cards & USB drives ? There are sometimes fake etcher sites that have malware on them.

1 Like

Hello,
it’s been a long time, but i never solved this problem.
I have installed the latest version of jre, I am using the portable version of Balena, but I still have that problem.

This happens when I select only the file I need to use:

And if I start the flashing, the same error appears. What’s wrong?

Please make sure that

a) You use the portable version from a good source / redownload and delete the old file
( https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-Portable-1.7.9.exe )
etcher should not call Java.

b) Install 7zip ( https://7-zip.org/ )

c) You unzipped the .img.xz file before hand and try to flash the raw image, I don’t know if etcher can handle .xz unpacking

Hi nmaas,
thank you for your reply.
1-I downloaded Balena Portable from the link posted by zwhitchcox, in this topic;
2-Before to start the flashing, I unzipped the file then I got the image to use.

I think there is something wrong, because I use Balena correctly to flash SD cards with this kind of images on another computer.

If you’re able to flash this image with balenaEtcher on another computer it could be a local problem on your computer. I don’t know why there is any mentioning of Java in the console, but this could be a potential lead. Maybe remove Java from your computer for testing purposes and make sure that your Computer variables / path variables do not contain any link to the Java paths and try again. Other than that I have sadly no other idea.