Content-Length: 289063 | pFad | https://github.com/flutter/flutter/issues/148193

8E `flutter daemon` occasionally terminates when trying to invoke `adb` to list devices · Issue #148193 · flutter/flutter · GitHub
Skip to content

flutter daemon occasionally terminates when trying to invoke adb to list devices #148193

@andrewkolos

Description

@andrewkolos

This issue tracks solving the root issue discussed in #125971. To summarize the issue, flutter daemon occasionally exits when trying to run adb devices -l due to the command completing with an error. Source of this call:

try {
text = (await _processUtils.run(<String>[_androidSdk!.adbPath!, 'devices', '-l'],
throwOnError: true,
)).stdout.trim();
} on ProcessException catch (exception) {
throwToolExit(
'Unable to run "adb", check your Android SDK installation and '
'$kAndroidHome environment variable: ${exception.executable}\n'
'Error details: ${exception.message}',
);
}

See #125971 (comment), which includes the exception that comes from invoking adb devices -l. Specifically, we see

daemon still not running
error: cannot connect to daemon at tcp:5037: Connection refused"}}]

While it's not clear what the root cause of this failure is, it's possible that the flutter tool could prevent or workaround it. See #125971 (comment). It's possible we can use something like adb reconnect, which should restart the connection to the server from the host side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listteam-androidOwned by Android platform teamtriaged-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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/flutter/flutter/issues/148193

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy