can't upload skecht to Leonardo, error: processing.app.debug.RunnerException

Hi,

I recently purchased an Arduino Leonardo clone from diyware.cc. Everytime I try to upload a sketch this error pops up:

processing.app.debug.RunnerException 
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
    at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
    at processing.app.SketchController.upload(SketchController.java:732)
    at processing.app.SketchController.exportApplet(SketchController.java:703)
    at processing.app.Editor$UploadHandler.run(Editor.java:2091)
    at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Fehler beim Ansprechen des seriellen Ports "COM6".
    at processing.app.Serial.touchForCDCReset(Serial.java:107)
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
    ... 5 more
Caused by: jssc.SerialPortException: Port name - COM6; Method name - openPort(); Exception type - Port busy.
    at jssc.SerialPort.openPort(SerialPort.java:164)
    at processing.app.Serial.touchForCDCReset(Serial.java:101)
    ... 6 more

I'm pretty sure the "port busy" error is not true because this also happens when no other program is running.

In the device manager this error shows:

svchost (6336,R,98) TILEREPOSITORYS-1-5-18: Fehler -1023 (0xfffffc01) beim Öffnen von Protokolldatei C:\WINDOWS\system32\config\systemprofile\AppData\Local\TileDataLayer\Database\EDB.log.

rough translation:

svchost (6336,R,98) TILEREPOSITORYS-1-5-18: Error -1023 (0xfffffc01) while opening log file C:\WINDOWS\system32\config\systemprofile\AppData\Local\TileDataLayer\Database\EDB.log.

I already tried reinstalling the IDE. I'm on Windows 10 and I'm using Arduino IDE version 1.8.10 (although the error also happens with the newest version)

What could the problem be, the only solutions I found on the internet where Linux based

Try restarting your computer. Sometimes a glitch will cause the port to get stuck open and the restart fixes it.

already tried it multiple times.

could this actually be caused by a faulty board?

I don't know of any circumstances under which a faulty board could cause this. Is COM6 labeled as Arduino Leonardo under the Arduino IDE's Tools > Port menu?

Yes

My suspicion now is that there is some other application on your computer that is automatically opening that port. I think that issue used to be common due to some Bluetooth drivers or something that assumed it had ownership over any port.

On Linux, there is a "modemmanager" program that causes this sort of issue, but of course that specific program is not the issue for a Windows user.

So I don't know how to direct you in your search, but just consider this possibility and see if you can think of any applications you have loaded that might have this behavior.

ok, so I've changed the port in the device manager to COM5 and COM10. COM5 is used when I plug in an Arduino UNO and COM 10 was never used.

This time the error message changed:

processing.app.debug.RunnerException
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
    at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
    at processing.app.SketchController.upload(SketchController.java:732)
    at processing.app.SketchController.exportApplet(SketchController.java:703)
    at processing.app.Editor$UploadHandler.run(Editor.java:2091)
    at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Fehler beim Ansprechen des seriellen Ports "COM5".
    at processing.app.Serial.touchForCDCReset(Serial.java:107)
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
    ... 5 more
Caused by: jssc.SerialPortException: Port name - COM5; Method name - openPort(); Exception type - Port not found.
    at jssc.SerialPort.openPort(SerialPort.java:167)
    at processing.app.Serial.touchForCDCReset(Serial.java:101)
    ... 6 more

The same error happens when using COM10 (or any other port). what does "Port name - COM5; Method name - openPort(); Exception type - Port not found." mean?

Try restarting your computer. I remember I had to do that after changing the port of a device in Device Manager.