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

Regression: Dev UI fails with TemplateException #17915

Closed
knutwannheden opened this issue Jun 15, 2021 · 1 comment · Fixed by #17942
Closed

Regression: Dev UI fails with TemplateException #17915

knutwannheden opened this issue Jun 15, 2021 · 1 comment · Fixed by #17942
Assignees
Labels
area/dev-ui env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@knutwannheden
Copy link
Contributor

Describe the bug

When developing Dev UI cards in a multi-module Maven repo the Dev UI fails to render when accessing it using /q/dev. See screenshot below.

Here is the stack trace from the screenshot:

io.quarkus.qute.TemplateException: Property not found in expression {info:arcContainer.observers.size} in template io.quarkus.quarkus-arc/embedded.html on line 7
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$5.map(DevConsoleProcessor.java:503)
	at io.quarkus.qute.SingleResultNode.process(SingleResultNode.java:25)
	at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:29)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.lambda$renderData$3(TemplateImpl.java:110)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883)
	at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2251)
	at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:143)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderData(TemplateImpl.java:104)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderAsync(TemplateImpl.java:90)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.render(TemplateImpl.java:55)
	at io.quarkus.qute.Template.render(Template.java:109)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.sendMainPage(DevConsole.java:166)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:97)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:34)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:12)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:7)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:236)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:55)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:191)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:188)
	at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:49)
	at io.vertx.core.impl.EventLoopContext.lambda$emit$1(EventLoopContext.java:56)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected behavior

In Quarkus 1.13 any Quarkus extensions "local" to the multi-module Maven project which provided a Dev UI didn't render correctly, they were just rendered as standard extensions (without explicit Dev UI card). I think this is acceptable.

For multi-module Maven repos developing Quarkus extensions it would be nice if at least the cards provided by Quarkus itself would render properly.

Actual behavior

The Dev UI completely fails to render. I get the impression that this has to do with build steps using DevConsoleRuntimeTemplateInfoBuildItem(String, Supplier) and is possibly also related to the fact that ArtifactInfoUtil#groupIdAndArtifactId() is unable to determine the group-id and artifact-id of the corresponding extension.

To Reproduce

  1. Run the following inside the Quarkus Git repo: mvn quarkus:dev -f integration-tests/resteasy-jackson/
  2. Access http://localhost:8080/q/dev in the browser

Screenshots

image

Environment (please complete the following information):

Output of uname -a or ver

$ uname -a
MSYS_NT-10.0-19043 WIN10-KNUT 3.1.7-340.x86_64 2020-10-23 13:08 UTC x86_64 Msys

Output of java -version

$ java -version
openjdk version "11.0.9" 2020-10-20 LTS
OpenJDK Runtime Environment Zulu11.43+22-SA (build 11.0.9+11-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+22-SA (build 11.0.9+11-LTS, mixed mode)

GraalVM version (if different from Java)

Quarkus version or git rev

2.0.0.CR3

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

$ mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\dev\tools\apache-maven-3.6.3
Java version: 11.0.9, vendor: Azul Systems, Inc., runtime: C:\dev\tools\azul-zulu-enterprise-openjdk-jdk11.0.9-win_x64-mobi1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
@knutwannheden knutwannheden added the kind/bug Something isn't working label Jun 15, 2021
@quarkus-bot quarkus-bot bot added the env/windows Impacts Windows machines label Jun 15, 2021
@mkouba
Copy link
Contributor

mkouba commented Jun 16, 2021

@knutwannheden You're right that the code in DevConsoleRuntimeTemplateInfoBuildItem constructor is not able to find the corresponding groupId and artifactId. It fails now becuase the issue with "local" extensions was partially fixed in the PR for #16699.

We can try to supply the CurateOutcomeBuildItem that can be used here or the pom.properties like here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants