start-server-and-test icon indicating copy to clipboard operation
start-server-and-test copied to clipboard

Regression wait-on

Open akoidan opened this issue 5 years ago • 4 comments

This worked perfectly on version [email protected]. After updating to version [email protected] this package stopped working.

Platform [email protected]
Node v14.12.0

Reproduce

yarn init
yarn add [email protected]
yarn add [email protected]
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

akoidan avatar Sep 30 '20 08:09 akoidan

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

carhartl avatar Nov 08 '21 14:11 carhartl

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

herrmannplatz avatar Apr 11 '22 14:04 herrmannplatz

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

rtrembecky avatar May 11 '22 22:05 rtrembecky

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.

aarowman avatar Jan 31 '23 23:01 aarowman