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

"Sketch > Upload" menu item disabled after upload w/ Serial Monitor open #1722

Closed
3 tasks done
per1234 opened this issue Nov 30, 2022 · 0 comments · Fixed by #1750
Closed
3 tasks done

"Sketch > Upload" menu item disabled after upload w/ Serial Monitor open #1722

per1234 opened this issue Nov 30, 2022 · 0 comments · Fixed by #1750
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Nov 30, 2022

Describe the problem

Under certain conditions, the Sketch > Upload and Sketch > Upload Using Programmer menu items are disabled after the completion of an upload:

  • Upload is made to a native USB CDC serial port
  • Serial Monitor is open

To reproduce

Equipment

Any Arduino board that uses a native USB CDC serial port for uploads.

Examples:

  • Leonardo
  • Micro
  • MKR Boards
  • Nano 33 IoT
  • Nano 33 BLE
  • Teensy (only when uploading to the board's port from the "Serial ports" section of the Tools > Port menu)

Steps

  1. Select File > New Sketch from the Arduino IDE menus.
  2. Connect the Arduino board to your computer.
  3. Select the board and port in Arduino IDE.
  4. Open the Serial Monitor view if it is not already open.
  5. Select Sketch > Upload from the Arduino IDE menus.
    The fault also occurs if the upload operation is triggered by clicking the "Upload" button or using the Ctrl+U keyboard shortcut.
  6. Wait for the upload to finish successfully.
  7. Open the Sketch menu.

🐛 The Sketch > Upload and Sketch > Upload Using Programmer menu items are disabled for no good reason:

image

Expected behavior

The Sketch > Upload and Sketch > Upload Using Programmer menu items are only disabled if uploading is impossible. The only conditions under which that would be the case is when no board is selected (and programmer in the case of Upload Using Programmer). However, the Sketch > Upload and Sketch > Upload Using Programmer menu items are even enabled in this case (which is reasonable since it allows the IDE to communicate the requirement of selecting a board and programmer to the user).

Arduino IDE version

d6a4b0f

Operating system

Windows

Operating system version

10

Additional context

The fault first occurs for me with 7d6a2d5 (does not occur when using the build for 6984c52)


I have not been able to reproduce the fault on Linux and the reports have been from Windows users.


I found that the number of platforms installed affects my ability to reproduce the fault. With my full collection of ~40 platforms, I find that the fault only occurs when using ac9cce1 or newer, and that I am unable to reproduce the fault when uploading to a Teensy board even then. So if you are having difficulty reproducing the fault, try a minimal data directory that only contains the single platform of the board you are uploading to.


The upload operation can still be triggered via the Upload button or Ctrl+U keyboard shortcut even after the Sketch > Upload menu item was disabled.


The Sketch > Upload and Sketch > Upload Using Programmer menu items are re-enabled after selecting a different board or port.


The fault does not occur when uploading to boards without a native USB CDC serial port:

  • Uno
  • Mega
  • Nano Every

Originally reported at https://forum.arduino.cc/t/ide-2-0-2-forgets-how-to-upload/1054971/1

Additional reports:

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 labels Nov 30, 2022
@kittaakos kittaakos self-assigned this Nov 30, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Dec 15, 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 type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants