I'm using a nano esp32 board and I'm also experiencing the same problem as you, have you solved it yet?
Here is my code:
// Code generated by Arduino IoT Cloud, DO NOT EDIT.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
const char DEVICE_LOGIN_NAME[] = "*************";
const char SSID[] = SECRET_SSID; // Network SSID (name)
const char PASS[] = SECRET_OPTIONAL_PASS; // Network password (use for WPA, or use as key for WEP)
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
void onWeightChange();
void onIscloseChange();
void onIsopenChange();
float Weight;
bool isclose;
bool isopen;
void initProperties(){
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(Weight, READWRITE, ON_CHANGE, onWeightChange);
ArduinoCloud.addProperty(isclose, READWRITE, ON_CHANGE, onIscloseChange);
ArduinoCloud.addProperty(isopen, READWRITE, ON_CHANGE, onIsopenChange);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
In my serial port information it shows that I'm connected to the wireless network, but in the Arduino Cloud interface it shows that my device is still offline.