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 silently when no board is selected #1714

Open
3 tasks done
per1234 opened this issue Nov 27, 2022 · 0 comments · Fixed by 2lambda123/arduino-arduino-ide#10 · May be fixed by #2387
Open
3 tasks done

Upload fails silently when no board is selected #1714

per1234 opened this issue Nov 27, 2022 · 0 comments · Fixed by 2lambda123/arduino-arduino-ide#10 · May be fixed by #2387
Assignees
Labels
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 27, 2022

Describe the problem

Under some relatively common circumstances, no board is selected in Arduino IDE, including:

  • first run
  • opening a sketch that has not been assigned a workspace board association (e.g., a sketch downloaded from the Internet)

Since all parameters of the upload are defined by the boards platform, it is mandatory that a board be selected in Arduino IDE before uploading a sketch.

It is important for Arduino IDE to clearly communicate this requirement to the user when an upload is attempted without selecting a board.

🐛 Attempting an upload without a board selection fails silently.

To reproduce

  1. Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE menus if it is running.

  2. Delete the following folder to produce the condition of not having a board selected:

    • Windows:
      C:\Users\<username>\AppData\Roaming\arduino-ide\
      
      (where <username> is your Windows username)
      ❗ If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
    • Linux:
      /home/<username>/.config/arduino-ide/
      
      (where <username> is your Linux username)
      ❗ The .config folder may be hidden by default in your file manager and terminal.
    • macOS:
      /Users/<username>/Library/Application Support/arduino-ide/
      
      (where <username> is your macOS username)
      ❗ The Library folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.

    ⚠ Please be very careful when deleting things from your computer. When in doubt, back up!

  3. Start Arduino IDE.

  4. Select a port from the Tools > Port menu in Arduino IDE.
    This step is not required. It is only done to show that the issue is not dependent on a missing port selection (Uploading disabled without port selection #770)

  5. Select Sketch > Upload from the Arduino IDE menus.

🐛 Nothing at all happens. There is no notification, error message, etc.

Expected behavior

Clearly communicate to the user that they must select a board before uploading, as it worked in Arduino IDE 2.0.0-rc9.3.

Arduino IDE version

Original report

2.0.2

Last verified with

9a6a457

Operating system

Windows

Operating system version

10

Additional context

I bisected the regression to 671d2ea / #1415 (does not occur when using the build from the previous commit 9a65ef6)


The previous incarnation of this bug was tracked at #845 and fixed by #1353

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 27, 2022
kittaakos pushed a commit that referenced this issue Feb 23, 2024
IDE2 must not disable the upload from the UI when no board is selected.
Otherwise, IDE2 does not receive the `no FQBN` error from
the CLI and cannot cannot
suggest selecting a board via the `Tools` > `Board` menu.

Closes #1714

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos linked a pull request Feb 23, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants