flutter tool get struck when args is provided with no file path is specified in flutter format #109553
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1found in release: 3.3Found to occur in 3.3Found to occur in 3.3has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
> flutter create .
provide any args with format
> flutter format --fix
Output:
Empty with tools still running
run the same commands with Dart
> dart format --fix
Output for dart
Missing paths to code to format.
Expected:
Same error message as dart format
Actual
Flutter tool get struck with no message
flutter doctor -v
[√] Flutter (Channel beta, 3.3.0-0.3.pre, on Microsoft Windows [Version 10.0.19043.1826], locale en-IN)
• Flutter version 3.3.0-0.3.pre on channel beta at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 8c1149878b (5 days ago), 2022-08-10 12:15:36 -0500
• Engine revision f16e757d5d
• Dart version 2.18.0 (build 2.18.0-271.4.beta)
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\moham\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.12+7-b1504.28-7817840)
[√] IntelliJ IDEA Community Edition (version 2022.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1.4
• 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
[√] VS Code (version 1.70.1)
• VS Code at C:\Users\moham\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.46.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1826]
• Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.81
• Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.44
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
verbose
flutter -v format --fix
[ +88 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +612 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +2 ms] 8c1149878bbb8f062aecfab4d825e5b87bdb4487
[ +3 ms] executing: [C:\src\flutter/] git tag --points-at 8c1149878bbb8f062aecfab4d825e5b87bdb4487
[ +73 ms] Exit code 0 from: git tag --points-at 8c1149878bbb8f062aecfab4d825e5b87bdb4487
[ +1 ms] 3.3.0-0.3.pre
[ +72 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[ +60 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[ +1 ms] origin/beta
[ +2 ms] executing: [C:\src\flutter/] git ls-remote --get-url origin
[ +60 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] https://github.com/flutter/flutter.git
[ +101 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[ +63 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +1 ms] beta
[ +123 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +64 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ +2 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +76 ms] executing: C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe format --fix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1found in release: 3.3Found to occur in 3.3Found to occur in 3.3has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
huycozy commentedon Aug 16, 2022
Hi @Anas35, thanks for filing the issue.
This issue is reproducible on the latest
stable,master, andbetachannels.Logs (flutter format command gets stuck)
Logs (dart format command is fine with output error message)
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.2.1 21D62 darwin-x64, locale en-VN) • Flutter version 3.0.5 at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (9 hours ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-33, build-tools 31.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • 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 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Community Edition (version 2020.3.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] IntelliJ IDEA Community Edition (version 2022.1.1) • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.69.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.44.0 [✓] Connected device (3 available) • SM T225 (mobile) • R9JT3004VRJ • android-arm64 • Android 11 (API 30) • macOS (desktop) • macos • darwin-x64 • macOS 12.2.1 21D62 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found![✓] Flutter (Channel master, 3.1.0-0.0.pre.2294, on macOS 12.5 21G72 darwin-x64, locale en-EE) • Flutter version 3.1.0-0.0.pre.2294 on channel master at /Users/huynq/Documents/GitHub/flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 370fc483e3 (32 minutes ago), 2022-08-16 08:56:07 +0200 • Engine revision 280e9a7bec • Dart version 2.19.0 (build 2.19.0-100.0.dev) • DevTools version 2.16.0 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-33, build-tools 31.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13E113 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • 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 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Community Edition (version 2020.3.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] IntelliJ IDEA Community Edition (version 2022.1.1) • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.70.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.46.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 12.5 21G72 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.79 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found![✓] Flutter (Channel beta, 3.3.0-0.3.pre, on macOS 12.5 21G72 darwin-x64, locale en-FR) • Flutter version 3.3.0-0.3.pre on channel beta at /Users/huynq/Documents/GitHub/flutter_beta • Upstream repository https://github.com/flutter/flutter.git • Framework revision 8c1149878b (5 days ago), 2022-08-10 12:15:36 -0500 • Engine revision f16e757d5d • Dart version 2.18.0 (build 2.18.0-271.4.beta) • DevTools version 2.15.0 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-33, build-tools 31.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13E113 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • 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 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Community Edition (version 2020.3.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] IntelliJ IDEA Community Edition (version 2022.1.1) • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.70.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.46.0 [✓] Connected device (3 available) • iPhone 13 (mobile) • 2526BC1A-435D-4B08-B99C-44B928F2517B • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 12.5 21G72 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.79 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found!Jasguerrero commentedon Aug 17, 2022
Breadcrumbs:
_DefaultProcessUtils.streamis hanging whendart format --fixis passed;dart formatis working fine. AdditionallyProcessManager.runSynchasstdoutandstderrempty with anexitCode0Jasguerrero commentedon Sep 13, 2022
cc: @zanderso
maRci002 commentedon Dec 11, 2023
flutter formatis deprecated / removed from flutter #115809zanderso commentedon Dec 11, 2023
Closing as obsolete.
github-actions commentedon Dec 25, 2023
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 -vand a minimal reproduction of the issue.