question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PiT 23.2: CDI and Quarkus starters need an HTTP hit for start compiling the frontend

See original GitHub issue

Description 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.

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.

Versions

  • Vaadin / Flow version: 23.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Artur-commented, Sep 13, 2022

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

1reaction
mcollovaticommented, Sep 12, 2022

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 for frontendMapping is set during Servlet.init, and, at least with Quarkus, the method seems to be invoked on the first http request

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found