You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded a Hilla/React+Gradle application from start.vaadin.com and I run it using IDEA and our plugin. Making changes to the Hilla endpoint causes the hotswap to fail. Restarting the application fixes the issue.
Expected behavior
Hotswap should work even at first launch.
Minimal reproducible example
download a project using Hilla/React like in the screenshot
open it directly in IDEA
change the Git add/remove settings as required by Vaadin plugin
launch using Debug using HotSwap Agent
verify that the application works and the endpoint is reached correctly
make a change in HelloReactEndpoint.java, for example modify the returned string
switch back to the browser
The server will output this:
2025-01-10T11:42:57.130+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 11:42:57 [vite] Pre-transform error: Failed to load url /generated/vite-devmode.ts (resolved id: /generated/vite-devmode.ts). Does the file exist?
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 11:42:57 [vite] Pre-transform error: Failed to resolve import "./vaadin-react.js" from "src/main/frontend/generated/vaadin.ts". Does the file exist?
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : Plugin: vite:import-analysis
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : File: /home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/src/main/frontend/generated/vaadin.ts:56:7
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 42 | import "./vaadin-featureflags.js";
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 43 | import "../index";
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 44 | import "./vaadin-react.js";
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : | ^
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 45 | import "Frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js";
2025-01-10T11:42:57.134+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 46 | import "./theme-hilla-react-app.global.generated.js";
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 11:42:57 [vite] Internal server error: Failed to resolve import "./vaadin-react.js" from "src/main/frontend/generated/vaadin.ts". Does the file exist?
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : Plugin: vite:import-analysis
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : File: /home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/src/main/frontend/generated/vaadin.ts:56:7
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 42 | import "./vaadin-featureflags.js";
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 43 | import "../index";
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 44 | import "./vaadin-react.js";
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : | ^
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 45 | import "Frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js";
2025-01-10T11:42:57.159+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : 46 | import "./theme-hilla-react-app.global.generated.js";
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at TransformPluginContext._formatError (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:47377:41)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at TransformPluginContext.error (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:47372:16)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at normalizeUrl (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:45638:23)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:45757:39
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async Promise.all (index 25)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async TransformPluginContext.transform (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:45684:7)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async EnvironmentPluginContainer.transform (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:47219:18)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async loadAndTransform (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:41030:27)
2025-01-10T11:42:57.160+01:00 INFO 95820 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : at async viteTransformMiddleware (file:///home/luciano/Downloads/skeleton-starter-hilla-react-gradle-24(1)/skeleton-starter-hilla-react-gradle-24/node_modules/vite/dist/node/chunks/dep-0AosnpPU.js:42474:24)
And, as the application tries to reload, that log will repeat indefinitely.
Again, restarting the application fixes the issue.
It seems that vaadin-dev-server-settings.json is created with wrong values.
Versions
Vaadin / Flow version: 24.6.1
Java version: 21
OS version: Linux
Browser version (if applicable): Firefox 134
Application Server (if applicable):
IDE (if applicable): IDEA
IntelliJ IDEA 2024.3.1.1 (Ultimate Edition)
Build #IU-243.22562.218, built on December 18, 2024
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.12.7-200.fc41.x86_64
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 8192M
Cores: 20
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
org.strangeway.vaadin (243.21565.129)
com.intellij.aqua (243.22562.230)
com.vaadin.intellij-plugin (1.4.4)
Kotlin: 243.22562.218-IJ
Current Desktop: GNOME
The text was updated successfully, but these errors were encountered:
Description of the bug
I downloaded a Hilla/React+Gradle application from start.vaadin.com and I run it using IDEA and our plugin. Making changes to the Hilla endpoint causes the hotswap to fail. Restarting the application fixes the issue.
Expected behavior
Hotswap should work even at first launch.
Minimal reproducible example
HelloReactEndpoint.java
, for example modify the returned stringThe server will output this:
And, as the application tries to reload, that log will repeat indefinitely.
Again, restarting the application fixes the issue.
It seems that
vaadin-dev-server-settings.json
is created with wrong values.Versions
The text was updated successfully, but these errors were encountered: