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

Empty fields not permitted in "Configure and Upload" dialog #1488

Open
3 tasks done
per1234 opened this issue Sep 23, 2022 · 1 comment
Open
3 tasks done

Empty fields not permitted in "Configure and Upload" dialog #1488

per1234 opened this issue Sep 23, 2022 · 1 comment
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 Sep 23, 2022

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):

image

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

  • Any board that supports unauthenticated upload over a network port.
    Examples:
    • Any ESP8266-based board
    • Any ESP32-based board

Steps

  1. 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).

  2. Wait for the network port to appear in the Arduino IDE ports list.

  3. Select the board and port in the Arduino IDE.

  4. 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.

  5. 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

  1. Add any arbitrary character(s) to the optional field.
  2. Click the "UPLOAD" button.

Related

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
@joyel24
Copy link

joyel24 commented Jan 24, 2023

This is really annoying, I have this problem on both macOS and Windows versions of ARDUINO IDE...

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
Development

No branches or pull requests

3 participants