Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload fails when Serial Monitor is open #1278

Closed
3 tasks done
per1234 opened this issue Aug 3, 2022 · 1 comment · Fixed by #1279
Closed
3 tasks done

Upload fails when Serial Monitor is open #1278

per1234 opened this issue Aug 3, 2022 · 1 comment · Fixed by #1279
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Aug 3, 2022

Describe the problem

The Arduino IDE uses the serial ports of Arduino boards 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.
  2. Select the appropriate board and port in the Arduino IDE.
  3. Open Serial Monitor in the Arduino IDE.
  4. Select Sketch > Upload from the Arduino IDE menus.

🐛 The upload fails with an error like:

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 e156dcc / #1260


Originally reported tangentially at #581 (comment)


It may be the same issue as reported at #1277, but there is currently insufficient information there to be able to say.

UPDATE: per #1277 (comment), #1277 does not have Serial Monitor as a required condition, which indicates these are two separate issues.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: serial monitor Related to the Serial Monitor labels Aug 3, 2022
@InstantMuffin
Copy link
Contributor

InstantMuffin commented Aug 3, 2022

Thank you for referencing #1277. It seems odd this is the same bug as we get differing error messages. At the same time you can narrow down the problem precisely to a commit, and I can narrow it down in to the changes since rc-9.0.
I'll see to it if I can also boil it down to that specific changeset on my end.

kittaakos pushed a commit that referenced this issue Aug 3, 2022
Closes #1278

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 3, 2022
Closes #1278

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 3, 2022
Closes #1278

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants