Skip to content

flutter run doesn't unforward ports used for remote debugging. #45948

Closed

Description

@blasten

Steps to Reproduce

flutter run -v in examples/hello_world

Target Platform: android

Unlike flutter attach, flutter run never calls device.unforward(..) which removes the port binding.

I tested on v1.9.1+hotfix.6 and master.

Logs

[STDERR] [   +6 ms] Error waiting for a debug connection: ProcessException: Process exited abnormally:2019-12-02T14:07:18.406306: 
2019-12-02T14:07:18.406419: [STDERR]            adb: error: cannot bind listener: Too many open files
[STDERR]              Command: /usr/local/share/android-sdk/platform-tools/adb -s ZY22458D8C forward tcp:0 tcp:44386

Full log: https://gist.github.com/blasten/2845cae36c8d238a760a1b91a39ed9ab

cc @zanderso

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Dec 3, 2019
  2. blasten commented on Dec 3, 2019

    @blasten
    Author

    Cocoon may kill the adb server, which releases the file descriptors. https://github.com/flutter/cocoon/blob/1cb0d9fb0d28a1302c6f0585c7a53174503cc50b/agent/lib/src/adb.dart#L123. This might be the reason why the test is flaky.

  3. self-assigned this
    on Dec 3, 2019
  4. added this to the December 2019 milestone on Dec 3, 2019
  5. github-actions commented on Aug 25, 2021

    @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.

  6. locked as resolved and limited conversation to collaborators on Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions