vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
868 stars 58 forks source link

Starting an app using remote debug options causes the app not to start #2464

Open Artur- opened 1 month ago

Artur- commented 1 month ago

Describe the bug

npx @hilla/cli init --pre hilla-debug
cd hilla-debug
MAVEN_OPTS="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n" mvn

causes

java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Failed to configure Hilla engine: no runner succeeded. Set log level to debug to see more details.
    at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:772) ~[vaadin-dev-server-24.4.0.beta5.jar:na]
    at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:768) ~[vaadin-dev-server-24.4.0.beta5.jar:na]
    at com.vaadin.base.devserver.AbstractDevServerRunner.handleRequestInternal(AbstractDevServerRunner.java:631) ~[vaadin-dev-server-24.4.0.beta5.jar:na]
    at com.vaadin.base.devserver.AbstractDevServerRunner.handleRequest(AbstractDevServerRunner.java:617) ~[vaadin-dev-server-24.4.0.beta5.jar:na]
    at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1584) ~[flow-server-24.4.0.beta5.jar:24.4.0.beta5]
    at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) ~[flow-server-24.4.0.beta5.jar:24.4.0.beta5]
    at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) ~[vaadin-spring-24.4.0.beta5.jar:na]

Setting the log level for com.vaadin.hilla.internal.AbstractTaskEndpointGenerator in the project logs no additional info

Expected-behavior

It starts

Reproduction

above

System Info

24.4 beta4

cromoteca commented 1 month ago

The mvn command run by Hilla is probably inheriting MAVEN_OPTS. We should probably clear it when running Maven.

cromoteca commented 1 month ago

Also, Spring Boot applications should be debugged through the main class.

cromoteca commented 1 month ago

That can still be a problem if you want to debug on a Docker container for example.