-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
server.close no longer works as of 3.4.0 #1990
Comments
Can't reproduce please provide example |
Hi, A follow up on here: We want to control what error to display to user if Webpack compilation fails in cypress command. So if webpack fails, we want to close server and exit without the Webpack long stack error message. As below, we have a class extends from
But with Thanks! |
@ruijieshi I can't understand you. It is related to this issue? Please provide more information (better reproducible test repo) |
/cc @Aghassi Can you provide more information? Maybe problem in code? We want to freeze currently master branch and start working on next major release, so if you want to fix it asap, please provide more context and information (better simple example), thanks |
@ruijieshi using |
@evilebottnawi I will get a demo repo together. I have not had a chance today to do so. Many meetings. |
I was able to reproduce the odd behavior. See code below. The key thing is the behavior of On 3.3.1 and 3.3.0 (at least)
🗒 Latest (3.7.1) has the same behavior as 3.4.0
|
Code
We have a block of code where we run webpack-dev-server and then kick off Cypress and Lighthouse. In each of these blocks of code our webpack builds fine, and the server runs. However, we can no longer kill the server with
server.close
. It does nothing (seemingly) and just leaves the process open and running.// webpack.config.js
Expected Behavior
The server should close when I call
server.close
Actual Behavior
The process remains open (we know this because our integration tests are failing because they hang on CI)
For Bugs; How can we reproduce the behavior?
Use the node api to start the server and then call
close
on it. I can't provide a good example right now since this is code internal to the company I work for. From what I can tell though in debugging:https://github.com/webpack/webpack-dev-server/blob/master/lib/servers/SockJSServer.js#L57
The above line doesn't work because the instance it is calling
close
on doesn't expose a close function. Below is the object I get back if I log out whatconnection
is.The above is called via
https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js#L765
Which prior to
3.4.0
, was an empty array in our case.What I'm trying to figure out is how the change to the internal
SockJS
server setup is effecting this.For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: