# Error Code 1 Issue

**URL:** <https://forum.arduino.cc/t/error-code-1-issue/1449917>\
**Category:** Uploading\
**Created:** [June 26, 2026, 7:52pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917 "2026-06-26T19:52:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![microsoftrap](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/microsoftrap/32/1275909_2.png) [@microsoftrap](https://forum.arduino.cc/u/microsoftrap)\
**Post date:** [June 26, 2026, 7:52pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/1 "2026-06-26T19:52:47Z")

</div>

Board: Elegoo UNO R3

```arduino
Error: cannot open port \\.\COM7: The system cannot find the file specified.

Error: unable to open port COM7 for programmer arduino
Failed uploading: uploading error: exit status 1

```

---

<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:** [June 26, 2026, 7:55pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/2 "2026-06-26T19:55:59Z")

</div>

This error might be caused by having the wrong port selected from the **Tools \> Port** menu in Arduino IDE.

Please perform this experiment to verify that the port you have selected is your Arduino board:

With official boards, the port will be labeled with the board name in the menu (e.g., "**COM42 (Arduino Uno)**"). In this case, you can be fairly confident that you have identified the port. Select that port from the menu and try uploading again.

With some cheap derivative boards the port will not be labeled. You can positively identify the port using this procedure:

1. Disconnect the USB cable of the Arduino board from your computer.
2. Select **Tools \> Port** from the Arduino IDE menus.
3. Take note of the ports (if any) listed in the menu.
4. Close the **Tools** menu.  
❗ The ports list is only updated when the **Tools** menu is re-opened, so this step is essential.
5. Connect the Arduino board to your computer with a USB cable.
6. Select **Tools \> Port** from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.

If you saw a new port appear at the last step, select that port from the **Tools \> Port** menu and try uploading again.

If this doesn't solve the problem, please [reply](https://meta.discourse.org/t/discourse-new-user-guide/96331#replying-11) here on this forum topic with the answers to the following questions:

- While following those instructions, did you see a port in the **Tools \> Port** menu at step (6) that was not present at step (3)?
- If you did see a new port, was the upload successful after you selected that port?

---

<div class="post-metadata">

**Author:** ![microsoftrap](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/microsoftrap/32/1275909_2.png) [@microsoftrap](https://forum.arduino.cc/u/microsoftrap)\
**Post date:** [June 26, 2026, 7:57pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/3 "2026-06-26T19:57:25Z")

</div>

Done. The issue Still Persists

- I had checked the com list and it is listed as "COM7 (Arduino UNO)" and it was selected
- The upload was not successful and gave the same error code

```arduino
Error: cannot open port \\.\COM7: The system cannot find the file specified.

Error: unable to open port COM7 for programmer arduino
Failed uploading: uploading error: exit status 1

```

---

<div class="post-metadata">

**Author:** ![Terrypin](https://avatars.discourse-cdn.com/v4/letter/t/a3d4f5/32.png) [@Terrypin](https://forum.arduino.cc/u/Terrypin)\
**Post date:** [June 26, 2026, 9:57pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/4 "2026-06-26T21:57:47Z")

</div>

I get this sort of issue frequently, IDE 2.3.8 insisting against the evidence that the chosen port is not available. I can sometimes resolve it by removing the USB cable for 30 seconds or so and then retrying. But the most reliable method I found is to close and restart the IDE.

---

<div class="post-metadata">

**Author:** ![hammy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hammy/32/238813_2.png) [@hammy](https://forum.arduino.cc/u/hammy)\
**Post date:** [June 26, 2026, 11:35pm UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/5 "2026-06-26T23:35:12Z")

</div>

Have you closed the serial monitor ?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [June 27, 2026, 2:51am UTC](https://forum.arduino.cc/t/error-code-1-issue/1449917/6 "2026-06-27T02:51:58Z")

</div>

Using Windows 11, IDE 2.3.10, Arduino Nano R3 (clone).

I often work on a few sketches in a day. Even if I do not unplug the Nano USB, and simply start a new sketch in the IDE, my board, port, or board and port un-populate, so I need to re-select both board and port.
