Skip to content

wait-on issues with Node.js 18 #811

@MikeMcC399

Description

@MikeMcC399

Problem description

With the GitHub migration of runners to use Node.js 18 as default on Feb 18, 2023, some workflows using the built-in wait-on parameter of cypress-io/github-action are now were failing: for example, #760 with Error: connect ECONNREFUSED 127.0.0.1:4200. Edit: no longer failing due to workaround implementation.

This affects development webservers which are not listening on both IPv4 and IPv6. Some, like vite, can be set to start and listen on 0.0.0.0 which solves the issue. Others don't seem to be so flexible.

It also affects the alternate method of using start-server-and-test as an argument to the built-in wait-on parameter. Due to the fact that start-server-and-test depends on the separate npm module wait-on and this external wait-on also trips up on Node.js 18 in certain configurations, it also becomes a problem for start-server-and-test.

Workarounds can be found, such as using the IPv6 loopback address ::1 instead of the more generic localhost hostname. The workarounds differ depending on the dev webserver and the environment it is being run under.

Questions

  1. Is it necessary for cypress-io/github-action to adapt to dev webservers which are not listening on both IPv4 and IPv6, or is the onus on the dev webserver providers to make changes and on users to find suitable workarounds?
  2. If changes are made to cypress-io/github-action, is the older got v11 still the right choice for src/ping.js?
  3. Should cypress-io/github-action migrate to the current got v12 v13 version? This is a breaking change due to the migration from CommonJS to native ESM.
  4. Or should another technology be used to check if a webserver is running?

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions