Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression wait-on #283

Open
akoidan opened this issue Sep 30, 2020 · 4 comments
Open

Regression wait-on #283

akoidan opened this issue Sep 30, 2020 · 4 comments

Comments

@akoidan
Copy link

akoidan commented Sep 30, 2020

This worked perfectly on version start-server-and-test@1.10.8. After updating to version start-server-and-test@1.11.4 this package stopped working.

Platform MacOS@10.15.3
Node v14.12.0

Reproduce

yarn init
yarn add servor@4.0.2
yarn add start-server-and-test@1.11.4
mkdir dist; echo "<div>Hello</div>" > dist/index.html
yarn run start-server-and-test 'servor dist index.html 8080' http://localhost:8080 'echo done'

expected behavior:
done on stdout and process' exit.

actual behavior:

yarn run v1.22.5
$ /private/tmp/lol/node_modules/.bin/start-server-and-test 'servor dist index.html 8080' http://localhost:8080 'echo done'
1: starting server using command "servor dist index.html 8080"
and when url "[ 'http//localhost:8080' ]" is responding with HTTP status code 200
running tests using command "echo done"


  🗂  Serving:	/private/tmp/lol/dist

  🏡 Local:	http://localhost:8080
  📡 Network:	http://192.168.1.144:8080
  📡 Network:	http://169.254.35.22:8080

Error: Timed out waiting for: http//localhost:8080
    at MergeMapSubscriber.project (/private/tmp/lol/node_modules/wait-on/lib/wait-on.js:130:25)
    at MergeMapSubscriber._tryNext (/private/tmp/lol/node_modules/rxjs/internal/operators/mergeMap.js:67:27)
    at MergeMapSubscriber._next (/private/tmp/lol/node_modules/rxjs/internal/operators/mergeMap.js:57:18)
    at MergeMapSubscriber.Subscriber.next (/private/tmp/lol/node_modules/rxjs/internal/Subscriber.js:66:18)
    at AsyncAction.dispatch [as work] (/private/tmp/lol/node_modules/rxjs/internal/observable/timer.js:31:16)
    at AsyncAction._execute (/private/tmp/lol/node_modules/rxjs/internal/scheduler/AsyncAction.js:71:18)
    at AsyncAction.execute (/private/tmp/lol/node_modules/rxjs/internal/scheduler/AsyncAction.js:59:26)
    at AsyncScheduler.flush (/private/tmp/lol/node_modules/rxjs/internal/scheduler/AsyncScheduler.js:52:32)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The server meanwhile was up and running

@carhartl
Copy link

carhartl commented Nov 8, 2021

I'm seeing the same with Node Node.js v17.0.1. and a Vite application..

younho9 added a commit to younho9/js-racingcar that referenced this issue Apr 9, 2022
`start-server-and-test`가 vite 서버 실행을 인지하지 못하는 문제가 있었음
- bahmutov/start-server-and-test#283

아래 링크 참고하여 `http-get` 사용하여 해결함
- https://docs.cypress.io/guides/continuous-integration/introduction#Solutions
@herrmannplatz
Copy link

Can confirm what @carhartl said. Works as expected on Node v16, but times out on v17

@rtrembecky
Copy link

I can double-confirm here, having issues with node 17, where 16 works. Have you guys figured out some workaround or something?

@aarowman
Copy link

aarowman commented Jan 31, 2023

Any updates on this?

We are seeing an issue too, using version 1.14 here, saw it with Node v16.

After start-server-and-test times out, the process does not exit, just hangs there indefinitely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants