CreateProcess error when uploading ESP32 IoT Cloud code from Arduino IDE

Hi everyone,

I'm encountering an issue when trying to upload a sketch to my ESP32 board via Arduino IDE. Here’s the error that keeps coming up:
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory

Here’s some context to clarify the situation:

  1. Other sketches upload perfectly through both Arduino IDE and Arduino IoT Cloud.
  2. This error only occurs when I try to upload a code from Arduino IDE that connects to Arduino IoT Cloud.
  3. I’m using Arduino IDE specifically because Arduino IoT Cloud doesn’t support the FastLED library, which I need for this project.
    Here’s the code I’m trying to upload (credentials omitted for privacy):
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
#include <WiFi.h>

// WiFi credentials
const char SSID[] = "wifi_ssid";
const char PASS[] = "wifi_password";

// Arduino IoT Cloud credentials
const char DEVICE_ID[] = "device_id";

// Cloud variable
String effetti;

// LED pin configuration
const int LED_PIN = 2; // Built-in LED on ESP32
void onEffettiChange() {
    Serial.print("The 'effetti' variable has changed. New value: ");
    Serial.println(effetti);
}
void setup() {
    Serial.begin(115200);
    // LED setup
    pinMode(LED_PIN, OUTPUT);
    digitalWrite(LED_PIN, LOW);

    // Connect to Wi-Fi
    WiFi.begin(SSID, PASS);
    while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.println("Connecting to WiFi...");
    }
    Serial.println("Connected to WiFi!");

    // Configure Arduino IoT Cloud connection
    ArduinoCloud.setThingId(DEVICE_ID);
    ArduinoCloud.addProperty(effetti, READWRITE, ON_CHANGE, onEffettiChange);
    WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
    ArduinoCloud.begin(ArduinoIoTPreferredConnection);
}
void loop() {
    // Maintain connection to the Cloud
    ArduinoCloud.update();

    // Check Cloud connection status
    if (ArduinoCloud.connected()) {
        digitalWrite(LED_PIN, HIGH); // Turn on LED when connected
    } else {
        digitalWrite(LED_PIN, LOW); // Turn off LED if disconnected
    }
}

Any advice on troubleshooting this error would be greatly appreciated. Thanks!

  1. Is it a safe bet that you are using Windows?
  2. Which exact ESP32 board have you selected in the IDE?
  3. Which version of the IDE?
  4. Which version of the ESP32 board package? If you don't know, the first few lines of the verbose output will tell you.

OOPS, I now noticed that you have posted this in the Nano ESP32 section of the forum. Is that indeed the board that you use?

1 Like

Based on the fact that you posted in the Nano ESP32 section on the forum, please rename the installation directory of the core.

Assuming Windows and are using the latest version of the Nano ESP32 board package,

  1. Close the IDE.
  2. Navigate to C:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\hardware\esp32.
  3. Rename the directory 2.0.18-20240930.arduino3 to something shorter, e.g. 2.0.18-rc3.
  4. Start the IDE.

This is a known issue; see e.g. ESP32 Nano core 2.0.18 does not compile due to long core folder name 2.0.18-20240930.arduino3 · Issue #2716 · arduino/arduino-cli · GitHub.

1 Like

Thanks a lot, now it works.