PiT 23.2: CDI and Quarkus starters need an HTTP hit for start compiling the frontend
See original GitHub issueDescription of the bug
Quarkus and CDI starters got stuck at some point before compiling the frontend. By sending an HTTP request, the process continues compiling the frontend. It din’t happen with webpack or in other starters like spring flow
Expected behavior
Frontend compilation in dev mode does not need any http trigger for compiling the frontend in dev mode
Minimal reproducible example
base-starter-flow-quarkus
- First double check that you dont have any browser with an open tab pointing to
http://localhost:8080
- second download and run the application
git clone https://github.com/vaadin/base-starter-flow-quarkus.git
cd base-starter-flow-quarkus
mvn
- check that It gets stuck (for ever) at this point:
2022-09-06 14:57:15,043 INFO [com.vaa.flo.ser.fro.TaskUpdatePackages] (ForkJoinPool.commonPool-worker-11) using '/usr/local/bin/npm --no-update-notifier --no-audit --scripts-prepend-node-path=true --ignore-scripts install' for frontend package installation
2022-09-06 14:57:21,391 INFO [com.vaa.flo.ser.fro.TaskUpdatePackages] (ForkJoinPool.commonPool-worker-11) Frontend dependencies resolved successfully.
2022-09-06 14:57:22,323 INFO [com.vaa.flo.ser.fro.TaskCopyFrontendFiles] (ForkJoinPool.commonPool-worker-11) Copying frontend resources from jar files ...
2022-09-06 14:57:22,353 INFO [com.vaa.flo.ser.fro.TaskCopyFrontendFiles] (ForkJoinPool.commonPool-worker-11) Visited 20 resources. Took 29 ms.
- finally visit http://localhost:8080, and it will continue frontend compilation
skeleton-starter-flow-cdi
- Close all tabs in your browser
- download and run the starter
git clone https://github.com/vaadin/skeleton-starter-flow-cdi.git
cd skeleton-starter-flow-cdi
mvn
- It is stuck for ever
15:00:53,498 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 8) WFLYUT0021: Registered web context: '/' for server 'default-server'
15:00:53,528 INFO [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0010: Deployed "project-base-flow-cdi-1.0-SNAPSHOT.war" (runtime-name : "project-base-flow-cdi-1.0-SNAPSHOT.war")
15:00:55,690 INFO [com.vaadin.flow.server.frontend.TaskUpdatePackages] (ForkJoinPool.commonPool-worker-1) using '/usr/local/bin/npm --no-update-notifier --no-audit --scripts-prepend-node-path=true --ignore-scripts install' for frontend package installation
15:01:03,318 INFO [com.vaadin.flow.server.frontend.TaskUpdatePackages] (ForkJoinPool.commonPool-worker-1) Frontend dependencies resolved successfully.
15:01:04,314 INFO [com.vaadin.flow.server.frontend.TaskCopyFrontendFiles] (ForkJoinPool.commonPool-worker-1) Copying frontend resources from jar files ...
15:01:04,360 INFO [com.vaadin.flow.server.frontend.TaskCopyFrontendFiles] (ForkJoinPool.commonPool-worker-1) Visited 23 resources. Took 46 ms.
- visit http://localhost:8080 and it will start frontend compilation
Versions
- Vaadin / Flow version: 23.2
Issue Analytics
- State:
- Created a year ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Creating Your First Application - Quarkus
The solution is located in the getting-started directory. 4. Bootstrapping the project. The easiest way to create a new Quarkus project is to...
Read more >Weld 5.1.0.Final - CDI Reference Implementation - JBoss.org
Starting with CDI 2.0, the specification covers the use of CDI in the ... To inject HTTP parameters, we need to define a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just as a note: If you use the browser launcher when in dev mode, then the value of load on startup does not matter as the browser will be opened and trigger the servlet deployment immediately when the server is up and running. This is how our Spring Boot support works
When using Vite, the thread running node tasks, launched by DevModeInitializer, waits until
VaadinServlet.getFrontendMapping()
returns a not null value; Vite is started only when the command is completed. Value forfrontendMapping
is set duringServlet.init
, and, at least with Quarkus, the method seems to be invoked on the first http request