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

[node 17] current v23 branch is not working #406

Closed
Tracked by #2982
ZheSun88 opened this issue Apr 7, 2022 · 4 comments
Closed
Tracked by #2982

[node 17] current v23 branch is not working #406

ZheSun88 opened this issue Apr 7, 2022 · 4 comments

Comments

@ZheSun88
Copy link
Contributor

ZheSun88 commented Apr 7, 2022

the current version is 23.0.4
running mvn wildfly:run failed (but working in production mode)

11:34:25,002 INFO  [stdout] (dev-server-output) ------------------ Frontend compilation failed. ------------------
11:34:25,002 INFO  [stdout] (dev-server-output)
11:34:27,027 WARN  [com.vaadin.base.devserver.AbstractDevServerRunner] (ForkJoinPool.commonPool-worker-19) Webpack port '62712' is defined but it's not working properly. Using a new free port...
11:34:27,027 INFO  [com.vaadin.base.devserver.AbstractDevServerRunner] (ForkJoinPool.commonPool-worker-19) Starting Webpack
11:34:30,919 INFO  [stdout] (ForkJoinPool.commonPool-worker-19)

after open the view

javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: Startup of Webpack failed. Output was:
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:52847/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.106:52847/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1c4f:5e5e:c164:e992]:52847/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Users\Tarek Oraby\Downloads\skeleton-starter-flow-cdi-23\skeleton-starter-flow-cdi-23\target\classes\META-INF\VAADIN\webapp, C:\Users\Tarek Oraby\Downloads\skeleton-starter-flow-cdi-23\skeleton-starter-flow-cdi-23\src\main\webapp' directory
Watchdog connection error. Terminating webpack process...

	at deployment.project-base-flow-cdi-1.0-SNAPSHOT.war//com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:301)
	at deployment.project-base-flow-cdi-1.0-SNAPSHOT.war//com.vaadin.cdi.CdiVaadinServlet.service(CdiVaadinServlet.java:67)
	at javax.servlet.api@2.0.0.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
	at io.undertow.servlet@2.2.14.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet@2.2.14.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.undertow.websocket@2.2.14.Final//io.un
....

Maven : apache-maven-3.8.4
Java version: 11.0.13,
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
node 17.4.0
npm 8.3.1

image

@ZheSun88 ZheSun88 changed the title current v23 branch is not working [node 17, windows] current v23 branch is not working Apr 8, 2022
@ZheSun88
Copy link
Contributor Author

ZheSun88 commented Apr 8, 2022

adding <requireHomeNodeExec>true</requireHomeNodeExec> to the vaadin maven plugin fix the issue.

@ZheSun88
Copy link
Contributor Author

ZheSun88 commented Apr 8, 2022

found one related ticket nodejs/node#40537

And here is a workaround with the wildfly maven plugin

mvn wildfly:run -Dwildfly.javaOpts="-Xms64m -Xmx512m -Djava.net.preferIPv4Stack=false -Djava.awt.headless=true -Djboss.modules.system.pkgs=org.jboss.byteman"

-Djava.net.preferIPv4Stack=false does the trick

@mcollovati
Copy link
Contributor

Just to add some context it seems that the problem happens because WatchDogServer binds to 0.0.0.0 (potentially because by default wildfly maven plugin sets -Djava.net.preferIPv4Stack=true system property), but when runWatchDog function defined in webpack.generated.js connects to localhost, it resolves it as ::1, and thus client receives a connect ECONNREFUSED and kills webpack process.

@ZheSun88 ZheSun88 changed the title [node 17, windows] current v23 branch is not working [node 17] current v23 branch is not working Apr 11, 2022
@ZheSun88
Copy link
Contributor Author

Tested with Vaadin 23.0.9.
this issue has been fixed already by vaadin/flow#13506

@manolo manolo mentioned this issue May 19, 2022
9 tasks
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

2 participants