I went to upload my sketch to my Uno (r3), but unusually, the Upload Console returned this error:

avrdude: ser_open(): can't open device "\\.\COM4": Access is denied.

Just started seeing this, cannot upload.

  • 1
    I had Ultimaker Cura open, this seemed to be hogging the com ports. Make sure your other apps aren't using them.
    – aaa
    Dec 29, 2019 at 23:51
  • I can confirm here that for me it was also Ultimaker Cura. Once closed, COM port was free again. I think it's worth a try, if all the other things look ok (i.e. checking the device manager).
    – marco
    May 2, 2021 at 2:23

3 Answers 3


There might be another device has already connected to that port. It could even be a terminal emulator which is left connected from last debugging session.

Otherwise, make sure that your UNO is really presented on COM4 by checking with "Device Manager". if not, change the port where it is available.

  • 4
    Mine was locked down by Cura - a program that will (among other things) control 3D printers via serial. Closing it fixed the problem
    – Chris
    Jun 12, 2019 at 12:16
  • 1
    @Chris thanks a lot, same problem
    – Heetola
    Dec 15, 2019 at 13:27
  • Yes - be careful Cura seems to do this.
    – Kenn
    Jan 28, 2020 at 17:49
  • same thing here with Cura, that is way wrong I don't even have a 3d printer plugged in so .. I'm going into Slic3r then
    – pjnovas
    Feb 27, 2021 at 22:14
  • In my case, I simply forgot to close "Serial Monitor" window for another Arduino sketch, and that was it. Jun 10, 2021 at 13:55

I'm using a windows 10 and had this happen randomly. I closed several other applications and it started working again.

  • How did you find out what other applications are using this port? Oct 16, 2020 at 3:52
  • I guessed. I was using my USB drive for some other things and just started closing stuff.
    – cagney
    Oct 24, 2020 at 6:15
  • Worked for me by just closing File Explorer and Cura not sure which one was the problem. Jan 7, 2022 at 17:00

You have selected the wrong COM port. Go to Tools -> Port -> Select the right port. If you do not know the port number disconnect the Arduino, open the same menu again and look what is listed there, write down if you can't remember, now plug your Arduino back in and select the option that wasn't there before.

Not the answer you're looking for? Browse other questions tagged or ask your own question.