Skip to content

Unable to select devices or start debugging Flutter apps when with certain builds of "git" on PATH (msys2, devkitpro) #4840

Open

Description

@GusBovo

Describe the bug

I can't debug my Flutter app using VSCode anymore. When I start VSCode, it shows 'No Device' in the bottom right corner and interacting with it does not give me any options for devices. Trying to run a debug session with F5 or by clicking 'Run and debug' creates a loop and the debugger never starts.

To Reproduce

I am unable to reproduce it since it is still occurring.

Workspace

  • Operating System and version: "Windows 10 Pro" 10.0 (Build 22631)
  • VS Code version: win 1.84.2
  • Dart extension version: 3.76.1
  • Flutter extension version: 3.76.0
  • Dart/Flutter SDK version: Dart (3.1.5) / Flutter (3.13.9)
Steps I Tried to Solve the Problem
  • Initializing the app through 'flutter run' (it works; the terminal gives me the correct options for available devices, but – as far as I know, at least – you can't do a step-by-step debug from it, only through IDEs).
  • Running 'flutter doctor' (everything is okay)
  • Creating a new project and attempting to debug it.
  • Disabling and, also, uninstalling all my extensions (leaving only Dart and Flutter extensions).
  • Uninstalling VSCode (and reinstalling after a reboot).
  • Uninstalling Flutter/Dart (and reinstalling after a reboot).
  • Uninstalling both VSCode and Flutter/Dart (and reinstalling after a reboot), also completely cleaning any residual files before reinstalling too.
  • Rolling back extensions to an older version (that I had used before).
  • Deleting and rebuilding the launch.json file (by using VSCode's default option to create a launch.json file).
  • Deleting my entire project and cloning it again using Git in another directory.
  • Creating a new project in another directory.
LOG flutter doctor -v
PS C:\Users\PcUser\Documents\Projects\FlutterApp> flutter doctor -v
[√] Flutter (Channel stable, 3.13.9, on Microsoft Windows [versÆo 10.0.22631.2506], locale pt-BR)
    • Flutter version 3.13.9 on channel stable at C:\Flutter\flutter
    • Upstream repository unknown source
    • FLUTTER_GIT_URL = unknown source
    • Framework revision d211f42860 (3 weeks ago), 2023-10-25 13:42:25 -0700
    • Engine revision 0545f8705d
    • Dart version 3.1.5
    • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\PcUser\AppData\Local\Android\Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = C:\Users\PcUser\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33801.468
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.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 17.0.6+0-b2043.56-9586694)

[√] VS Code (version 1.84.2)
    • VS Code at C:\Users\PcUser\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.70.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [versÆo 10.0.22631.2506]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.124
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.58

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

• No issues found!

Edit: The 'Returning cached promise for getSupportedPlatforms()' lines are me clicking the 'No Device' button in the bottom right corner of VSCode. After that I try running the debugger with F5 and then by clicking 'Run and Debug'

Dart Capture LOG 1 (About a minute) - Older versions of extensions
Dart Code extension: 3.70.0
Flutter extension: 3.70.0 (activated)

App: Visual Studio Code
Version: 1.84.2
Platform: win

Workspace type: Flutter
Analyzer type: LSP
Multi-root?: false

Dart SDK:
    Loc: C:\Flutter\flutter\bin\cache\dart-sdk
    Ver: 3.1.5
Flutter SDK:
    Loc: C:\Flutter\flutter
    Ver: 3.13.9

HTTP_PROXY: undefined
NO_PROXY: undefined

Logging Categories:
    General, CommandProcesses, DartTest, DAP, VmService, DevTools, FlutterDaemon, FlutterRun, FlutterTest, WebDaemon

Wed Nov 15 2023 Log file started
[8:51:48 AM] [General] [Info] Returning cached results for project search
[8:51:50 AM] [General] [Info] Returning cached results for project search
[8:51:50 AM] [General] [Info] Checking 1 projects for supported platforms
[8:51:50 AM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
[8:51:50 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:51 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:51 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:51 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:51 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:51 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:52 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:52 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:53 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:54 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:55 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:56 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:51:57 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[8:52:04 AM] [General] [Info] Starting debug session...
[8:52:04 AM] [General] [Info]     workspace: C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp
[8:52:04 AM] [General] [Info] Setting cwd based on likely entry point: C:\\Users\\<PcUser>\\Documents\\<Projects>\\<FlutterApp>
[8:52:04 AM] [General] [Info] Using open file as entry point: C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp\\lib\\main.dart
[8:52:04 AM] [General] [Info] Using workspace as cwd: C:\\Users\\<PcUser>\\Documents\\<Projects>\\<FlutterApp>
[8:52:04 AM] [General] [Info] Detected launch project as Flutter
[8:52:04 AM] [General] [Info] Using Flutter debug adapter for this session
[8:52:04 AM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
[8:52:09 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
Wed Nov 15 2023 Log file ended
Dart Capture LOG 2 (About a minute) - Latest versions of extensions
Dart Code extension: 3.76.1
Flutter extension: 3.76.0 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.84.2

Workspace type: Flutter (LSP)

Dart (3.1.5): C:\Flutter\flutter\bin\cache\dart-sdk
Flutter (3.13.9): C:\Flutter\flutter (No device)


Logging Categories:
    General, CommandProcesses, DartTest, DAP, VmService, DevTools, FlutterDaemon, FlutterRun, FlutterTest, WebDaemon

Wed Nov 15 2023 [09:01:57 GMT-0300 (Brasilia Standard Time)] Log file started
[9:02:00 AM] [General] [Info] Returning cached results for project search
[9:02:00 AM] [General] [Info] Checking 1 projects for supported platforms
[9:02:00 AM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
[9:02:05 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[9:02:09 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[9:02:11 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[9:02:14 AM] [General] [Info] Starting debug session...
[9:02:14 AM] [General] [Info]     workspace: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:14 AM] [General] [Info] Setting cwd based on likely entry point: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:14 AM] [General] [Info] Using open file as entry point: C:\Users\PcUser\Documents\Projects\FlutterApp\lib\main.dart
[9:02:14 AM] [General] [Info] Using workspace as cwd: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:14 AM] [General] [Info] Detected launch project as Flutter
[9:02:14 AM] [General] [Info] Using Flutter debug adapter for this session
[9:02:14 AM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
[9:02:19 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
[9:02:34 AM] [General] [Info] Starting debug session...
[9:02:34 AM] [General] [Info]     workspace: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:34 AM] [General] [Info] Setting cwd based on likely entry point: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:34 AM] [General] [Info] Using open file as entry point: C:\Users\PcUser\Documents\Projects\FlutterApp\lib\main.dart
[9:02:34 AM] [General] [Info] Using workspace as cwd: C:\Users\PcUser\Documents\Projects\FlutterApp
[9:02:34 AM] [General] [Info] Detected launch project as Flutter
[9:02:34 AM] [General] [Info] Using Flutter debug adapter for this session
[9:02:34 AM] [FlutterDaemon] [Info] ==> [{"id":"5","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
[9:02:39 AM] [General] [Info] Returning cached promise for getSupportedPlatforms()
Wed Nov 15 2023 [09:03:31 GMT-0300 (Brasilia Standard Time)] Log file ended

Activity

  1. DanTup commented on Nov 15, 2023

    @DanTup
    Member

    Can you enable the Flutter Daemon log (https://dartcode.org/docs/logging/#flutter-daemon) and provide the full log when this occurs?

    The logs you posted are missing the startup of the daemon (and the exact command/env being used). My guess is that there are some bad arguments or env variables (possibly as a result of the fix in f490caf) being set when spawning the daemon that's causing it not to work properly.

  2. added
    awaiting infoRequires more information from the customer to progress
    on Nov 15, 2023
  3. GusBovo commented on Nov 15, 2023

    @GusBovo
    Author

    As requested:

    Flutter Daemon Log
    Dart Code extension: 3.76.1
    Flutter extension: 3.76.0 (not activated)
    
    App: Visual Studio Code
    App Host: desktop
    Version: win 1.84.2
    
    
    Logging Categories:
        FlutterDaemon
    
    Wed Nov 15 2023 [15:52:59] Log file started
    [3:52:59 PM] [FlutterDaemon] [Info] Spawning C:\Flutter\flutter\bin\flutter.bat with args ["daemon"]
    [3:52:59 PM] [FlutterDaemon] [Info] ..  in C:\Flutter\flutter
    [3:52:59 PM] [FlutterDaemon] [Info] ..  with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code","FLUTTER_ROOT":"C:\\Flutter\\flutter"}}
    [3:52:59 PM] [FlutterDaemon] [Info]     PID: 8356
    [3:53:00 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.connected","params":{"version":"0.6.1","pid":3044}}]
    [3:53:00 PM] [FlutterDaemon] [Info] ==> [{"id":"1","method":"device.enable"}]
    [3:53:00 PM] [FlutterDaemon] [Info] ==> [{"id":"2","method":"emulator.getEmulators"}]
    [3:53:01 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"status","message":"Starting device daemon..."}}]
    [3:53:08 PM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [3:53:26 PM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    

    Also, another log from >Dart: Capture Log, if needed:

    Capture Log
    Workspace type: Flutter (LSP)
    
    Dart (3.1.5): C:\Flutter\flutter\bin\cache\dart-sdk
    Flutter (3.13.9): C:\Flutter\flutter (No device)
    
    
    Logging Categories:
        General, Analyzer, AnalyzerTiming, CommandProcesses, DartTest, DAP, VmService, DevTools, FlutterDaemon, FlutterRun, FlutterTest, WebDaemon
    
    Wed Nov 15 2023 [15:53:05] Log file started
    [3:53:07 PM] [General] [Info] Returning cached results for project search
    [3:53:08 PM] [General] [Info] Returning cached results for project search
    [3:53:08 PM] [General] [Info] Checking 1 projects for supported platforms
    [3:53:08 PM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [3:53:10 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:11 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:13 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:14 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:14 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:14 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:53:26 PM] [General] [Info] Starting debug session...
    [3:53:26 PM] [General] [Info]     workspace: C:\Users\PcUser\Documents\Projects\FlutterApp
    [3:53:26 PM] [General] [Info] Setting cwd based on likely entry point: C:\Users\PcUser\Documents\Projects\FlutterApp
    [3:53:26 PM] [General] [Info] Using open file as entry point: C:\Users\PcUser\Documents\Projects\FlutterApp\lib\main.dart
    [3:53:26 PM] [General] [Info] Using workspace as cwd: C:\Users\PcUser\Documents\Projects\FlutterApp
    [3:53:26 PM] [General] [Info] Detected launch project as Flutter
    [3:53:26 PM] [General] [Info] Using Flutter debug adapter for this session
    [3:53:26 PM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [3:53:31 PM] [General] [Info] Returning cached promise for getSupportedPlatforms()
    [3:54:47 PM] [Analyzer] [Info] ==> Content-Length: 319
    [3:54:47 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":12,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C%3A/Users/PcUser/Documents/Projects/FlutterApp/lib/main.dart"},"range":{"start":{"line":33,"character":1},"end":{"line":33,"character":1}},"context":{"diagnostics":[],"triggerKind":2}},"clientRequestTime":1700074487411}
    [3:54:47 PM] [Analyzer] [Info] <== Content-Length: 716
    Content-Type: application/vscode-jsonrpc; charset=utf-8
    [3:54:47 PM] [Analyzer] [Info] <== {"id":12,"jsonrpc":"2.0","result":[{"command":{"arguments":[{"path":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp\\lib\\main.dart","autoTriggered":true}],"command":"edit.sortMembers","title":"Sort Members"},"kind":"source.sortMembers","title":"Sort Members"},{"command":{"arguments":[{"path":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp\\lib\\main.dart","autoTriggered":true}],"command":"edit.organizeImports","title":"Organize Imports"},"kind":"source.organizeImports","title":"Organize Imports"},{"command":{"arguments":[{"path":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp\\lib\\main.dart","autoTriggered":true}],"command":"edit.fixAll","title":"Fix All"},"kind":"source.fixAll","title":"Fix All"}]}
    Wed Nov 15 2023 [15:55:21] Log file ended
    
  4. DanTup commented on Nov 16, 2023

    @DanTup
    Member

    Can you try the following:

    • Open a terminal
    • Run the command C:\Flutter\flutter\bin\flutter.bat daemon -v
    • Paste the string [{"id":"1","method":"device.enable"}] and press <enter>
    • Wait 10s
    • Press Ctrl+C to terminate the process
    • Copy the full output from when you started the command until the end
    • Paste/attach it here (removing anything sensitive)

    Thanks!

  5. GusBovo commented on Nov 16, 2023

    @GusBovo
    Author

    Here is the output:

    
    PS C:\Users\PcUser\Documents\Projects\FlutterApp> C:\Flutter\flutter\bin\flutter.bat daemon -v
    [ +190 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [   +9 ms] 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 'LegacyCanvasKitRemover' is not required, skipping update.
    [   +4 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.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +66 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [        ] 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 'LegacyCanvasKitRemover' 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.
    [        ] 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.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] 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.
    [{"event":"daemon.connected","params":{"version":"0.6.1","pid":204}}]
    [ +163 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [ +196 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [        ] openjdk version "17.0.6" 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [{"event":"daemon.logMessage","params":{"level":"status","message":"Starting device daemon..."}}]
    [{"id":"1","method":"device.enable"}]
    
    
  6. GusBovo commented on Nov 16, 2023

    @GusBovo
    Author

    I am sorry, missed half of it while copying. Here is the rest of it:

    
    [{"id":"1"}]
    [+22472 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [{"event":"device.added","params":{"id":"windows","name":"Windows","platform":"windows-x64","emulator":false,"category":"desktop","platformType":"windows","ephemeral":false,"emulatorId":null,"sdk":"Microsoft Windows [versÆo 10.0.22631.2506]","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":true,"hardwareRendering":true,"startPaused":true}}}]
    [{"event":"device.added","params":{"id":"chrome","name":"Chrome","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null,"sdk":"Google Chrome 119.0.6045.124","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":false,"hardwareRendering":true,"startPaused":true}}}]
    [{"event":"device.added","params":{"id":"edge","name":"Edge","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null,"sdk":"Microsoft Edge 119.0.2151.58","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":false,"hardwareRendering":true,"startPaused":true}}}]
    [+2250 ms] List of devices attached
    
    
                        * daemon not running; starting now at tcp:5037
                        * daemon started successfully
    [+4008 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +50 ms] List of devices attached
    [+4010 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +51 ms] List of devices attached
    [+4011 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +50 ms] List of devices attached
    [+4003 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +50 ms] List of devices attached
    [+4003 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +50 ms] List of devices attached
    [+4013 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +50 ms] List of devices attached
    [+4012 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +51 ms] List of devices attached
    [+4010 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +51 ms] List of devices attached
    [+4010 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +49 ms] List of devices attached
    [+4007 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +49 ms] List of devices attached
    
    
  7. DanTup commented on Nov 21, 2023

    @DanTup
    Member

    Sorry for the delay. In the most recent log you posted, there are some devices registered, so I guess the question is why this is different when you run from the terminal compared to when VS Code runs.

    Could you try this:

    1. Run the Flutter: Run Flutter Doctor command from in VS Code (when there are no devices available), and also run flutter doctor -v from the terminal (where the devices show up), and post both of them here.
    2. Add "dart.flutterAdditionalArgs": [ "-v" ], to your VS Code user or workspace settings and capture the same daemon log noted above (Unable to select devices or start debugging Flutter apps when with certain builds of "git" on PATH (msys2, devkitpro) #4840 (comment)), which this time should be more verbose

    Thanks!

  8. GusBovo commented on Nov 21, 2023

    @GusBovo
    Author

    Hello again! I am sending the logs as requested.

    Since I changed "dart.flutterAdditionalArgs": [ "-v" ], before running '> Flutter: Run Flutter Doctor', it seems like it also got more verbose, hopefully it helps.

    '> Flutter: Run Flutter Doctor log'
    [flutter] flutter -v doctor -v
    [  +95 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [   +7 ms] 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 'LegacyCanvasKitRemover' 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.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +76 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [        ] 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 'LegacyCanvasKitRemover' 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.
    [        ] 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.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] 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.
    [  +52 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [ +191 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [        ] openjdk version "17.0.6" 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [  +12 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [ +175 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [        ] openjdk version "17.0.6" 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [ +272 ms] executing: [C:\Flutter\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%ar
    [  +81 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%ar
    [        ] 4 weeks ago
    [  +21 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java --version
    [ +191 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java --version
    [        ] openjdk 17.0.6 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [  +11 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
    [  +79 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
    [        ] [
                 {
                   "instanceId": "f038a3d2",
                   "installDate": "2023-06-15T13:47:26Z",
                   "installationName": "VisualStudio/17.6.3+33801.468",
                   "installationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
                   "installationVersion": "17.6.33801.468",
                   "productId": "Microsoft.VisualStudio.Product.Community",
                   "productPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe",
                   "state": 4294967295,
                   "isComplete": true,
                   "isLaunchable": true,
                   "isPrerelease": false,
                   "isRebootRequired": false,
                   "displayName": "Visual Studio Community 2022",
                   "description": "",
                   "channelId": "VisualStudio.17.Release",
                   "channelUri": "https://aka.ms/vs/17/release/channel",
                   "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
                   "installedChannelId": "VisualStudio.17.Release",
                   "installedChannelUri": "https://aka.ms/vs/17/release/channel",
                   "releaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.6#17.6.3",
                   "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
                   "updateDate": "2023-06-15T13:47:26.6847779Z",
                   "catalog": {
                     "buildBranch": "d17.6",
                     "buildVersion": "17.6.33801.468",
                     "id": "VisualStudio/17.6.3+33801.468",
                     "localBuild": "build-lab",
                     "manifestName": "VisualStudio",
                     "manifestType": "installer",
                     "productDisplayVersion": "17.6.3",
                     "productLine": "Dev17",
                     "productLineVersion": "2022",
                     "productMilestone": "RTW",
                     "productMilestoneIsPreRelease": "False",
                     "productName": "Visual Studio",
                     "productPatchVersion": "3",
                     "productPreReleaseMilestoneSuffix": "1.0",
                     "productSemanticVersion": "17.6.3+33801.468",
                     "requiredEngineVersion": "3.6.2115.31769"
                   },
                   "properties": {
                     "campaignId": "2030:26ea5e7fc785438e9bfd8012f677e99f",
                     "channelManifestId": "VisualStudio.17.Release/17.6.3+33801.468",
                     "nickname": "",
                     "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
                   }
                 }
               ]
    [   +4 ms] executing: reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0 /v InstallationFolder
    [  +36 ms] Exit code 0 from: reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0 /v InstallationFolder
    [        ] HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
                   InstallationFolder    REG_SZ    C:\Program Files (x86)\Windows Kits\10\
    [  +11 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +39 ms] [!] Flutter (Channel stable, 3.13.9, on Microsoft Windows [versÆo 10.0.22631.2715], locale pt-BR)
    [   +1 ms]     • Flutter version 3.13.9 on channel stable at C:\Flutter\flutter
    [        ]     ! Upstream repository unknown source is not a standard remote.
    [        ]       Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    [        ]     • Framework revision d211f42860 (4 weeks ago), 2023-10-25 13:42:25 -0700
    [        ]     • Engine revision 0545f8705d
    [        ]     • Dart version 3.1.5
    [        ]     • DevTools version 2.25.0
    [        ]     • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    [        ] [√] Windows Version (Installed version of Windows is version 10 or higher)
    [ +122 ms] List of devices attached
    [  +56 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +72 ms] List of devices attached
    [+3128 ms] [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [        ]     • Android SDK at C:\Users\PcUser\AppData\Local\Android\Sdk
    [        ]     • Platform android-34, build-tools 34.0.0
    [        ]     • ANDROID_HOME = C:\Users\PcUser\AppData\Local\Android\Sdk
    [        ]     • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    [        ]     • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    [        ]     • All Android licenses accepted.
    [   +1 ms] [√] Chrome - develop for the web
    [        ]     • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    [   +1 ms] [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.3)
    [        ]     • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    [        ]     • Visual Studio Community 2022 version 17.6.33801.468
    [        ]     • Windows 10 SDK version 10.0.22000.0
    [   +1 ms] [√] Android Studio (version 2022.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 17.0.6+0-b2043.56-9586694)
    [        ] [√] VS Code (version 1.84.2)
    [        ]     • VS Code at C:\Users\PcUser\AppData\Local\Programs\Microsoft VS Code
    [        ]     • Flutter extension version 3.76.0
    [        ] [√] Connected device (3 available)
    [        ]     • Windows (desktop) • windows • windows-x64    • Microsoft Windows [versÆo 10.0.22631.2715]
    [        ]     • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.124
    [        ]     • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.72
    [        ] [√] Network resources
    [        ]     • All expected network resources are available.
    [        ] ! Doctor found issues in 1 category.
    [  +14 ms] "flutter doctor" took 4.702ms.
    [ +184 ms] ensureAnalyticsSent: 167ms
    [        ] Running 0 shutdown hooks
    [        ] Shutdown hooks complete
    [        ] exiting with code 0
    exit code 0
    
    Details
  9. GusBovo commented on Nov 21, 2023

    @GusBovo
    Author
    Terminal Flutter Doctor -v log
    PS C:\Users\PcUser\Documents\Projects\FlutterApp> flutter doctor -v
    [!] Flutter (Channel stable, 3.13.9, on Microsoft Windows [versÆo 10.0.22631.2715], locale pt-BR)
        • Flutter version 3.13.9 on channel stable at C:\Flutter\flutter
        ! Upstream repository unknown source is not a standard remote.
          Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
        • Framework revision d211f42860 (4 weeks ago), 2023-10-25 13:42:25 -0700
        • Engine revision 0545f8705d
        • Dart version 3.1.5
        • DevTools version 2.25.0
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to
          perform update checks and upgrades.
    
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    
    [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at C:\Users\PcUser\AppData\Local\Android\Sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = C:\Users\PcUser\AppData\Local\Android\Sdk
        • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.3)
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
        • Visual Studio Community 2022 version 17.6.33801.468
        • Windows 10 SDK version 10.0.22000.0
    
    [√] Android Studio (version 2022.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 17.0.6+0-b2043.56-9586694)
    
    [√] VS Code (version 1.84.2)
        • VS Code at C:\Users\PcUser\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.76.0
    
    [√] Connected device (3 available)
        • Windows (desktop) • windows • windows-x64    • Microsoft Windows [versÆo 10.0.22631.2715]
        • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.124
        • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.72
    
    [√] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
  10. GusBovo commented on Nov 21, 2023

    @GusBovo
    Author
    Daemon log with additional args
    !! ⚠️ PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING ⚠️ !!
    Dart Code extension: 3.76.1
    Flutter extension: 3.76.0 (not activated)
    
    App: Visual Studio Code
    App Host: desktop
    Version: win 1.84.2
    
    
    Logging Categories:
        FlutterDaemon
    
    Tue Nov 21 2023 [16:48:35 GMT-0300 ] Log file started
    [4:48:35 PM] [FlutterDaemon] [Info] Spawning C:\Flutter\flutter\bin\flutter.bat with args ["-v","daemon"]
    [4:48:35 PM] [FlutterDaemon] [Info] ..  in C:\Flutter\flutter
    [4:48:35 PM] [FlutterDaemon] [Info] ..  with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code","FLUTTER_ROOT":"C:\\Flutter\\flutter"}}
    [4:48:35 PM] [FlutterDaemon] [Info]     PID: 13136
    [4:48:36 PM] [FlutterDaemon] [Error] [ +136 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [  +12 ms] 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 'LegacyCanvasKitRemover' is not required, skipping update.
    [  +12 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.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [   +4 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [ +122 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Error] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
    [4:48:36 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.connected","params":{"version":"0.6.1","pid":10580}}]
    [4:48:36 PM] [FlutterDaemon] [Info] ==> [{"id":"1","method":"device.enable"}]
    [4:48:36 PM] [FlutterDaemon] [Info] ==> [{"id":"2","method":"emulator.getEmulators"}]
    [4:48:36 PM] [FlutterDaemon] [Error] [ +202 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [4:48:37 PM] [FlutterDaemon] [Error] [ +350 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [4:48:37 PM] [FlutterDaemon] [Error] [        ] openjdk version "17.0.6" 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [4:48:37 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"status","message":"Starting device daemon..."}}]
    [4:48:45 PM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [4:48:53 PM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [4:49:25 PM] [FlutterDaemon] [Info] ==> [{"id":"5","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\PcUser\\Documents\\Projects\\FlutterApp"}}]
    [4:49:32 PM] [FlutterDaemon] [Info] ==> [{"id":"6","method":"daemon.shutdown"}]
    [4:49:32 PM] [FlutterDaemon] [Info] Process C:\Flutter\flutter\bin\flutter.bat terminated! null, SIGTERM
    
  11. DanTup commented on Nov 22, 2023

    @DanTup
    Member

    Hmm, this is odd - everything looks identical to me in the logs, but the devices are not showing up when the process was spawned by VS Code.

    The only remaining thing I see different (besides potential env variables), is the working directory. Is it possible you can try the instructions from before (to run the daemon manually in the terminal in the same way that VS Code does) but in the same directory (the Flutter SDK) that VS Code is using? I don't expect the working directory makes a difference, but it's a variable worth eliminating.

    Can you try the following:

    • Open a terminal
    • Run the command cd C:\Flutter\flutter (new step)
    • Run the command C:\Flutter\flutter\bin\flutter.bat daemon -v
    • Paste the string [{"id":"1","method":"device.enable"}] and press <enter>
    • Wait 10s
    • Press Ctrl+C to terminate the process
    • Copy the full output from when you started the command until the end
    • Paste/attach it here (removing anything sensitive)

    @christopherfujino FYI in case you have any ideas. The device daemon is not returning any devices when run from VS Code (but does from the terminal). The output of flutter doctor is the same in both cases (eg. Visual Studio etc. are all detected). From the terminal, Chrome, Windows, Edge all show up - but for VS Code, none of them do.

  12. GusBovo commented on Nov 22, 2023

    @GusBovo
    Author

    I've checked my environment variables, and flutter seems to be correctly set.

    What I have just now noticed is that – after you pointed out which devices are actually showing in the logs – it should also display a Pixel 3a emulated device that I set up for this machine. I also checked to make sure there are no issues with the Android SDK environment variables, and they seem fine too.

    Here is the log as requested:

    Terminal log
    PS C:\Flutter\flutter> .\bin\flutter.bat daemon -v
    [  +96 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [   +8 ms] 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 'LegacyCanvasKitRemover' is not required, skipping update.
    [   +4 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.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +65 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [        ] 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 'LegacyCanvasKitRemover' 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.
    [        ] 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.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] 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.
    [{"event":"daemon.connected","params":{"version":"0.6.1","pid":10500}}]
    [  +90 ms] executing: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [ +179 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jbr\bin\java -version
    [        ] openjdk version "17.0.6" 2023-01-17
               OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
               OpenJDK 64-Bit Server VM (build 17.0.6+0-b2043.56-9586694, mixed mode)
    [{"event":"daemon.logMessage","params":{"level":"status","message":"Starting device daemon..."}}]
    [{"id":"1","method":"device.enable"}]
    [{"id":"1"}]
    [+25332 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [{"event":"device.added","params":{"id":"windows","name":"Windows","platform":"windows-x64","emulator":false,"category":"desktop","platformType":"windows","ephemeral":false,"emulatorId":null,"sdk":"Microsoft Windows [versÆo 10.0.22631.2715]","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":true,"hardwareRendering":true,"startPaused":true}}}]
    [{"event":"device.added","params":{"id":"chrome","name":"Chrome","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null,"sdk":"Google Chrome 119.0.6045.124","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":false,"hardwareRendering":true,"startPaused":true}}}]
    [{"event":"device.added","params":{"id":"edge","name":"Edge","platform":"web-javascript","emulator":false,"category":"web","platformType":"web","ephemeral":false,"emulatorId":null,"sdk":"Microsoft Edge 119.0.2151.72","capabilities":{"hotReload":true,"hotRestart":true,"screenshot":false,"fastStart":false,"flutterExit":false,"hardwareRendering":true,"startPaused":true}}}]
    [+2196 ms] List of devices attached
    
    
                        * daemon not running; starting now at tcp:5037
                        * daemon started successfully
    [+4015 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +48 ms] List of devices attached
    [+4010 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +46 ms] List of devices attached
    [+4011 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +46 ms] List of devices attached
    [+4011 ms] executing: C:\Users\PcUser\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
    [  +45 ms] List of devices attached
    
  13. DanTup commented on Nov 22, 2023

    @DanTup
    Member

    There may be two issues here then. From the logs before, I see the desktop/web devices showing up when you're running the daemon from the terminal, but they're not in VS Code's logs. Those things should be the same.

    If the physical Android device isn't showing up in either list, then that's a different issue and probably worth filing another issue for (in flutter/flutter), although I would first check you have Developer Mode and USB Debugging enabled (for some reason on my device I have to re-enable USB Debugging on every boot of the device) and try different cables.

    It's also worth noting that there has been a new stable release of Flutter since you first posted here (3.16). I would also suggest upgrading to that and see if it changes anything - there are lots of fixes in that release and it's just possible that you're hitting something that has been fixed.

  14. GusBovo commented on Nov 23, 2023

    @GusBovo
    Author

    Unfortunately, updating Flutter didn't solve the problem. I could send more logs, but the behavior seems to be the same.

    About the Android device: I might have phrased it incorrectly, as English is not my main language. What I meant to say is that I have a virtual device (an emulator from Android Studio) of a Pixel 3a, and it should also be visible alongside Windows, Chrome, and Edge (or at least, I believe it should). However, as you already pointed out, this is not the case.

    If I can help in any other way, I am available. However, I am sincerely considering reinstalling the OS during the weekend, which I believe would be a more definite solution, as it seems like some weird bug is affecting the functionality of Flutter in the system as a whole.

  15. 105 remaining items

  16. DanTup commented on May 21, 2024

    @DanTup
    Member

    I also created a repro for this issue here:

    https://github.com/DanTup/repro-dart-code-4840

    You can replace C:\Dev\Tools\msys64\usr\bin\cal.exe in fake_flutter.bat with a path to git.exe and run node ./daemon_client_run_me.js to test whether the issue is occurring or not.

    A full daemon log is the best way to verify the issue (or as @falsidge suggests, hard-code the full path to Git in flutter.bat).

  17. changed the title [-]Unable to select devices or start debugging Flutter apps[/-] [+]Unable to select devices or start debugging Flutter apps when with certain builds of "git" on PATH (msys2, devkitpro)[/+] on May 22, 2024
  18. modified the milestones: v3.90.0, v3.92.0 on May 29, 2024
  19. modified the milestones: v3.92.0, v3.94.0 on Jun 24, 2024
  20. tejasraman commented on Jul 8, 2024

    @tejasraman

    For me installing a Windows version of Git (from git scm) was enough to make the Flutter daemon work correctly - it seems to override MSYS git in the Windows PATH

  21. modified the milestones: v3.94.0, v3.96.0 on Jul 23, 2024
  22. modified the milestones: v3.96.0, On Deck on Aug 20, 2024
  23. edenbay commented on Nov 12, 2024

    @edenbay

    For me installing a Windows version of Git (from git scm) was enough to make the Flutter daemon work correctly - it seems to override MSYS git in the Windows PATH

    I'm not sure which of it did it, but I moved git scm above MSYS, also uninstalled MSYS. Either way Dart now recognizes my devices and emulators.

  24. MalindiJohn commented on Apr 30, 2025

    @MalindiJohn

    Experienced the same issue.

    I fixed it by updating Android SDK tools via android studio and everything worked for me.

    Not sure if this can fix your issue but you can try.

  25. theo-magne-act commented on Nov 12, 2025

    @theo-magne-act

    Experienced the same issue using https://github.com/andy-5/wslgit. Installing standard git for windows solved it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions