Skip to content

connection issue with nodejs 17 on system where localhost will resolve by default to an ipv6 address #209

Closed
@rpl

Description

@rpl

As described in this README.md the adb.createClient's host option defaults to 'localhost' when not explicitly specified otherwise.

This becomes an issue with nodejs 17, where the default behavior of the dns resolution has been changed to prefer an ipv6 address if one is offered (which varies based on the operating systems and/or how the localhost hostname resolution is configured), see nodejs/node#40537 and nodejs/node#39987.

Other npm packages have had similar issues (e.g. see chrome-launcher issue GoogleChrome/chrome-launcher#251 and the related fix released GoogleChrome/chrome-launcher#253).

As a short term solution, users of this package can explicitly pass '127.0.0.1' as the host configuration option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions