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

Previous selection remains in Firmware Updater and Certificate Uploader menu after no longer available #2222

Closed
3 tasks done
per1234 opened this issue Sep 8, 2023 · 1 comment · Fixed by #2291
Closed
3 tasks done
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 Sep 8, 2023

Describe the problem

Arduino IDE's "Firmware Updater" and "Upload SSL Root Certificates" features allow the user to update the supplemental modules found on some Arduino boards.

The "Select Board" menu in these dialogs lists all the discovered board+ports of boards supported by the feature, from which the user can select the intended target.

🐛 Once the user has selected an item from the menu, it will remain selected even after that board+port is no longer available. This might cause confusion for the users.

To reproduce

Equipment

Steps

  1. Select Tools > Firmware Updater from the Arduino IDE menus.
  2. If it is not already connected, connect the board to your computer with a USB cable.
  3. Expand the "Select Board" menu.
    🙂 All connected supported board+ports are listed in the menu.
  4. Unplug the USB cable of the board from your computer.
    🙂 The board+port that was disconnected from the computer is no longer listed in the menu.
  5. Connect the board to your computer with a USB cable.
  6. Select the board+port from the "Select Board" menu.
  7. Unplug the USB cable of the board from your computer.
    🐛 The board+port is still shown as selected in the menu.
  8. Click the X icon at the top right corner of the Firmware Updater dialog.
  9. Select Tools > Firmware Updater from the Arduino IDE menus.
    🐛 The previously selected board+port is still shown as selected in the menu even though it is no longer connected to the computer.

Expected behavior

The menu goes back to the "Select a board..." state if the previously selected board+port is no longer discovered.

Arduino IDE version

2.2.1

Operating system

Windows

Operating system version

11

Additional context

I bisected the regression to 69ae38e (does not occur with the build from the previous commit 9a6a457).


I used the "Firmware Updater" feature in the demonstration above, but the behavior is the same in "Upload SSL Root Certificates" as well.


An example of when this might cause confusion is when updating the firmware or uploading certificates to the UNO R4 WiFi board. After the process is completed, the board is left in a state where it is no longer discovered as a supported board and can not be used with these features until it has been power cycled (a requirement which is currently not communicated to the user: #2220). The user might be misled by the presence of the board in the menu into thinking the board was still available for subsequent firmware updates or certificate uploads.

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 Sep 8, 2023
@CreativeRobotics
Copy link

This sounds like an issue I had with board definitions as well. I have a branch of the Mattairtech SAMD boards installed in sketchbook->hardware.
After I had added a new variant and loaded it into the IDE I made some alterations to that variant, one being a change to the names in a menu list for that new variant. When I reloaded the IDE the old menu names were still there and the board was unuseable because the IDE threw up an error about not being able to find that item.
It looks like the IDE is chaching some parts of the board variant items and saving them to the file system, then ignoring the variants if they have already been cached.
The only work around was to cut all the text for that variant from the variants.h file, restart Arduino, close it again and paste back the text.

@kittaakos kittaakos self-assigned this Nov 20, 2023
kittaakos pushed a commit that referenced this issue Jan 15, 2024
When the previously selected board is not detected, unset the `<select>`
option.

Closes #2222

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos added the conclusion: resolved Issue was resolved label Jan 15, 2024
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.

3 participants