Skip to content

Tool with --machine emits Downloading ... before emitting JSON #154119

@yaakovschectman

Description

@yaakovschectman

et attempts to parse the output of the flutter tool, but when the tool logs that it is downloading dependencies, this parsing breaks. I suspect it would be trivial to add an error message in response to parsing failure suggesting that the user simply re-run et, as it succeeds on the second run once the flutter tool is finished building.

Steps to reproduce

  1. Delete <flutter>/bin/cache/flutter_tools.stamp
  2. cd into the directory of any Flutter project
  3. Run et run

Expected results

The engine builds and the Flutter project runs

Actual results

et run fails because it cannot parse the output logging from the Flutter tools updating. Re-running et after the failure completes, as the Flutter tools is now already built and up to date.

Logs

Logs
[2024-08-26 12:35:50.925284] ERROR: Failed to parse flutter devices output: FormatException: Unexpected character (at character 1)
Downloading package sky_engine...                                  388ms
^


Downloading package sky_engine...                                  388ms
Downloading package flutter_gpu...                                  33ms
Downloading flutter_patched_sdk tools...                           126ms
Downloading flutter_patched_sdk_product tools...                   117ms
Downloading darwin-arm64 tools...                                  762ms
Downloading darwin-arm64/font-subset tools...                       94ms
[
  {
    "name": "sdk gphone16k arm64",
    "id": "emulator-5554",
    "isSupported": true,
    "targetPlatform": "android-arm64",
    "emulator": true,
    "sdk": "Android 15 (API 35)",
    "capabilities": {
      "hotReload": true,
      "hotRestart": true,
      "screenshot": true,
      "fastStart": true,
      "flutterExit": true,
      "hardwareRendering": true,
      "startPaused": true
    }
  },
  {
    "name": "macOS",
    "id": "macos",
    "isSupported": true,
    "targetPlatform": "darwin",
    "emulator": false,
    "sdk": "macOS 14.6.1 23G93 darwin-arm64",
    "capabilities": {
      "hotReload": true,
      "hotRestart": true,
      "screenshot": false,
      "fastStart": false,
      "flutterExit": true,
      "hardwareRendering": false,
      "startPaused": true
    }
  },
  {
    "name": "Mac Designed for iPad",
    "id": "mac-designed-for-ipad",
    "isSupported": true,
    "targetPlatform": "darwin",
    "emulator": false,
    "sdk": "macOS 14.6.1 23G93 darwin-arm64",
    "capabilities": {
      "hotReload": true,
      "hotRestart": true,
      "screenshot": false,
      "fastStart": false,
      "flutterExit": true,
      "hardwareRendering": false,
      "startPaused": true
    }
  },
  {
    "name": "Chrome",
    "id": "chrome",
    "isSupported": true,
    "targetPlatform": "web-javascript",
    "emulator": false,
    "sdk": "Google Chrome 127.0.6533.122",
    "capabilities": {
      "hotReload": true,
      "hotRestart": true,
      "screenshot": false,
      "fastStart": false,
      "flutterExit": false,
      "hardwareRendering": false,
      "startPaused": true
    }
  }
]

Flutter Doctor output

Doctor output
[!] Flutter (Channel master, 3.25.0-1.0.pre.133, on macOS 14.6.1 23G93 darwin-arm64, locale en)
    • Flutter version 3.25.0-1.0.pre.133 on channel master at /Users/schectman/src/flutter/flutter
    ! Upstream repository [email protected]:yaakovschectman/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to [email protected]:yaakovschectman/flutter.git to dismiss this error.
    • Framework revision 6608936e6d (50 minutes ago), 2024-08-26 15:49:25 +0000
    • Engine revision 365b0c70fa
    • Dart version 3.6.0 (build 3.6.0-175.0.dev)
    • DevTools version 2.39.0-dev.15
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
    • Android SDK at /Users/schectman/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0-rc4
    • ANDROID_HOME = /Users/schectman/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    ! CocoaPods 1.12.1 out of date (1.13.0 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.92.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • sdk gphone16k arm64 (mobile)    • emulator-5554         • android-arm64  • Android 15 (API 35) (emulator)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 127.0.6533.122

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions