Skip to content

Live-reload does not recognize Spring Boot DevTools using non-default live-reload server port or not running at all #7970

Closed

Description

@joheriks

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:

  1. 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.

  2. 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.

  3. 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.

Activity

  1. joheriks commented on Apr 8, 2020

    @joheriks
    ContributorAuthor
    1. is fixed by Identify live reload backend technology on the server and show in browser #8015. The parameter springBootDevToolsPort in BootstrapHandler (currently hardcoded to 35729) transfers the port number to the client.
  2. 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
  3. added a commit that references this issue on Jan 19, 2023
    20a069f
  4. added a commit that references this issue on Jan 23, 2023
    bff1f48
  5. vaadin-bot commented on Feb 3, 2023

    @vaadin-bot
    Collaborator

    This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions