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

Vaadin 24.4.alpha25 project gets stuck in an infinite reload loop with VS Code #19280

Open
Tracked by #5012
marcushellberg opened this issue Apr 29, 2024 · 9 comments
Open
Tracked by #5012

Comments

@marcushellberg
Copy link
Member

Description of the bug

When starting a new Vaadin 24.4.alpha25 application in VS Code, it gets stuck in an infinite reload cycle caused by:

Change set: [/Users/mhellber/Desktop/my-app/target/classes [/Users/mhellber/Desktop/my-app/target/classes/META-INF/resources/images/empty-plant.png (MODIFY), /Users/mhellber/Desktop/my-app/target/classes/META-INF/resources/icons/icon.png (MODIFY), /Users/mhellber/Desktop/my-app/target/classes/banner.txt (MODIFY)]]

Running VS Code extension bisect, I could identify the extension causing the issue as the RedHat Java plugin.
Screenshot 2024-04-25 at 11 43 58

Expected behavior

The application should start normally.

Minimal reproducible example

An application downloaded with https://start.vaadin.com/dl?preset=react&preset=partial-prerelease using alpha25.
Starting the app with VS Code running (either by running Application.java or with mvn) causes the app to reload constantly.

Versions

@mshabarov
Copy link
Contributor

I couldn't reproduce it.
Tried running the app by running Application.java and mvn.
Also tried disable/enabled the extension, works without restarts.

My configuration:

VS Code Version: 1.88.1 (also tried with 1.87)
Chromium: 120.0.6099.291
Node.js: 18.18.2
OS: Darwin x64 22.3.0
JDK 21
Language Support for Java(TM) by Red Hat v1.30.0

@mcollovati mcollovati changed the title Vaadin 24.4.beta25 project gets stuck in an infinite reload loop with VS Code Vaadin 24.4.alpha25 project gets stuck in an infinite reload loop with VS Code Apr 30, 2024
@mshabarov mshabarov moved this from 🆕 Needs triage to 🔎 Investigation in Vaadin Flow bugs & maintenance (Vaadin 10+) Apr 30, 2024
@manolo
Copy link
Member

manolo commented Apr 30, 2024

I cannot reproduce this either, with the same setup, except that my operating system is ventura 13.1 i7

@mshabarov mshabarov moved this from 🟢Ready to Go to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Apr 30, 2024
@AlainaFaisal
Copy link
Contributor

I reproduced this case and it stuck in an infinite loop for me as well.
However, after looking at the error logs, I saw some deprecated packages. These changes worked for me:
Change this to latest in package-lock.json:
"@jridgewell/sourcemap-codec": "latest",

(Also check if node.js is installed or not, you can install it from https://nodejs.org/)
After that ensure your versions are up to date using:
npm install -g npm@latest

These steps resolved the issue on my side.

@codercodingthecode
Copy link

See this temporary solution vaadin/hilla#2573 (comment)

@mshabarov mshabarov moved this from 🅿️Parking lot to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Dec 10, 2024
@mshabarov mshabarov moved this from 🪵Product backlog to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Dec 11, 2024
@Artur-
Copy link
Member

Artur- commented Dec 11, 2024

Is this some kind of race condition between VS Code running the Maven "prepare-frontend" target and the dev server running the same thing when you start it? Would it be resolved by removing the eclipse metadata lifecycle metadata for "prepare-frontend"? I think removing that would solve other problems also and make all IDEs behave the same way

@marcushellberg
Copy link
Member Author

Maybe. It doesn't matter if I run the Application.java or mvn. I can start the app without issues from the command line, but the moment I open the directory in VS Code it starts reloading furiously

@mshabarov
Copy link
Contributor

mshabarov commented Jan 7, 2025

Infinite reload with IntelliJ - https://vaadin.com/forum/t/continuous-page-reload-while-debugging-using-hotswap/168068
UPD: resolved in 24.5.9.

@tepi
Copy link
Contributor

tepi commented Jan 14, 2025

Tried to reproduce this issue with more current versions today, but was not able to trigger a reload loop no matter how I start the application. Is this still a problem for someone? @marcushellberg could you retest with latest version(s) and report back? If it's still an issue, I'd need more detailed instructions on how to reproduce the issue locally.

Versions I used for testing:

@mshabarov
Copy link
Contributor

I gave it another try with 24.7.0.alpha8 and 24.6.5 having:

  • Language Support for Java(TM) by Red Hat version 1.39.0
  • Debugger for Java version 0.58.1
  • VS Code version 1.97.1

but got no loop.

I wonder if anyone who have this issue could report it to
https://github.com/Microsoft/vscode-java-debug/issues or
https://github.com/redhat-developer/vscode-java/issues

@mshabarov mshabarov moved this from 🟢Ready to Go to 📥Inbox - needs triage in Vaadin Flow ongoing work (Vaadin 10+) Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔎 Investigation
Status: 📥Inbox - needs triage
Development

No branches or pull requests

7 participants