Jest-puppeteer: jest-dev-server can't detect used ports since 4.1.1

Created on 22 Apr 2019  路  7Comments  路  Source: smooth-code/jest-puppeteer

馃挜 Regression Report

Since the latest release (4.1.1), jest-puppeteer will timeout when trying to detect if a port is used. I was able to narrow it down to the changes in jest-dev-server introduced in #227.

Last working version

Worked up to version: [email protected]

Stopped working in version: [email protected]

To Reproduce

Steps to reproduce the behavior:

  1. Start an express server on port 3000
  2. Set the server.port to 3000 in the jest-puppeteer.config.js file
  3. jest

Expected behavior

jest-puppeteer should be able to detect if the port is used, and the tests should pass.

Link to repl or repo (highly encouraged)

https://github.com/Dilatorily/jest-puppeteer-issue

Run npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard

Paste the results here:

## System:
 - OS: macOS Sierra 10.12.6
 - CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
 - Memory: 2.71 GB / 16.00 GB
 - Shell: 3.2.57 - /bin/bash
## Binaries:
 - Node: 11.14.0 - /usr/local/bin/node
 - Yarn: 1.15.2 - /usr/local/bin/yarn
 - npm: 6.9.0 - /usr/local/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
 - jest-puppeteer: ^4.1.1 => 4.1.1
bug 馃悰

Most helpful comment

Don鈥檛 work too hard. Take the time and don鈥檛 stress about it 鉂わ笍

All 7 comments

@xiaoyuhen any infos on this?

@sync

yeah, its a bug from this https://github.com/smooth-code/jest-puppeteer/commit/59d796b59c213b53c8842f2545fbaabf09d09dd4 commit.

I am working hard to fix it

Don鈥檛 work too hard. Take the time and don鈥檛 stress about it 鉂わ笍

it seems like we must set tcp prefixes, then wait-on package can find our server.

very sorry about the problem, it will fix on this https://github.com/smooth-code/jest-puppeteer/pull/235 PR. cc @sync @Dilatorily

Hej @xiaoyuhen, I have some issues with a local express instance using https.createServer ;
(The server itself starts but jest always show the timeout message Server has taken more than {whichever timeout duration I set up in jest-puppeteer.config.js} to start.)
(HTTP mode without certificates works fine)

As a side effect, the teardown is not invoked, and the local process continues to run after timeout.
--> Next time I launch the tests, I face listen EADDRINUSE: address already in use error.

Just wondering if this is related to this issue as well, and if #235 has been released already // is planned to be released?

(Nothing urgent on my side, just wish to know)

Hi @xiaoyuhen. In https://github.com/smooth-code/jest-puppeteer/issues/236#issuecomment-489136131, you mentioned that a patch is on its way. When do you plan to publish a fix for jest-puppeteer? Or is this fixed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

melissachang picture melissachang  路  6Comments

songguohfut picture songguohfut  路  6Comments

joshpitzalis picture joshpitzalis  路  3Comments

FezVrasta picture FezVrasta  路  4Comments

rodoabad picture rodoabad  路  3Comments