Upload Error: exit status 2

Hi,
I have a problem uploading my code to the esp32, which I successfully uploaded before. Seems like it is looking for some file, but I don't think I have moved anything...

Here is the Error:

Upload started

Programming with: Serial

Flashing with command:/Users/pariston/.arduino-create/esp32/esptool_py/3.0.0/esptool --chip esp32 --port /dev/cu.usbserial-0255CEC4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /var/folders/z4/9zvsm5rx7hq832wrsjf1kc_h0000gn/T/extrafiles541448859/tools/partitions/boot_app0.bin 0x1000 /var/folders/z4/9zvsm5rx7hq832wrsjf1kc_h0000gn/T/extrafiles541448859/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /var/folders/z4/9zvsm5rx7hq832wrsjf1kc_h0000gn/T/arduino-create-agent823764268/Hobi_000_may26a.bin 0x8000 /var/folders/z4/9zvsm5rx7hq832wrsjf1kc_h0000gn/T/extrafiles541448859/Hobi_000_may26a.partitions.bin

usage: esptool write_flash [-h] [--erase-all]

[--flash_freq {keep,40m,26m,20m,80m}]

[--flash_mode {keep,qio,qout,dio,dout}]

[--flash_size FLASH_SIZE]

[--spi-connection SPI_CONNECTION] [--no-progress]

[--verify] [--encrypt]

[--ignore-flash-encryption-efuse-setting]

[--compress | --no-compress]

[ ...]

esptool write_flash: error: argument : [Errno 2] No such file or directory: '/var/folders/z4/9zvsm5rx7hq832wrsjf1kc_h0000gn/T/arduino-create-agent823764268/Hobi_000_may26a.bin'

Hello,

it was a temporary bug. Sorry for the inconvenience.

Please retry now.

1 Like

my code also shows the same result. it uploads in the start for the first attempt but fails for other attempts. as appers in the images it says upload started but it doesn't works. and what is the meaning of "exit status 2 "

2 Likes

Yes, totally the same thing happened to me. Even a simple test

1 Like

I have also this issue. Something the code upload, sometime not. I have found that temporary selecting the bluetooth port and than reselecting the USB port solve most of the time the problem, until the next upload. My sript use the serial port for printing. May be the port is busy printing from the previous upload and need to be reset ?

1 Like


I have also this issue

Hi I am having the same problem any solution to that? I am struggling with that issue.

Hello, we just released a fix for this bug. Can you try again?

i am too still getting this error...

Did you try to clear the browser cache?

2 posts were split to a new topic: Upload fails: "port doesn't exist"

A post was split to a new topic: Upload fails: "espcomm_upload_mem failed"

Hi. I am facing exactly the same problem. Did you fix it?

I feel stupid now! This was the reason for my exit code being 2!

8 posts were split to a new topic: Upload to ESP32 fails: "Timed out waiting for packet content"

6 posts were split to a new topic: Upload to ESP32 fails: "No serial data received."

7 posts were merged into an existing topic: Upload fails: "espcomm_upload_mem failed"

2 posts were merged into an existing topic: Upload to ESP32 fails: "Timed out waiting for packet content"

4 posts were merged into an existing topic: Upload to ESP32 fails: "No serial data received."