Upload Error: exit status 2 | ESP32 (2024 again)

Thanks for reporting this @jhoan_daniel_30 and @thornemann. I confirm the bug and have reported this to the Arduino Cloud developers. I'll let you know if I receive any news from them about a resolution.

Until then, I can suggest using Arduino IDE as a workaround.

Arduino IDE has Arduino Cloud integration, which provides convenient access to the sketches from your Arduino Cloud account.

I'll provide instructions you can follow to set up Arduino IDE and upload your sketch:

  1. Install Arduino IDE by following the instructions here.
  2. Start Arduino IDE.
  3. Install the "esp32" boards platform by following the instructions here.
  4. Connect Arduino IDE to your Arduino Cloud account by following the instructions here
  5. You should now see the list of sketches from your Arduino Cloud account in the "SKETCHBOOK" panel of the IDE window. Click on the sketch you would like to upload to your board.
  6. Click the cloud with downward pointing arrow icon ("Pull Sketch") that appears to the right of the sketch name.
    A "Synchronizing sketchbook, pulling ..." process will start.
  7. Wait for the synchronization process to finish, as indicated by the appearance of a notification at the bottom right corner of the IDE window:

    Done pulling ...

  8. Double click on the sketch name in the "SKETCHBOOK" panel.
    The sketch will open in a new Arduino IDE window.
  9. Select the appropriate board from the IDE's Tools > Board > esp32 menu.
  10. Select the appropriate port from the IDE's Tools > Port menu.
  11. Select Sketch > Upload from the Arduino IDE menus.

The sketch should now upload successfully to the board.


Note that you can use Arduino IDE for development of Arduino Cloud Thing sketches. It is convenient to use the Arduino Cloud web interface for the initial setup of the Thing, but after that you can open the sketch in Arduino IDE for editing and uploading to your board. You will see newly created Thing sketches under the "Cloud Sketchbook" tab of the IDE's "SKETCHBOOK" panel after you click the "Sync" icon at the bottom right corner of the panel.


Please let me know if you have any questions or problems while following those instructions.

3 Likes