Empty fields not permitted in "Configure and Upload" dialog #1488
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
It may sometimes be necessary to integrate user provided information (e.g., a password) into the command used to upload a sketch to an Arduino board.
This capability is provided by the "user provided fields" system.
The Arduino IDE collects the user input for uploads that have "user provided fields" via the "Configure And Upload" dialog (#550):
As a flexible general purpose system, no assumptions may be made about what data is appropriate for the fields. It is the responsibility of each upload tool to validate the data.
🐛 The "Configure And Upload" dialog inappropriately requires that the fields not be empty. There are use cases where an empty field is correct and expected.
To reproduce
Equipment
Examples:
Steps
Follow the tutorial to set up your chosen board for uploading over a network port.
❗ Do not set a password in the sketch (this is the default configuration of the "BasicOTA" example sketch of the "ArduinoOTA" library).
Wait for the network port to appear in the Arduino IDE ports list.
Select the board and port in the Arduino IDE.
Select Sketch > Configure and Upload from the Arduino IDE menus.
ⓘ The standard "Upload" will have the same effect on the first upload of the IDE session, sketch, port. Configure and Upload is used in the instructions to ensure the dialog will appear even if the demo is repeated.
Leave the "Password" field empty, as is the intuitive choice when no password is needed.
🐛 The "UPLOAD" button is disabled. The only way to accomplish an upload is through the unintuitive user action of adding arbitrary text to the "Password" field in order to satisfy the requirement imposed inappropriately by the IDE.
Expected behavior
"UPLOAD" button is enabled in the "Configure and Upload" dialog even if a field is left empty.
Arduino IDE version
2.0.0-snapshot-42f6f43
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Additional context
With the inflexible network port-specific system used by Arduino IDE 1.x, the board could specify that authentication was not required via an
auth_upload
mDNS record. In this case, the password dialog was never presented in the first place.Arduino CLI allows the field to be left empty.
Example of poor user experience resulting from current prevention of empty fields: https://forum.arduino.cc/t/ide-v2-0-cant-update-thru-ota-without-password/1034657
Workaround
Related
Issue checklist
The text was updated successfully, but these errors were encountered: