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
{{ message }}
Repository navigation
Live-reload does not recognize Spring Boot DevTools using non-default live-reload server port or not running at all #7970
The live-reload client-side currently always attempts to connect to port 35729 to poll for a potential Spring Boot live-reload server, and if failing, attempts to connect to the dedicated push channel. This approach has two problems:
For non-Spring applications and Spring not running devtools, the browser console contains an error like the following: WebSocket connection to 'ws://localhost:35729/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED. The message cannot be supressed and is confusing since it looks like something is wrong.
If a Spring project has changed the port via configuration spring.devtools.livereload.port in application.properties, it will fall back to the dedicated push channel while the developer probably want to use the custom port.
If Spring Boot Devtools are not running (e.g. spring-boot-maven-plugin is configured with <fork>false</fork>, this is not detected and the error in 1. is shown in the broswer console. Should detect this state on the server side and initialize the gizmo accordingly (live reload unavailable).
Acceptance criteria:
No error in browser console during normal startup of both Spring and non-Spring applications.
We identify on the server side that Spring Boot devtools is runing and communicate the correct port to the client side.
Reacted by DavidKoenig, xmicore, Leo and Johannes Tuikkala
changed the title [-]Live-reload does not support non-default Spring Boot DevTools live-reload server port [/-][+]Live-reload does not recognize Spring Boot DevTools using non-default live-reload server port or not running at all[/+]on Sep 29, 2020
Activity
joheriks commentedon Apr 8, 2020
springBootDevToolsPortinBootstrapHandler(currently hardcoded to35729) transfers the port number to the client.[-]Live-reload does not support non-default Spring Boot DevTools live-reload server port [/-][+]Live-reload does not recognize Spring Boot DevTools using non-default live-reload server port or not running at all[/+]fix: Use a random port for Spring Boot livereload if the default is t…
fix: Use a random port for Spring Boot livereload if the default is t…
vaadin-bot commentedon Feb 3, 2023
This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version.