Cannot upload sketch using Arduino Cloud COM port issue

I'm a long time Arduino user and I'm just looking at using the Arduino Cloud Dashboard. So I'm using the Cloud IDE. I added a new device (MKR1010) successfully, have the Agent installed, created a very simple dashboard (doesn't really matter this this point), created a Thing (also doesn't really matter), and tried to upload the sketch that the system built for me.

When I try to upload, I get the following error:

/usr/local/bin/arduino-cli compile --fqbn arduino:samd:mkrwifi1010 --build-cache-path /tmp --output-dir /tmp/3107547542/build --build-path /tmp/arduino-build-A6F203315198F94007151A4E655709D4  --library /mnt/create-efs/webide/96/ab/96abf2e47368fe4b461dc70b0f4ddb93:IraSch/libraries_v2/ILI9488 --library /mnt/create-efs/webide/96/ab/96abf2e47368fe4b461dc70b0f4ddb93:IraSch/libraries_v2/Nick-Gammon-RS485 --library /mnt/create-efs/webide/96/ab/96abf2e47368fe4b461dc70b0f4ddb93:IraSch/libraries_v2/RAK14014-FT6336U /tmp/3107547542/Alarm_Panel_nov09a
[info] Sketch uses 97304 bytes (37%) of program storage space. Maximum is 262144 bytes.
[info] Global variables use 5468 bytes (16%) of dynamic memory, leaving 27300 bytes for local variables. Maximum is 32768 bytes.

Restarting in bootloader mode
Flashing with command:C:/Users/Ira/.arduino-create/arduino/bossac/1.7.0-arduino3/bossac.exe -i -d --port=COM3 -U true -i -e -w -v C:/Users/Ira/AppData/Local/Temp/arduino-create-agent1434148940/Alarm_Panel_nov09a.bin -R
Set binary mode
No device found on COM3
Send auto-baud
Set binary mode
Executing command: exit status 1

It looks like the issue is that the Agent/IDE is looking for the MKR1010 on COM3, but it is really on COM8 (verified using my standalone IDE that I normally use. Note that I'm not trying to use the standalone IDE at the same time - I just fired it up after I got the above error to verify which COM port the MKR1010 was on.

Is there a way to tell the Cloud IDE or Agent where the device is?

I uninstalled and reinstalled the Agent just in case. The Cloud IDE says the MKR1010 is offline.
THanks.

Hi @IraSch. This error can occur when the port is open in another application. Only one application can have a serial port open at a time so Arduino Cloud Editor can't perform an upload under these conditions.

Check to see whether you have any applications running on your computer that might use the port. If they are, close them and then try the upload again. This includes Arduino IDE, as if its Serial Monitor is open then the port will be blocked.

If there aren't any other applications using the port, add a reply here on this forum thread to let us know.

I don't think so. At the start of the upload phase, Cloud Editor sends a special signal to the Arduino board which tells it to go into the mode where it can accept the upload. The board presents itself as a different USB device when in this boot mode than it does when in the normal mode where it runs the sketch program. This causes the operating system to assign it a different port number when in boot mode.

So it is expected that the serial port number used by the upload tool is different from the one you have selected (the board will switch back to the original port number after the upload finishes), and for that port number to be shown in the error message if the upload fails. The presence of the unexpected port number in the error message can "red herring" that sidetracks us when troubleshooting an upload failure.

Thanks for the clarification. There were no other applications open that might use the COM port. I was able to get past it by rebooting - twice. Don't ask me why it took 2 reboots to clear the problem, but I'm just happy that things are working again.

Great news! Thanks for taking the time to post an update with your findings.

Regards, Per