arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.34k stars 398 forks source link

Upload indicated as successful even when it failed #2516

Closed per1234 closed 1 month ago

per1234 commented 2 months ago

Describe the problem

At the end of an upload operation, Arduino IDE displays a notification to communicate the result to the user.

If the operation was successful, the "Done uploading." notification should be shown:

image

If the operation failed, the "Upload error: ..." notification should be shown:

image

πŸ› "Done uploading" notification is shown even when the upload failed. The result of the upload will not be clearly communicated to the user, and even if they do notice that the upload failed, they won't have access to the convenient "COPY ERROR MESSAGES" button that is the standard way for support technicians to obtain the upload logs.

To reproduce

  1. If you have an UNO R4 Minima connected to your computer, disconnect it.
  2. Select File > New Sketch from the Arduino IDE menus.
  3. Select Tools > Board > Arduino UNO R4 Boards > Arduino UNO R4 Minima. β“˜ This board was selected arbitrarily for the demo because it does not use a serial port for uploads, and thus avoids an equipment prerequisite for the demo. However, the bug affects all boards; not only the UNO R4 Minima.
  4. Select Sketch > Upload from the Arduino IDE menus.
  5. Wait for the upload operation to finish.

πŸ› The upload failed, as expected, but the notification for a successful upload was shown.

Expected behavior

The failure notification is shown when an upload fails:

image

Arduino IDE version

2.3.3

Operating system

Windows

Operating system version

Windows 11

Additional context

I bisected the regression to https://github.com/arduino/arduino-ide/pull/2500 / a5bf56f (the fault does not occur when using the build from the previous commit 1ec0a8c).

Issue checklist

sterretjeToo commented 1 month ago
  1. If you have an UNO R4 Minima connected to your computer, disconnect it.

Just to make sure that one is aware that this applies to other boards as well. I just did encounter this for a Mega and an Uno R3.

The issue is not yet solved in arduino-ide_nightly-20241001_Windows_64bit