Skip to content

[tool] Flutter fails to parse single-space wireless ADB device output #189430

Closed

Description

@Ram-Dawson

Steps to reproduce

  1. Connect an Android device wirelessly through ADB.

  2. Confirm that adb devices -l contains a long mDNS serial followed by
    device with a single space:

    adb-0123456789abcdef._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates transport_id:1
    
  3. Run:

    flutter devices -v

Expected results

Flutter lists the wireless Android device, as Flutter 3.44.5 does for the same ADB output.

Actual results

Current Flutter master omits the wireless Android device and reports:

Unexpected failure parsing device information from adb output:
adb-0123456789abcdef._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates

Code sample

Code sample
# Prerequisite: connect an Android device wirelessly through ADB.

$ adb devices -l
List of devices attached
adb-0123456789abcdef._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates transport_id:1

$ flutter devices -v
...
Unexpected failure parsing device information from adb output:
adb-0123456789abcdef._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates

Screenshots or Video

Logs

Flutter Doctor output

Doctor output
[√] Flutter (Channel master, 3.47.0-1.0.pre-58, on Microsoft Windows [版本 10.0.26200.8737], locale zh-CN) [2.9s]
    • Flutter version 3.47.0-1.0.pre-58 on channel master at D:\Code\Flutter\SDK\versions\master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 11faf0ac6e (10 hours ago), 2026-07-13 21:22:25 +0000
    • Engine revision e9d26d4003
    • Dart version 3.14.0 (build 3.14.0-19.0.dev)
    • DevTools version 2.60.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
      enable-ios, cli-animations, enable-native-assets, enable-dart-data-assets, enable-record-use,
      enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration,
      enable-riscv64

[√] Windows Version (Windows 11 or higher, 25H2, 2009) [674ms]

[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1,498ms]
    • Android SDK at D:\Local\Android\Sdk
    • Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
    • Platform android-36.1, build-tools 36.0.0
    • ANDROID_HOME = D:\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
    • All Android licenses accepted.

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

[X] Visual Studio - develop Windows apps [10ms]
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Connected device (3 available) [378ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.26200.8737]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 150.0.7871.115
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 150.0.4078.65

[√] Network resources [1,234ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Activity

  1. saurabh-mirajkar commented on Jul 14, 2026

    @saurabh-mirajkar
    Contributor

    @Ram-Dawson Thanks for reporting this. This appears related to #180982. I was able to reproduce this on master. The device is detected correctly by ADB, but Flutter omits it due to the parsing failure. Routing for further investigation.

    latest master
    Flutter 3.47.0-1.0.pre-66 • channel master • https://github.com/flutter/flutter.git
    Framework • revision 2ac447c8ae (83 minutes ago) • 2026-07-14 15:36:24 +0530
    Engine • hash b30a75fcb8450a2137a01510029c7d87e600330e (revision ed0b4f97c8) (3 hours ago) • 2026-07-14 08:08:37.000Z
    Tools • Dart 3.14.0 (build 3.14.0-24.0.dev) • DevTools 2.60.0
    
  2. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-androidOwned by Android platform team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 14, 2026
  3. added
    P1High-priority issues at the top of the work list
    triaged-androidTriaged by Android platform team
    on Jul 14, 2026
  4. bkonyi commented on Jul 14, 2026

    @bkonyi
    Contributor

    Fixed by #189369.

  5. Ram-Dawson commented on Jul 15, 2026

    @Ram-Dawson
    ContributorAuthor

    Thanks for the update. I retested this against the current master at
    0637ea44d76945083d4560eda0998808e38bf263.

    I removed and rebuilt bin/cache/flutter_tools.snapshot before testing, to
    ensure that the Flutter tool was built from the current master source.

    The ADB output still has exactly one U+0020 space between the mDNS serial and
    device:

    adb-0123456789abcdef._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates transport_id:1
    

    flutter devices -v still reports:

    Unexpected failure parsing device information from adb output
    

    The current regex from #189369 still requires a two-space or tab delimiter:

    r'^(.*?)(?:\s{2,}|\t+)'

    Could this issue be reopened? If this single-space case is still in scope, I
    can also reopen PR #189431 with the targeted parser test and fallback fix.

  6. Ram-Dawson commented on Jul 20, 2026

    @Ram-Dawson
    ContributorAuthor

    @bkonyi I retested this on the current upstream master at 8005793c35626234e1894e38e11fdf6ebff8faca (Flutter 3.47.0-1.0.pre-125), and the single-space wireless ADB case still reproduces.

    I used a clean detached worktree at that revision and removed/rebuilt bin/cache/flutter_tools.snapshot before testing.

    adb devices -l reports the wireless device successfully:

    adb-dba66f46-H6hzHn._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates transport_id:7
    

    However, flutter devices -v still omits the Android device and reports:

    Unexpected failure parsing device information from adb output:
    adb-dba66f46-H6hzHn._adb-tls-connect._tcp device product:socrates model:22127RK46C device:socrates transport_id:7
    

    Could you advise whether reopening #189431 is the preferred next step, or whether you would prefer a new PR with the targeted parser test and fallback fix?

  7. github-actions commented on Aug 3, 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.

  8. locked as resolved and limited conversation to collaborators on Aug 3, 2026
  9. jmagman commented on Aug 19, 2026

    @jmagman
    Member

    Reopening per @Ram-Dawson's question. @bkonyi evidently this is still reproducing?

  10. unlocked this conversation on Aug 19, 2026
  11. CodeDoctorDE commented on Aug 19, 2026

    @CodeDoctorDE
    Contributor

    Thanks for reopening this.

    I can reproduce this same issue on Flutter 3.47.0 stable. In my case, adb devices -l detects the wireless device correctly, but flutter devices -v fails to parse it and does not list the device.

    The ADB output also has exactly one space between the mDNS device ID and device, matching the case described here.

    I originally reported this in #191119, which contains my full logs and screenshots:
    #191119

    That issue was closed as a duplicate because it was assumed that the issue was already fixed on master and had just not reached stable yet. Since #189430 has now been reopened for this single-space case, I wanted to add my reproduction here as well.

    This currently prevents me from using wireless debugging on Flutter stable. Once the fix for this case lands, would it be possible to consider cherry-picking it to the current 3.47 stable branch?

  12. Ram-Dawson commented on Aug 21, 2026

    @Ram-Dawson
    ContributorAuthor

    Thanks for reopening this. The single-space case was still reproducible after #189369, which is why I later filed #189972 and fixed it in #189973.

    #189973 was cherry-picked to the 3.47 release branch in #191296 and released in Flutter 3.47.1. The report on Flutter 3.47.0 is therefore expected to reproduce because that release predates the fix.

    Could @CodeDoctorDE please retry with Flutter 3.47.1 or newer? Assuming it no longer reproduces there, I believe this issue can be closed as fixed by #189973.

  13. CodeDoctorDE commented on Aug 21, 2026

    @CodeDoctorDE
    Contributor

    Hi, i tried it again in 3.47.1 and it works fantastic. Thanks for fixing it!
    I think this issue can be closed again

  14. github-actions commented on Sep 4, 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.

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

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions