Skip to content

Upload fails silently when no board is selected #1714

Open
@per1234

Description

@per1234

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

Metadata

Metadata

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions