Skip to content

Error: server closed unexpectedly on gitlab CI #338

Description

@mbehzad

Bug report

Hi,

  • version
    1.14.0
  • platform
    node 18.12.0 on linux via docker image cypress/browsers:node18.12.0-chrome106-ff106 in Gitlab.CI
  • expected behavior
    After tests are finished to stop the child processes and exit
  • actual behavior
    Tests pass successfully, then it seems start-server-and-test stops the processes for the server (tested with both a webpack dev server started via a node script and also when the server is a simple http-server server called via a npm script), but suddenly the Error: server closed unexpectedly error is thrown. This doesn't happen when the npm script is run locally.
    ✔  All specs passed!                        00:08        6        6        -        -        -  
2022-12-02T15:34:29.508Z start-server-and-test getting child processes
2022-12-02T15:34:29.516Z start-server-and-test stopping child processes
2022-12-02T15:34:29.516Z start-server-and-test stopping server
2022-12-02T15:34:29.517Z start-server-and-test getting child processes
2022-12-02T15:34:29.517Z start-server-and-test getting child processes
2022-12-02T15:34:29.522Z start-server-and-test stopping child processes
2022-12-02T15:34:29.522Z start-server-and-test stopping server
Error: server closed unexpectedly
    at ChildProcess.onClose (/builds/frontend/node_modules/start-server-and-test/src/index.js:75:14)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
ERROR: Job failed: exit code 1

cheers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions