vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
622 stars 167 forks source link

Error notification flashes when closing tab with push connection open #8579

Open Legioth opened 4 years ago

Legioth commented 4 years ago

When closing the browser tab that contains a Vaadin UI that uses @Push, an error notification with the text "Push connection using long-polling failed!" is momentarily shown in the upper right corner. It seems like this only happens in Chrome but not in Firefox or Safari.

To reproduce:

  1. Download and extract a plain java project from https://vaadin.com/start. When this was written, the provided Vaadin version was 14.2.1
  2. Add @Push to MainView
  3. mvn jetty:run
  4. Open in Chrome
  5. Look at the upper right corner when closing the browser tab.

You can make the browser freeze after the notification has been shown but before the window actually closes by running this oneliner in the JS console: window.addEventListener("unload", () => { debugger; });.

knoobie commented 4 years ago

Could this be related to https://github.com/vaadin/flow/issues/8548?