Skip to content

Flutter 3.38 run command line arguments not working for web development config #179014

@GreatTux

Description

@GreatTux

From 3.38 it is not possible to pass in the command line the following parameters:

  • web-hostname
  • web-port
  • web-tls-cert-path
  • web-tls-cert-key-path

This issue has been introduced by this PR: #172175

The implementation document states:

  1. Configuration Precedence
    A small but critical section to prevent user confusion, explicitly stating the override order:
    Command-Line Arguments (e.g., --web-port)
    web_dev_config.yaml settings
    Built-in default values

The flutter documentation for this feature ](https://docs.flutter.dev/platform-integration/web/web-dev-config-file) also specifies:

Configuration precedence

Remember the order of precedence for settings:

Command-line arguments (such as --web-hostname, --web-port)
web_dev_config.yaml settings
Built-in default values

And (some) of the command line arguments are still available in flutter run -h

--web-tls-cert-path                                      The certificate that host will use to serve using TLS connection. If not provided, the tool will use default http scheme.
--web-tls-cert-key-path                                  The certificate key that host will use to authenticate cert. If not provided, the tool will use default http scheme.

But regardless of the above, the implementation now ignores command line arguments and fully relies on the newly introduced web_dev_config.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfyi-toolFor the attention of Flutter Tool teamgood first issueRelatively approachable for first-time contributorsplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions