Skip to content

"Welcome to Flutter" and "Waiting for lock" messages break --machine commands #54014

Closed

Description

@pchampio

sudo flutter channel --version --machine is responding with a non json output, this break other toolkit/ci-cd that are relying on this --machine flag go-flutter-desktop/go-flutter#384.

$ sudo flutter channel --version --machine     
Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
  /
📎
{
  "frameworkVersion": "1.16.4-pre.88",
  "channel": "master",
  "repositoryUrl": "https://github.com/flutter/flutter.git",
  "frameworkRevision": "ab14307e0c77e4a03ea23ccaa68436d9128a445d",
  "frameworkCommitDate": "2020-04-03 00:56:01 -0400",
  "engineRevision": "f5127cc07a762de774b7e941fe6eb402c97aa1b3",
  "dartSdkVersion": "2.8.0 (build 2.8.0-dev.19.0 fae35fca47)"
}

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Apr 6, 2020
  2. pchampio commented on Apr 21, 2020

    @pchampio
    Author
    $ flutter --version --machine
    Waiting for another flutter command to release the startup lock...
    {
      "frameworkVersion": "1.17.0",
      "channel": "beta",
      "repositoryUrl": "https://github.com/flutter/flutter.git",
      "frameworkRevision": "d3ed9ec945f8869f0e136c357d0c2a6be2b60c98",
      "frameworkCommitDate": "2020-04-06 14:07:34 -0700",
      "engineRevision": "c9506cb8e93e5e8879152ff5c948b175abb5b997",
      "dartSdkVersion": "2.8.0 (build 2.8.0-dev.18.0 eea9717938)"
    }
    
  3. GeertJohan commented on Apr 21, 2020

    @GeertJohan

    The non-JSON output can be written to stderr, so that stdout is still 'clean' for machines to read.

  4. changed the title [-]Tookit flutter --machine returns non json string[/-] [+]"Welcome to Flutter" and "Waiting for lock" messages break --machine commands[/+] on Apr 25, 2020
  5. jonahwilliams commented on Sep 25, 2020

    @jonahwilliams
    Contributor

    We've moved some of the diagnostic messages to stderr, though this does not yet include the welcome message. This could be fixed by detecting if a machine flag was passed and eliding it.

  6. sigurdm commented on Jun 2, 2022

    @sigurdm
    Contributor

    This could be fixed by detecting if a machine flag was passed and eliding it.

    Is there any reason to not always output the welcome message on stderr?

  7. christopherfujino commented on Mar 7, 2023

    @christopherfujino
    Contributor

    This could be fixed by detecting if a machine flag was passed and eliding it.

    Is there any reason to not always output the welcome message on stderr?

    I believe there have been concerns (from product) that the default command prompt setup on Windows colors STDERR red, and that too much red would scare new users.

  8. added
    P2Important issues not at the top of the work list
    on Mar 7, 2023
  9. added
    P3Issues that are less important to the Flutter project
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    and removed
    P2Important issues not at the top of the work list
    on Jul 7, 2025
  10. AbdeMohlbi commented on Apr 6, 2026

    @AbdeMohlbi
    Member

    seems sudo flutter analyze --suggestions --machine also have the same problem.

  11. github-actions commented on May 18, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions