quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Quarkus fire Arc NPE if multiple requests arrive during a dev restart

Open ia3andy opened this issue 2 weeks ago • 3 comments

Describe the bug

I am not really sure if it is a Quarkus or Web Bundler or Roq issue.

Expected behavior

Should load properly on both browser

Actual behavior

One of the browser display a NPE

How to Reproduce?

https://code.quarkus.io/d?e=io.quarkiverse.roq%3Aquarkus-roq&cn=code.quarkus.io

  • start quarkus dev
  • open in chrome and in firefox
  • change the content/index.html <h1> content

Look in the browsers

No issue with just one browser, and no issue with two tabs in chrome (very weird)

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.30.2

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

ia3andy avatar Dec 08 '25 15:12 ia3andy

/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc)

quarkus-bot[bot] avatar Dec 08 '25 15:12 quarkus-bot[bot]

@ia3andy I looked at VertxHttpHotReplacementSetup#handleHotReplacementRequest(RoutingContext) and it seems to be a timing issue. This check is just "best effort" and it's good enough unless quarkus-web-bundler is used, where a change results in a simultaneous page reload.

In other words, when io.quarkiverse.web.bundler.runtime.devmode.ChangeEventHandler#onChange() sends SSE events to the connected clients and they reload the page, one of the checks mentioned above may happen before DevConsoleManager.setDoingHttpInitiatedReload(true) is called and so the application is restarted right in the hands of the other request.

Keep in mind, that a change in a Qute template results in app restart unless quarkus.qute.dev-mode.no-restart-templates is used. The reason for this is that we want to trigger build-time validations.

I'm not quite sure how to fix that properly.

mkouba avatar Dec 09 '25 08:12 mkouba

No issue with just one browser, and no issue with two tabs in chrome (very weird)

FTR I was able to reproduce the problem with multiple tabs on Firefox.

mkouba avatar Dec 09 '25 08:12 mkouba