Please do this:File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OKSketch > UploadAfter the upload fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.Paste the error messages in a reply here USING CODE TAGS (</> button on the forum toolbar).
Try this:Press the reset button on your MKR WAN 1300 twice quickly. You should now see the built-in LED continuously pulsing to indicate that the bootloader is running.Select the port of the MKR WAN 1300 from the Tools > Port menu. It will probably have a different port when the bootloader is running so don't assume you already had the correct port selected.Attempt an upload.If things work out well, this will allow a successful upload. The hope is that after a successful upload using the "double-tap" technique, you will be able to upload normally. Please let me know what the results are.
In the Device Manager, although another COM port is active and I can change it
When you press the reset button, does the LED start pulsing?You were supposed to change the port in the Arduino IDE's Tools > Port menu, not Device Manager.Do you get the "Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy." error message, but with the bootloader's COM port instead of COM4?
Check that you're not running any programs that scan all serial ports, like USB Cellular Wifi Dongle software (e.g. from Sprint or Verizon), PDA sync applications, Bluetooth-USB drivers (e.g. BlueSoleil), virtual daemon tools, etc.