Skip to content

Create vm service handshake for iOS without mDNS #46724

Description

@jonahwilliams

We should support connecting to an iOS application via run without requiring mDNS, which has a number of issues (tracked in #46705). We still plan to harden mDNS as much as we can, but it is likely that it won't be able to work in all circumstances.

This requires one or two updates to the vm service

  • We modify the behavior (or support via a new flag) of specifying an observatory port for the vm service. Currently, if the vm service cannot bind to a specified port the entire process dies. Instead this would be modified to fallback to binding to port 0 (select available port).
  • We provide a new flag for auth codes (or disable them) which allows the tool to specify a random string (or generated through other means) to use instead.

The tool provides these flags to the dart VM via the launch arguments. Then, it attempts to connect to the port/path it specified. If it fails or times out during this process, it might be the case that the port was not available. If so, the tool falls back to mDNS.

Enhancements

If there was a way to ensure that a port was available before the tool specified it, then we might be able to guarantee that we almost always hit the happy path.

Caveats

This procedure won't work for attach, since the tool does not launch the application in this case it does not have a chance to provide the necessary launch arguments.

cc @dnfield @zanderso @mehmetf @bkonyi

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Dec 10, 2019
  2. added
    c: new featureNothing broken; request for a new capability
    platform-iosiOS applications specifically
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Dec 11, 2019
  3. github-actions commented on Aug 23, 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.

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

Metadata

Metadata

Assignees

Labels

c: new featureNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.dependency: dartDart team may need to help usplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions