ArduinoIoTCloud - Cloud compile error, Mac IDE compiles fine -

Not sure if this is the right place for this and I haven’t been able to find any solutions in my searches the past couple days…

When setting up my MKR WIFI 1010 for the Arduino Cloud, I follow the standard procedure: add Device, it makes it Arduino Cloud IoT ready, I make a Thing (simple boolean for the builtin LED), associate it with the MKR WIFI 1010, make the Dashboard with a switch to turn the LED on/off, add my network credentials, etc. When I go to compile in the Cloud IDE, it throws an error relating to ArduinoIoTCloudTCP:

In file included from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.h:30:0,
from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:169,
from /run/arduino/sketches/MKRWIFI1010-TEST_nov01a/thingProperties.h:3,
from /run/arduino/sketches/MKRWIFI1010-TEST_nov01a/MKRWIFI1010-TEST_nov01a.ino:17:
/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/tls/utility/TLSClientMqtt.h:28:50: error: expected class-name before '{' token
class TLSClientMqtt : public WiFiBearSSLClient {
^
In file included from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.h:31:0,
from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:169,
from /run/arduino/sketches/MKRWIFI1010-TEST_nov01a/thingProperties.h:3,
from /run/arduino/sketches/MKRWIFI1010-TEST_nov01a/MKRWIFI1010-TEST_nov01a.ino:17:
/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/tls/utility/TLSClientOta.h:22:49: error: expected class-name before '{' token
class TLSClientOta : public WiFiBearSSLClient {
^
Multiple libraries were found for "WiFiNINA.h"
Used: /run/arduino/custom-libraries/WiFiNINA
Not used: /run/arduino/directories-data/internal/WiFiNINA_1.9.1_7cc9ca1b1de1ea6a
Not used: /run/arduino/directories-data/internal/VEGA_WiFiNINA_1.0.1_ab2db6059607e9f4
Not used: /run/arduino/directories-data/internal/BetterWiFiNINA_1.4.1_f1b425a2b2caf410
Multiple libraries were found for "SPI.h"
Used: /run/arduino/directories-data/packages/arduino/hardware/samd/1.8.13/libraries/SPI
Not used: /run/arduino/directories-data/internal/EventEthernet_1.0.0_bd9dd894ef7641f8
Multiple libraries were found for "ArduinoMqttClient.h"
Used: /run/arduino/custom-libraries/ArduinoMqttClient
Not used: /run/arduino/directories-data/internal/ArduinoMqttClient_0.1.8_b1e57bf359553881
Multiple libraries were found for "ArduinoHttpClient.h"
Used: /run/arduino/custom-libraries/ArduinoHttpClient
Not used: /run/arduino/directories-data/internal/ArduinoHttpClient_0.6.1_969df906691206c8
Multiple libraries were found for "Wire.h"
Used: /run/arduino/directories-data/packages/arduino/hardware/samd/1.8.13/libraries/Wire
Not used: /run/arduino/directories-data/internal/FlexWire_1.2.1_1fc5f1d1a14af0e7
Multiple libraries were found for "ECCX08.h"
Used: /run/arduino/custom-libraries/ArduinoECCX08
Not used: /run/arduino/directories-data/internal/RAK5814-ATECC608A_1.0.0_3080811c7019c906
Not used: /run/arduino/directories-data/internal/ArduinoECCX08_1.3.9_3034c586747c1bc6

So I am unable to compile/upload to the MKR WIFI 1010 with the Cloud IDE, which isn’t a deal-breaker except for the fact that I’d REALLY like to be able to upload sketches OTA.

However, if I pull the exact same files to my Mac IDE via the Cloud Sketchbook, it compiles just fine - no errors. It gets online and the switch turns the LED on/off in the Dashboard.

If I push those files (keep in mind, I’ve made no changes to them) back to the Cloud IDE and try to compile, I get the exact same errors.

I get these errors with everything I try to do with the Cloud IDE for Arduino IoT - meaning, I’ve tried the Cloud Blink Template and it does the same thing: won’t compile in the Cloud IDE and throws the errors above, but if I pull it to my Mac IDE it compiles fine and works.

This is really frustrating. My IDE is up to date, my MKR WIFI 1010 firmware is up to date, the libraries on my Mac IDE are up to date. I can’t figure it out. The AI agent offered (questionable) some suggestions that I tried, but still no luck.

The only thing I’ve seen posted close to this issue mentions board packages. I’m not sure if the Cloud IDE is using a different one and that’s causing the problem - but I have no idea how to check the board package the Cloud IDE might be using. On my Mac IDE they’re all up to date.

Curious if anyone has or is having the same issue and if they might share how they fixed it?

Hi @bgbetz.

I see you have imported several libraries to your Arduino Cloud account that are dependencies of the Thing sketch. I suspect it is something about these libraries you imported that is causing the problem. The standard versions of these libraries are preinstalled in Arduino Cloud, and the Thing sketches are meant to be compiled with the standard version of the libraries.

If you don't need these copies of the libraries for use with other projects, and you didn't have a specific reason for importing them to your Arduino Cloud account, then I recommend deleting them from your account. I'll provide instructions you can follow to do that:

  1. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login

  2. Open your Thing sketch in Arduino Cloud.

  3. Click the icon that looks like shelved books ("Libraries") in the bar on the left side of the Cloud Editor page.
    The "Libraries" panel will open.

  4. Select the "Custom" tab from the "Libraries" panel.

  5. You will see text near the top of the panel:

    Show libraries for:
    <board name>

    (where <board name> is the name of the board you have selected in Arduino Cloud Editor)
    Click the board name in that text.
    The text will now change to:

    Show libraries for:
    ALL DEVICES

  6. Scroll down through the list of custom libraries until you find the entry for the "WiFiNINA" library.

  7. Hover the mouse pointer over the "WiFiNINA" entry.
    A icon will appear to the right of the library name.

  8. Click the icon to the right of the library name.
    A menu will open.

  9. Select "Delete Library" from the menu.
    A "Delete custom library" dialog will open.

  10. Click the "YES, DELETE" button in the dialog.

  11. Repeat steps 6 - 10 for the following libraries:

    • "ArduinoMqttClient"
    • "ArduinoHttpClient"
    • "ArduinoECCX08"

Now try compiling or uploading your sketch again. Hopefully this time everything will work as expected.


If you do truly need these imported custom versions of the libraries, or if you have any problems while trying to delete them, just let us know and we'll provide further assistance.

Thanks for your prompt response!

I did as you instructed for those 4 libraries:

WiFiNINA

ArduinoMqttClient

ArduinoHttpClient

ArduinoECCX08

All of them still had “Include” next to them, not “Remove” so I’m not sure if they were even installed?

At any rate, I compiled again, but still get the following errors:

/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.cpp: In constructor 'ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()':
/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.cpp:65:32: error: no matching function for call to 'MqttClient::MqttClient()'
, _get_ota_confirmation{nullptr}
^
In file included from /var/run/arduino/custom-libraries/ArduinoMqttClient/src/ArduinoMqttClient.h:23:0,
from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.h:20,
from /var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.cpp:19:
/var/run/arduino/custom-libraries/ArduinoMqttClient/src/MqttClient.h:37:3: note: candidate: MqttClient::MqttClient(arduino::Client&)
MqttClient(Client& client);
^~~~~~~~~~
/var/run/arduino/custom-libraries/ArduinoMqttClient/src/MqttClient.h:37:3: note:   no known conversion for argument 1 from 'std::nullptr_t' to 'arduino::Client&'
/var/run/arduino/custom-libraries/ArduinoMqttClient/src/MqttClient.h:35:7: note: candidate: MqttClient::MqttClient(const MqttClient&)
class MqttClient : public Client {
^~~~~~~~~~
/var/run/arduino/custom-libraries/ArduinoMqttClient/src/MqttClient.h:35:7: note:   no known conversion for argument 1 from 'std::nullptr_t' to 'const MqttClient&'
/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.cpp: In member function 'int ArduinoIoTCloudTCP::begin(bool, arduino::String, uint16_t, bool)':
/var/run/arduino/directories-user/libraries/ArduinoIoTCloud/src/ArduinoIoTCloudTCP.cpp:144:15: error: 'class MqttClient' has no member named 'setClient'; did you mean 'MqttClient'?
_mqttClient.setClient(_brokerClient);
^~~~~~~~~
MqttClient
Multiple libraries were found for "WiFiNINA.h"
Used: /run/arduino/directories-data/internal/WiFiNINA_1.9.1_7cc9ca1b1de1ea6a
Not used: /run/arduino/directories-data/internal/VEGA_WiFiNINA_1.0.1_ab2db6059607e9f4
Not used: /run/arduino/directories-data/internal/BetterWiFiNINA_1.4.1_f1b425a2b2caf410
Multiple libraries were found for "ArduinoMqttClient.h"
Used: /run/arduino/custom-libraries/ArduinoMqttClient
Not used: /run/arduino/directories-data/internal/ArduinoMqttClient_0.1.8_b1e57bf359553881
Multiple libraries were found for "Wire.h"
Used: /run/arduino/directories-data/packages/arduino/hardware/samd/1.8.13/libraries/Wire
Not used: /run/arduino/directories-data/internal/FlexWire_1.2.1_1fc5f1d1a14af0e7
Multiple libraries were found for "ECCX08.h"
Used: /run/arduino/directories-data/internal/ArduinoECCX08_1.3.9_3034c586747c1bc6
Not used: /run/arduino/directories-data/internal/RAK5814-ATECC608A_1.0.0_3080811c7019c906
Multiple libraries were found for "SPI.h"
Used: /run/arduino/directories-data/packages/arduino/hardware/samd/1.8.13/libraries/SPI
Not used: /run/arduino/directories-data/internal/EventEthernet_1.0.0_bd9dd894ef7641f8

Thank you again for your your time!

You did not follow the instructions correctly. You forgot to perform step 4:

Please try again, this time being very careful to follow the instructions exactly.

If you have any questions or problems while following the instructions, just let us know and we'll provide further assistance.

Yep. I missed deleting ArduinoMqttClient.

That did the trick!

Thank you for responding and thank you again for your patience!

You are welcome. I'm glad it is working now.

Regards, Per