# Failed Upload Ide 2.0

**URL:** <https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972>\
**Category:** IDE 2.x\
**Created:** [August 3, 2022, 7:07pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972 "2022-08-03T19:07:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpondy](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cpondy](https://forum.arduino.cc/u/cpondy)\
**Post date:** [August 3, 2022, 7:07pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/1 "2022-08-03T19:07:49Z")

</div>

I continually get an error when trying to upload with the new IDE. There are no compile issues and the code uploads fine with the old IDE. Occasionally, the 2.0 will upload. This typically happens after closing and reopening the app and using the tools menu to select the port and board instead of the automatic drop down menu. Currently, the port options list old ports that are now not connected. Plugging in to a new port does not updated the port list.

Below are 2 different error messages that I get. The first is basic and appears when the IDE cannot see the correct ports. The second is the typical message I get when uploading. The code is not relevant for this issue. I'm sorry for any formatting issues, this is my first post, please point them out so I can correct it for the future. Thank you for the help.

Failed uploading: uploading error: exit status 1  
avrdude: Version 6.3-2019

Failed uploading: uploading error: exit status 1  
avrdude: Version 6.3-2"C:\Users\cpond\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\cpond\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cjtag2updi -PCOM19 -b115200 -e -D "-Uflash:w:C:\Users\cpond\AppData\Local\Temp\arduino-sketch-BCD65BDE18A1DAADE884A047F38A18BF/2691\_Nano\_Every\_copy\_20220715102933.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" {upload.extra\_files}

---

<div class="post-metadata">

**Author:** ![scberthe](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/scberthe/32/811340_2.png) [@scberthe](https://forum.arduino.cc/u/scberthe)\
**Post date:** [August 3, 2022, 8:18pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/2 "2022-08-03T20:18:37Z")

</div>

I had exactly the same situation.

After much poking around I found and followed the process found at this link [https://support.arduino.cc/hc/en-us/articles/4407830972050-Find-and-stop-process-blocking-a-port](https://support.arduino.cc/hc/en-us/articles/4407830972050-Find-and-stop-process-blocking-a-port)

That fixed it.

Be forewarned I am a grizzled tech guy, but a week into my Arduino Uno adventure so buyer beware!

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [August 3, 2022, 10:54pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/3 "2022-08-03T22:54:50Z")

</div>

Hi @cpondy. Thanks for giving the Arduino IDE 2.0.0 release candidate a try, and for your report. Thanks also to @scberthe for your valuable advice.

There is a bug in Arduino IDE 2.0.0-rc9.1 that causes uploads to fail when Serial Monitor is open:

> <https://github.com/arduino/arduino-ide/issues/1278>
>
> \### Describe the problem
> 
> The Arduino IDE uses the serial ports of Arduino boa…rds in two different ways:
> 
> \- Uploading sketches
> \- Communication via \*\*Serial Monitor\*\*
> 
> The port can not be used for both of these things simultaneously. Rather than imposing the inconvenience of juggling the port usage on the user the Arduino IDE is intended to handle the condition of \*\*Serial Monitor\*\* being open when an upload is started automatically like so:
> 
> 1. Close port in \*\*Serial Monitor\*\*
> 2. Complete upload process
> 3. Reopen port in \*\*Serial Monitor\*\*
> 
> 🐛 Uploading fails when the \*\*Serial Monitor\*\* is open, indicating the port handling is not working correctly.
> 
> \### To reproduce
> 
> 1. Connect an Arduino board to your computer.
> 1. Select the appropriate board and port in the Arduino IDE.
> 1. Open \*\*Serial Monitor\*\* in the Arduino IDE.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 
> 🐛 The upload fails with an error like:
> 
> \`\`\`text
> Failed uploading: uploading error: exit status 1avrdude: ser\_open(): can't open device "\\\\.\\COM61": Access is denied.
> \`\`\`
> 
> \### Expected behavior
> 
> Having Serial Monitor open does not interfere with uploading.
> 
> \### Arduino IDE version
> 
> 2.0.0-rc9.1
> 
> \### Operating system
> 
> Windows
> 
> \### Operating system version
> 
> 10
> 
> \### Additional context
> 
> I bisected the introduction of the issue to https://github.com/arduino/arduino-ide/commit/e156dcc213221489241669f076937a1642a2ab16 / https://github.com/arduino/arduino-ide/pull/1260
> 
> \---
> 
> Originally reported tangentially at https://github.com/arduino/arduino-ide/issues/581#issuecomment-1203193020
> 
> \---
> 
> It may be the same issue as reported at https://github.com/arduino/arduino-ide/issues/1277, but there is currently insufficient information there to be able to say.
> 
> UPDATE: per https://github.com/arduino/arduino-ide/issues/1277#issuecomment-1203738489, https://github.com/arduino/arduino-ide/issues/1277 does not have Serial Monitor as a required condition, which indicates these are two separate issues.
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous reports in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the problem still occurs when using the latest \[nightly build\](https://github.com/arduino/arduino-ide#nightly-builds)
> \- \[X\] My report contains all necessary details

This bug has already been fixed and will be available in tonight's [nightly build of the Arduino IDE 2.x](https://www.arduino.cc/en/software/#nightly-builds). Until then, please make sure to close Serial Monitor before uploading as a workaround for the bug:

![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/4/4/c44aef6adac5f076f307a35d139bde315f89d532.png)

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [August 4, 2022, 5:17am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/4 "2022-08-04T05:17:27Z")

</div>

The fix for the bug that caused uploads to fail when Serial Monitor is open is now available from the latest nightly build of Arduino IDE 2.x.

The download links for the nightly build are listed on the " **Software**" page here:

[https://www.arduino.cc/en/software/#nightly-builds](https://www.arduino.cc/en/software/#nightly-builds)

---

<div class="post-metadata">

**Author:** ![cpondy](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cpondy](https://forum.arduino.cc/u/cpondy)\
**Post date:** [August 4, 2022, 5:52pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/5 "2022-08-04T17:52:05Z")

</div>

Thank you for your help, it was the Serial Monitor issue and it's fixed with the new update.

---

<div class="post-metadata">

**Author:** ![wezz19](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wezz19/32/1100501_2.png) [@wezz19](https://forum.arduino.cc/u/wezz19)\
**Post date:** [August 5, 2022, 11:52am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/6 "2022-08-05T11:52:19Z")

</div>

I had this multiple times today on the latest nightly. Pressing upload again worked for me each time.

Failed uploading: uploading error: exit status 1avrdude: ser\_open(): can't open device "\.\COM3": Access is denied.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [August 5, 2022, 9:47pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/7 "2022-08-05T21:47:10Z")

</div>

Hi @wezz19. Thanks for your report. The fix is already in the latest nightly, so uploads failing are unexpected.

Please provide me with instructions I can follow to reproduce the issue. Include the names of whichever boards you are using since it is possible it could be specific to certain boards.

---

<div class="post-metadata">

**Author:** ![wezz19](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wezz19/32/1100501_2.png) [@wezz19](https://forum.arduino.cc/u/wezz19)\
**Post date:** [August 6, 2022, 7:58am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/8 "2022-08-06T07:58:48Z")

</div>

Strangely the IDE works without issues today. Only tested for 5 mins though.

Yesterday it didn't want to detect the COM port so the usual unplug/ reconnect worked but uploads failed every single time and worked most of times if I pressed the upload button again.  
I also restarted the computer a few times but still the same issues. Plus one time when I started the IDE there was a warning that the language server wasn't running. That was fixed by restarting the IDE.

Since I can't reproduce it today it could have been something with the computer maybe. I will do more testing maybe tomorrow if I have time. This happened with a crowduino nano. But if it happens again I will test with an official Micro and Uno also just to make sure it's not something with this board. (Win10 21H2 fully updated)

---

<div class="post-metadata">

**Author:** ![wezz19](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wezz19/32/1100501_2.png) [@wezz19](https://forum.arduino.cc/u/wezz19)\
**Post date:** [August 9, 2022, 8:44pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/9 "2022-08-09T20:44:47Z")

</div>

Did some testing today (with the same computer and nightly build) and after about one hour, and about 10 uploads maybe, the uploads started failing for the nano. They failed about 30-50% of times when I pressed upload. Like before, another press on upload was successful, except for the first time it failed. That time the upload only worked on the third try.

Then I switched to an official Uno, which didn't get the same COM port though. Uploaded over 5 times but it never failed. Then I switched back to the nano and uploaded over 5 times but everything worked.

I wonder if something is reset when switching boards. So maybe I need to test with the Uno for over an hour.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [August 10, 2022, 5:21am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/10 "2022-08-10T05:21:47Z")

</div>

Hi @wezz19. Thanks for your report.

The next time you encounter the issue, please post the full upload output here. It might contain some useful information about the problem.

I normally request the verbose upload output in this case, but unfortunately there is currently [a bug](https://github.com/arduino/arduino-cli/issues/1818) that can sometimes make the verbose output even less informative than the non-verbose, so if possible please provide the output from a failed upload with and without the **Show verbose output during: ☐ upload** preference enabled.

I'll provide instructions for doing so:

1. Select **File \> Preferences** from the Arduino IDE menus.
2. Uncheck the checkbox next to **Show verbose output during: `☑` compilation**
3. Check the checkbox next to **Show verbose output during: ☐ upload**.
4. Click the **OK** button.
5. Attempt an upload, as you did before.
6. After the upload fails, right click on the black "Output" pane at the bottom of the Arduino IDE 2.x window.
7. From the context menu, click **Copy All**.  
This [copies](https://lifehacker.com/how-to-copy-cut-and-paste-for-beginners-5801525) the full output to the clipboard.
8. Open a forum reply here by clicking the **Reply** button.
9. Click the **`</>`** icon on the post composer toolbar.  
This will add the forum's code block markup ( **`````** ) to your reply to make sure the error messages are correctly formatted.  
 ![Code block](https://europe1.discourse-cdn.com/arduino/original/4X/f/e/6/fe69215028670401f2036b05ce6a7d1ddd7bafa3.png)
10. Press **Ctrl+V**.  
This will [paste](https://lifehacker.com/how-to-copy-cut-and-paste-for-beginners-5801525) the error output from the upload into the code block.
11. Move the cursor outside of the code tags before you add any additional text to your reply.
12. Click the **Reply** button to post the output.

There is another report of uploads failing when using the Arduino IDE 2.x nightly build here:

> <https://github.com/arduino/arduino-ide/issues/1306>
>
> \### Describe the problem
> 
> After using the IDE for some time, the IDE decides tha…t even though \_itself\_ identified the board/port, the board/port in question does not exist according to the uploader. In the present issue, I have used a MKR WIFI 1010 and replicated the problem with another (new) board as well. This issue has been present on multiple computers, and is usually fixed by restarting the PC.
> 
> A video demonstration of the issue with the first board (COM18)
> \[Screen sharing - 2022-08-08 5 49 21 PM.webm\](https://user-images.githubusercontent.com/75624145/183467012-f6f1c836-09a3-49df-bd10-252c6d0f95d5.webm)
> 
> Screenshots of IDE 2.0.0-rc9.1 with second board (COM17)
> !\[image\](https://user-images.githubusercontent.com/75624145/183467205-7cd8e078-c49e-4d0e-a071-1dccfcca3e2b.png)
> 
> Screenshots of IDE 1.8.19 with second board (COM17)
> !\[image\](https://user-images.githubusercontent.com/75624145/183467337-5b3e173b-c4e0-4140-991e-d7e838dbde78.png)
> 
> 
> 
> \### To reproduce
> 
> 1. Use the IDE 2.x for some period of time
> 2. Connect the MKR WIFI 1010 (without a battery)
> 3. Make sure that the board and port are correctly selected
> 4. Click on upload
> 5. The message \`Failed uploading: uploading error: exit status 1 No device found on COMXX\` is shown.
> 6. Close window and open blink sketch in IDE 1.x
> 7. After selecting board/port, upload again
> 8. You will get the same error.
> Bonus: Use another board and do steps 1-9 again
> 
> \### Expected behavior
> 
> The code is uploaded and the message \`Failed uploading: uploading error: exit status 1 No device found on COMXX\` is not shown in the outlet.
> 
> \### Arduino IDE version
> 
> Tested with: Arduino IDE 2.0.0-rc9.1 & Arduino IDE 1.8.19
> 
> \### Operating system
> 
> Windows
> 
> \### Operating system version
> 
> Windows 10
> 
> \### Additional context
> 
> \_No response\_
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous reports in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the problem still occurs when using the latest \[nightly build\](https://github.com/arduino/arduino-ide#nightly-builds)
> \- \[X\] My report contains all necessary details

---

<div class="post-metadata">

**Author:** ![wezz19](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wezz19/32/1100501_2.png) [@wezz19](https://forum.arduino.cc/u/wezz19)\
**Post date:** [August 14, 2022, 5:33pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/11 "2022-08-14T17:33:50Z")

</div>

Up until quite recently I always thought verbose meant something written in capital letters 😅.  
Yeah I saw that bug report but it mentioned that the port was not found. In my case it is but access is denied for some reason.

I have been doing some testing for a few hours with the official Uno with rc9.2, but no issues at all. And I tested on both my computers. Haven't been working on the same sketch thought, since the nano is soldered to a custom made circuit board but I had a spare RTC board of the same model used, and I can disconnect the display so I should be able to test that sketch using the Uno next week.

Could the I2C bus disturb the serial traffic in some way if the display and nano draws too much from the usb port? While in use, everything is powered by it's own 12V power supply but I never have that connected when I do updates to the code.

EDIT: According to my Keweisi usb meter everything just draws about 20mA, so that can't be the issue at least.

**Until I can reproduce this reliably in rc9.2 it's no use to put much thought into this but I wanted to give you a small update.**

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [August 16, 2022, 4:37pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/12 "2022-08-16T16:37:47Z")

</div>

Thanks very much for the update. There was another report of this error here:

[https://github.com/arduino/arduino-ide/issues/726#issuecomment-1214402848](https://github.com/arduino/arduino-ide/issues/726#issuecomment-1214402848)

And maybe something relevant here as well:

[https://github.com/arduino/arduino-ide/issues/1277#issuecomment-1203787434](https://github.com/arduino/arduino-ide/issues/1277#issuecomment-1203787434)

As with you, they were not able to reproduce it after the report. This makes it difficult to do any investigation, but at least I am keeping an eye out for reports and for any occurrences of it on my system. I notified the members of the IDE development team and requested they do the same.

> [@wezz19](#):
>
> Could the I2C bus disturb the serial traffic in some way if the display and nano draws too much from the usb port?

I'm not really knowledgeable about PC hardware at that level. The only related reports I have seen is when the protection circuitry on the USB port shuts it off completely. But that has a very distinctive symptom that doesn't match your experience at all.

I have had infrequent problems throughout my decade of Arduino use where the port gets stuck open for no discernable reason and it only becomes functional again after restarting the computer (not even a restart of the IDE restores it). The symptoms of that match well with yours in that the port remains visible, but the IDE can't access it to upload or open the Serial Monitor while the port is in that "stuck open" state.

I have never correlated that problem with a specific activity in the IDE or version of the IDE. It happens to me once every few months at most and is not reproducible so I never investigated it.

---

<div class="post-metadata">

**Author:** ![wezz19](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wezz19/32/1100501_2.png) [@wezz19](https://forum.arduino.cc/u/wezz19)\
**Post date:** [October 4, 2022, 7:22pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/13 "2022-10-04T19:22:15Z")

</div>

I got the access is denied again a few times with the IDE 2.0.0. Happened after about 3h of use and over 10 uploads.  
I'm currently using the same crowduino nano but since it seems to be happening again I should test with the official Uno or Micro I have.

```cpp
Sketch uses 18696 bytes (60%) of program storage space. Maximum is 30720 bytes.
Global variables use 1189 bytes (58%) of dynamic memory, leaving 859 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\wezz\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\wezz\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\wezz\AppData\Local\Temp\arduino-sketch-5224C303249A5733932B25BF87E417D0/WakeupLight_LCD.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\wezz\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port : COM3
         Using Programmer : arduino
         Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

```

---

<div class="post-metadata">

**Author:** ![pmulvey](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@pmulvey](https://forum.arduino.cc/u/pmulvey)\
**Post date:** [November 20, 2022, 11:48am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/14 "2022-11-20T11:48:56Z")

</div>

Tried this and still not auto-closing Serial Monitor on upload.  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/c/7/2c753148a70a6f636c8a4f48ee5f2d13daf9bc0c.png)

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [November 20, 2022, 12:16pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/15 "2022-11-20T12:16:43Z")

</div>

@pmulvey

Serial monitor does not close, that is normal. The serial connection used by the serial monitor is / should be closed by the IDE.

Which board are you using?  
Which problem do you have / are you trying to solve?

---

<div class="post-metadata">

**Author:** ![pmulvey](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@pmulvey](https://forum.arduino.cc/u/pmulvey)\
**Post date:** [November 20, 2022, 8:07pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/16 "2022-11-20T20:07:16Z")

</div>

I'm using the Arduino Uno, in the V1.18 version the port was closed by the IDE on upload.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [November 21, 2022, 3:11am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/17 "2022-11-21T03:11:22Z")

</div>

In IDE2.0 as well. So let's ask again, which problem do you have / are you trying to solve?

---

<div class="post-metadata">

**Author:** ![pmulvey](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@pmulvey](https://forum.arduino.cc/u/pmulvey)\
**Post date:** [November 21, 2022, 8:35am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/18 "2022-11-21T08:35:56Z")

</div>

When the serial monitor is open, I upload the program and get this error message. This error does not occur in IDE V1.8.19. Having to manually close the serial monitor is a pain.

```cpp
Sketch uses 3704 bytes (11%) of program storage space. Maximum is 32256 bytes.
Global variables use 210 bytes (10%) of dynamic memory, leaving 1838 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\\.\COM6": Access is denied.

Failed uploading: uploading error: exit status 1

```

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [December 28, 2024, 6:48pm UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/19 "2024-12-28T18:48:29Z")

</div>

14 posts were split to a new topic: [Upload fails: "exit status 0xc0000135"](https://forum.arduino.cc/t/upload-fails-exit-status-0xc0000135/1336678)

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [January 27, 2023, 4:35am UTC](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972/25 "2023-01-27T04:35:31Z")

</div>

Hi @pmulvey

> [@pmulvey](#):
>
> I'm using the Arduino Uno

Are you still experiencing the problem of uploads failing with an "Access is denied" error when Serial Monitor is open?

There is a formal bug report that looks similar to your original problem (getting "access denied" error when uploading using Arduino IDE 2.x):

> <https://github.com/arduino/arduino-ide/issues/1783>
>
> \### Describe the problem
> 
> In order to upload to an Arduino board via a serial po…rt, the upload tool (e.g., \[\*\*AVRDUDE\*\*\](https://github.com/avrdudes/avrdude)) must be able to open the port. This is not possible if another process already has control of the port.
> 
> Arduino IDE's "Serial Monitor" and and "Serial Plotter" components also use the serial port of the board. Arduino IDE handles this potential conflict of port usage automagically by closing the port in Serial Monitor/Plotter when an upload process is triggered, then opening it again after the upload is finished. This means no special action is needed from the user to upload while Serial Monitor/Plotter is open.
> 
> 🐛 The upload fails with an "\`Access is denied\`" error under the following conditions:
> 
> \- The board uses an FTDI FT232R USB chip
> \- Arduino IDE is running on a Windows machine
> \- Serial Monitor or Serial Plotter is open
> 
> I've been using Arduino IDE 2.0.3 with Nano without issues when uploading on Ubuntu. Now I've tried it on Windows 11, and most of the time, it gives me this error:
> 
> \`\`\`text
> avrdude: Version 6.3-20190619
> Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
> Copyright (c) 2007-2014 Joerg Wunsch
> 
> System wide configuration file is "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
> 
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 
> But I can see logs from the serial monitor in Arduino IDE -\> serial monitor. 
> 
> \### To reproduce
> 
> \#### Equipment
> 
> A board or other device that has an \[FTDI FT232R\](https://ftdichip.com/products/ft232rl/) USB chip.
> 
> The \[classic \*\*Arduino Nano\*\*\](https://docs.arduino.cc/hardware/nano) is a common board that uses this chip.
> 
> FT232R modules (\[example\](https://docs.arduino.cc/retired/other/usb-serial-converter)) or cables (\[example\](https://www.sparkfun.com/products/9717)) are also often used to upload to boards such as the \[\*\*Arduino Pro Mini\*\*\](https://www.sparkfun.com/products/11113) that don't have an integrated USB chip.
> 
> The fault can be reproduced even if the FTDI-based device is not an Arduino board. In this case, the upload is expected to fail, but it would fail with a "\`not in sync\`" error instead of "\`Access is denied\`".
> 
> \#### Steps
> 
> 1. Select \*\*File \> New Sketch\*\* from the Arduino IDE menus.
> 1. Connect the Arduino board to your computer.
> 1. Select the board and port from the Arduino IDE menus.
> 1. If the Serial Monitor view is not already open, select \*\*Tools \> Serial Monitor\*\* from the Arduino IDE menus to open it.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> avrdude: Version 6.3-20190619
> Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
> Copyright (c) 2007-2014 Joerg Wunsch
>    
> System wide configuration file is "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" view tab in the bottom panel.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🙂 The upload is successful.
> 1. Select \*\*Tools \> Serial Plotter\*\* from the Arduino IDE menus.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> avrdude: Version 6.3-20190619
> Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
> Copyright (c) 2007-2014 Joerg Wunsch
>    
> System wide configuration file is "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 1. Close the "\*\*Serial Plotter\*\*" window.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> avrdude: Version 6.3-20190619
> Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
> Copyright (c) 2007-2014 Joerg Wunsch
>    
> System wide configuration file is "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> \*\*ⓘ\*\* This unexpected result is caused by a separate bug: https://github.com/arduino/arduino-ide/issues/1423
> 
> \### Expected behavior
> 
> Serial Monitor and Serial Plotter do not interfere with upload process.
> 
> \### Arduino IDE version
> 
> \#### Original report
> 
> 2.0.3
> 
> \#### Last verified with
> 
> 2.3.3
> 
> \### Operating system
> 
> Windows
> 
> \### Operating system version
> 
> Edition	Windows 11 Pro
> Version	22H2
> Installed on	07/11/2022
> OS build	22621.963
> Experience	Windows Feature Experience Pack 1000.22638.1000.0
> 
> \### Additional context
> 
> I bisected the introduction of the fault to df8658e
> 
> \---
> 
> Logs generated from an upload that fails with this fault using the build for 053574b with the \`arduino.cli.daemon.debug\` \[advanced setting\](https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#advanced-settings) set to \`true\`:
> 
> \[2023-08-16\_log.log\](https://github.com/arduino/arduino-ide/files/12357046/2023-08-16\_log.log)
> 
> \---
> 
> I have no problems uploading sketches on Arduino IDE 1.8.19 from Microsoft Store on the same system. I can quit 2.0.3, start 1.8.19, and it's working immediately.
> 
> \---
> 
> I cannot reproduce the fault on Linux (Ubuntu 22.04) or macOS (Ventura).
> 
> \---
> 
> I cannot reproduce the fault when using native USB boards (e.g., \[\*\*Leonardo\*\*\](https://docs.arduino.cc/hardware/leonardo), \[\*\*MKR\*\*\](https://docs.arduino.cc/#mkr-family)) or boards that use other models of dedicated USB chip (e.g., ATmega16U2 on Uno and Mega, WCH CH340 on derivative boards).
> 
> \<a name="workaround"\>\</a\>
> 
> \#### Workaround
> 
> \<a name="serial-monitor"\>\</a\>
> 
> \##### Serial Monitor
> 
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" tab in the bottom panel of the Arduino IDE window to close the tab:
> !\[image\](https://user-images.githubusercontent.com/8572152/215050213-e6c41c1a-0eae-448a-ae91-f2acefedf793.png)
> 1. Upload the sketch.
> 1. Open \*\*Serial Monitor\*\* again if needed (by clicking the icon on the IDE toolbar or the \*\*Tools \> Serial Monitor\*\* menu item) after the upload is finished.
> 
> \<a name="serial-plotter"\>\</a\>
> 
> \##### Serial Plotter
> 
> 1. Close the "\*\*Serial Plotter\*\*" window.
> 1. If the "\*\*Serial Monitor\*\*" view is not already open, select \*\*Tools \> Serial Monitor\*\* from the Arduino IDE menus to open it.
> \*\*ⓘ\*\* We must do an open/close cycle on \*\*Serial Monitor\*\* as a workaround for \[a bug\](https://github.com/arduino/arduino-ide/issues/1423) in \*\*Serial Plotter\*\*
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" tab in the bottom panel of the Arduino IDE window to close the tab:
> !\[image\](https://user-images.githubusercontent.com/8572152/215050213-e6c41c1a-0eae-448a-ae91-f2acefedf793.png)
> 1. Upload the sketch.
> 1. Open \*\*Serial Monitor\*\* and/or \*\*Serial Plotter\*\* again if needed after the upload is finished.
> 
> \#### Additional reports
> 
> \- https://github.com/arduino/arduino-ide/issues/1937
> \- https://github.com/arduino/arduino-ide/issues/726#issuecomment-1464313325
> \- https://github.com/arduino/arduino-ide/issues/1783#issuecomment-1614370292
> \- https://github.com/arduino/arduino-ide/issues/1783#issuecomment-2196936864
> \- https://www.reddit.com/r/arduino/comments/1bhwt6f/access\_is\_denied\_error\_on\_nano/
> \- https://forum.arduino.cc/t/brand-new-nano-wont-connect-to-latestide-software/1129473/10
> \- https://forum.arduino.cc/t/arduino-nano-not-able-to-upload-comx-port-access-denied/1081669/15
> \- https://forum.arduino.cc/t/elusive-uno-upload-error-access-is-denied/1067785/5
> \- https://forum.arduino.cc/t/fdti-breakout-2-types-cause-usb-acess-denial/1088005
> \- https://forum.arduino.cc/t/port-access-is-denied/1089761
> \- https://forum.arduino.cc/t/cant-open-device-when-uploading-but-serial-monitor-works/1127731
> \- https://forum.arduino.cc/t/2-1-0-no-longer-disables-monitor-during-upload-update/1139065
> \- https://forum.arduino.cc/t/access-denied-when-uploading-to-arduino-nano/1139330/1
> \- https://forum.arduino.cc/t/access-denied-when-uploading-to-arduino-nano/1139330/11
> \- https://forum.arduino.cc/t/2-11-com3-access-is-denied/1143750
> \- https://forum.arduino.cc/t/cannot-upload-to-arduino-nano/1145391
> \- https://forum.arduino.cc/t/cant-upload-to-pro-mini-port-access-is-denied/1152460
> \- https://forum.arduino.cc/t/cannot-upload-to-ftdi-megas-only/1170683
> \- https://forum.arduino.cc/t/arduinon-nano-access-denied/1181808/6
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device/1228096
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device-com9-access-is-denied/1205151
> \- https://forum.arduino.cc/t/exit-status-1-only-sometimes/1180375
> \- https://forum.arduino.cc/t/have-to-kill-serial-monitor-exe-to-upload-to-the-board/1173764
> \- https://forum.arduino.cc/t/arduino-nano-not-recognised-correctly/1133051
> \- https://forum.arduino.cc/t/brand-new-nano-wont-connect-to-latestide-software/1129473
> \- https://forum.arduino.cc/t/arduino-nano-avrdude-ser-open-cant-open-device-com5-access-is-denied/1124189
> \- https://forum.arduino.cc/t/i-have-a-problem-while-uploading-to-arduino-pro-mini/1255072
> \- https://forum.arduino.cc/t/problem-uploading-to-nano/1267124
> \- https://forum.arduino.cc/t/nano-appears-as-com6-and-doesnt-work/1273314
> \- https://forum.arduino.cc/t/com-port-disconnects-when-open-arduino-ide/1299780
> \- https://forum.arduino.cc/t/com-port-issues/1304755
> \- https://forum.arduino.cc/t/upload-to-pro-mini-fails-avrdude-ser-open-cant-open-device-com8-access-is-denied/1315064
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device-com6-access-is-denied/1319310
> \- https://forum.arduino.cc/t/programming-issue-on-ide-2-3-4/1342261
> \- https://forum.arduino.cc/t/arduino-2-plus-ftdi/1345595
> \- https://forum.arduino.cc/t/unable-to-rewrite-sketch-on-a-non-genuine-uno/1345988
> \- https://forum.arduino.cc/t/most-attempts-to-upload-fails-arduino-nano/1362201
> \- https://forum.arduino.cc/t/nano-access-denied/1368729
> \- https://forum.arduino.cc/t/access-denied-error-while-uploading/1376244
> \- https://forum.arduino.cc/t/permission-denied-on-second-upload/1383025
> \- https://forum.arduino.cc/t/cant-upload-to-my-board-while-serial-monitor-is-open/1405061
> - This seems to indicate that the bug also affects boards with the \[FTDI FT231X\](https://ftdichip.com/products/ft231xs/) chip, which is used on the current models of the \[\*\*SparkFun RedBoard\*\*\](https://www.sparkfun.com/sparkfun-redboard-programmed-with-arduino.html).
> \- https://forum.arduino.cc/t/arduino-ide-not-uploading-code-to-nano-when-serial-monitor-is-open/1405443
> \- https://forum.arduino.cc/t/same-file-positions-for-1-8-and-2-3/1405967
> \- https://forum.arduino.cc/t/arduino-ide-first-upload-after-reboot-ok-but-com-access-refused-afterwards-while-manually-uploading-using-avrdude-still-succeeds-at-the-same-time/1407273
> 
> \#### Related
> 
> \- https://forum.arduino.cc/t/issue-with-flashing-esp32-dev-kit-with-arduino-ide/1117755
> \- https://forum.arduino.cc/t/port-issues-with-ide-2-0-3/1069090
> \- https://forum.arduino.cc/t/arduino-2-plus-ftdi/1345595
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous reports in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the problem still occurs when using the latest \[nightly build\](https://www.arduino.cc/en/software#nightly-builds)
> \- \[X\] My report contains all necessary details

I did some experimentation and found I am able to reproduce the fault under certain specific conditions.

If you are still experiencing this problem, please tell me which USB chip your Uno board has. The chip is usually located on the bottom of the board on the end nearest the USB socket.

The common chips:

## [Microchip ATmega16U2](https://www.microchip.com/en-us/product/ATMEGA16U2)

 ![atmega16u2](https://europe1.discourse-cdn.com/arduino/original/4X/1/6/0/160d609c25c72191674fcba18741bb4f550df04d.jpeg)

## [FTDI FT232R](https://ftdichip.com/products/ft232rl/)

 ![FT232RL](https://europe1.discourse-cdn.com/arduino/original/4X/9/4/8/948296cbce0ac4aeb5e7e6761eb7653d4314490b.jpeg)

## [WCH CH340](http://www.wch-ic.com/products/CH340.html)

 ![ch340](https://europe1.discourse-cdn.com/arduino/original/4X/2/4/e/24eff001bce872e8d3f8f60663ee5606d1b4eb83.jpeg)

* * *

If it isn't clear, alternatively you can provide the link to where you bought the board from and we'll see if we can determine the chip from the product listing.

[Next page](https://forum.arduino.cc/t/failed-upload-ide-2-0/1018972.md?page=2)
