Confusing notifications shown during upload with Serial Monitor open #620
Labels
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
Describe the problem
When connection to a port is lost while it was open in Serial Monitor, Arduino IDE 2.x attempts to reconnect and displays warning notifications when that fails:
This is a reasonable behavior when the port is disconnected from Serial Monitor unexpectedly. However, there is also a common case where disconnection of the port is expected: during uploads. These warnings are occasionally displayed during that process, which can cause unnecessary confusion or annoyance to the users.
The Arduino IDE uses the serial ports of Arduino boards in two different ways:
The port can not be used for both of these things simultaneously. The IDE handles the condition of Serial Monitor being open when an upload is started automagically like so:
🐛 It seems that the third step is sometimes attempted while the upload is still in progress, resulting in these unhelpful notifications:
To reproduce
If the only notification is "Done uploading", repeat from step (3) until you see the unhelpful additional notifications during the upload.
Expected behavior
Warning notifications should only be displayed if there is a problem that needs to be brought to the user's attention.
Serial Monitor should not attempt any reconnects until the upload process has finished.
Arduino IDE version
2.0.0-beta.12-nightly.20211115
Operating system
Windows
Operating system version
10
Additional context
Originally reported at #271 (comment):
The issue is intermittent for me. It occurs approximately once in five uploads.
I was not able to reproduce the issue with Leonardo, Mega, or Nano 33 BLE.
I have never encountered the issue when Serial Monitor was not open.
Issue checklist
The text was updated successfully, but these errors were encountered: