In file included from /tmp/406192007/Controller_code/variable.h:13,
from /tmp/406192007/Controller_code/Controller_code.ino:1:
/tmp/406192007/Controller_code/thingProperties.h:8:35: error: 'SECRET_SSID' was not declared in this scope
const char SSID[] = SECRET_SSID; // Network SSID (name)
^~~~~~~~~~~
/tmp/406192007/Controller_code/thingProperties.h:8:35: note: suggested alternative: 'ESP_RST_SDIO'
const char SSID[] = SECRET_SSID; // Network SSID (name)
^~~~~~~~~~~
ESP_RST_SDIO
/tmp/406192007/Controller_code/thingProperties.h:9:35: error: 'SECRET_OPTIONAL_PASS' was not declared in this scope
const char PASS[] = SECRET_OPTIONAL_PASS; // Network password (use for WPA, or use as key for WEP)
^~~~~~~~~~~~~~~~~~~~
/tmp/406192007/Controller_code/thingProperties.h:10:28: error: 'SECRET_DEVICE_KEY' was not declared in this scope
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
^~~~~~~~~~~~~~~~~
/tmp/406192007/Controller_code/thingProperties.h:10:28: note: suggested alternative: 'DEVICE_KEY'
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
^~~~~~~~~~~~~~~~~
DEVICE_KEY
/tmp/406192007/Controller_code/Controller_code.ino: In function 'void setup()':
/tmp/406192007/Controller_code/Controller_code.ino:30:3: error: 'preferredConnectionHandler' was not declared in this scope
preferredConnectionHandler(ssid, pass);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/406192007/Controller_code/Controller_code.ino:30:3: note: suggested alternative: 'WiFiConnectionHandler'
preferredConnectionHandler(ssid, pass);
^~~~~~~~~~~~~~~~~~~~~~~~~~
WiFiConnectionHandler
Multiple libraries were found for "HTTPClient.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/HTTPClient
Not used: /home/builder/opt/libraries/free_espathome_0_0_12
Not used: /home/builder/opt/libraries/indhilib_3_0_5
Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_1_0
Multiple libraries were found for "Arduino_JSON.h"
Used: /home/builder/opt/libraries/arduino_json_0_2_0
Not used: /home/builder/opt/libraries/motorgo_mini_driver_1_1_0
Multiple libraries were found for "Adafruit_Sensor.h"
Used: /home/builder/opt/libraries/adafruit_unified_sensor_1_1_14
Not used: /home/builder/opt/libraries/arduav_1_4_2
Multiple libraries were found for "WebServer.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/WebServer
Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_1_0
Multiple libraries were found for "Preferences.h"
Used: /mnt/create-efs/webide/f8/08/f80845f9607a6e14e07d0b9fe7bb4955:josuakok/libraries_v2/Preferences
Not used: /home/builder/opt/libraries/preferences_2_1_0
Not used: /home/builder/opt/libraries/preferences_2_1_0
Not used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/Preferences
Multiple libraries were found for "WiFiClient.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/WiFi
Not used: /home/builder/opt/libraries/vulintus_atwinc3400_0_1_0
Not used: /home/builder/opt/libraries/nina_wi_fi_1_0_1
Not used: /home/builder/opt/libraries/betterwifinina_1_3_0
Not used: /home/builder/opt/libraries/da16200_wi_fi_library_for_arduino_1_1_0
Not used: /home/builder/opt/libraries/wifi101_generic_1_0_0
Not used: /home/builder/opt/libraries/wifiespat_1_4_4
Not used: /home/builder/opt/libraries/wifi_link_1_0_1
Not used: /home/builder/opt/libraries/wifi_1_2_7
Not used: /home/builder/opt/libraries/wifi101_0_16_1
Not used: /home/builder/opt/libraries/wifinina_1_8_14
Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1
Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_1_0
Multiple libraries were found for "WiFiClientSecure.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/WiFiClientSecure
Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_1_0
Multiple libraries were found for "SPI.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/SPI
Not used: /home/builder/opt/libraries/eventethernet_1_0_0
Multiple libraries were found for "WiFiManager.h"
Used: /mnt/create-efs/webide/f8/08/f80845f9607a6e14e07d0b9fe7bb4955:josuakok/libraries_v2/WiFiManager
Not used: /home/builder/opt/libraries/wifimanager_2_0_17
Not used: /home/builder/opt/libraries/wharehauorawifimanager_0_15_0
Multiple libraries were found for "Adafruit_BusIO_Register.h"
Used: /home/builder/opt/libraries/adafruit_busio_1_16_1
Not used: /home/builder/opt/libraries/vegaiot_busio_1_0_0
Multiple libraries were found for "Wire.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/Wire
Not used: /home/builder/opt/libraries/flexwire_1_2_1
Multiple libraries were found for "DNSServer.h"
Used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.17/libraries/DNSServer
Not used: /home/builder/opt/libraries/seeed_arduino_rpcwifi_1_1_0
Error during build: exit status 1
Disclaimer: I do not know anything about the IoT Cloud and I do not know anything about ESP32 based devices.
The board detection has no relationship (as far as I can see) with the errors that you did post. If you did rely on some form of automatic detection, select the board manually; I have no idea how to do that in the IoT Cloud.
I suggest that you post your full sketch so those in the know might be able to help.
The "incorrect" detection is probably because both boards have the same USB VID and PID so the "IDE" can not differentiate between them.
Start fixing the compile errors one at a time starting with the first. At sojme point you will get to the errors that indicate missing libraries. Install them using IDE Library Manager. The duplicates msg is just info in MOST cases, move on for now.
This error indicates you have not configured the network credentials for your Arduino Cloud IoT Thing. Please follow these instructions to configure the credentials:
Open the Thing in Arduino Cloud.
Click the "Configure" button under the "Network" section of the page.
The "Configure network" dialog will open.
Type the SSID of your Wi-Fi router's 2.4 GHz access point in the "Wi-Fi Name" field of the dialog.
Type the password of your Wi-Fi router's access point in the "Password" field.
Type the secret key that was provided during the Arduino Cloud IoT Device setup process in the "Secret Key" field.
Click the "SAVE" button.
The "Configure network" dialog will close.
Now try uploading the Thing sketch to your ESP32 board again. Hopefully this time it will compile without any errors.