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

jest-dev-server can't detect used ports since 4.1.1 #233

Closed
Dilatorily opened this issue Apr 22, 2019 · 8 comments
Closed

jest-dev-server can't detect used ports since 4.1.1 #233

Dilatorily opened this issue Apr 22, 2019 · 8 comments
Assignees
Labels

Comments

@Dilatorily
Copy link
Contributor

💥 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: jest-dev-server@4.0.0

Stopped working in version: jest-dev-server@4.1.1

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
@xiaoyuhen xiaoyuhen self-assigned this Apr 25, 2019
@gregberge
Copy link
Member

@xiaoyuhen any infos on this?

@sync
Copy link

sync commented Apr 30, 2019

Perhaps this is what is causing the issue: 59d796b

@xiaoyuhen
Copy link
Contributor

@sync

yeah, its a bug from this 59d796b commit.

I am working hard to fix it

@sync
Copy link

sync commented Apr 30, 2019

Don’t work too hard. Take the time and don’t stress about it ❤️

@xiaoyuhen
Copy link
Contributor

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 #235 PR. cc @sync @Dilatorily

@flo-sch
Copy link

flo-sch commented May 24, 2019

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)

@domoritz
Copy link

domoritz commented Feb 12, 2020

Hi @xiaoyuhen. In #236 (comment), you mentioned that a patch is on its way. When do you plan to publish a fix for jest-puppeteer? Or is this fixed?

@gregberge
Copy link
Member

Hi should be fixed in v8, please upgrade and reopen this issue if you experience the problem.

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

No branches or pull requests

6 participants