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

Connection to backend lost after network interruption when using websockets #20213

Open
lennartfricke opened this issue Oct 10, 2024 · 0 comments
Labels
BFP Bugfix priority, also known as Warranty investigation push

Comments

@lennartfricke
Copy link

lennartfricke commented Oct 10, 2024

Description of the bug

I used the vaadin gradle starter skeleton to have a minimal reproducing example and changed AppShell.java to add a push annotation

/**
 * Use the @PWA annotation make the application installable on phones, tablets
 * and some desktop browsers.
 */
@PWA(name = "Project Base for Vaadin", shortName = "Project Base")
@Theme("my-theme")
@Push(transport = Transport.WEBSOCKET, value = PushMode.AUTOMATIC)
public class AppShell implements AppShellConfigurator {
}

After starting using jettyRun. I open the app in a browser in a virtual machine (I used VirtualBox and libvirt).

I type in something and verify I get a result. I change the textbox content.

Then I virtually pull the cable.

In libvirt this can be done as follows, start virsh. Find out machine name (domain <dom>) using list, find out interface () using domiflist <dom>. 'Pull cable' using domif-setlink <dom> <iface> down.

It is not sufficient to use the developer tools. That does not interrupt the websocket connection.

Press 'Say hello' again to send something and wait some time (best reproduced when browser print something like
'Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). - wasClean: false')

Then reconnect the network (domif-setlink <dom> <iface> up).

And observe that nothing is send any more.

Expected behavior

The connection is reestablished and interaction is possible again.

I do not know if the last update should still be pushed or if resynchronization is better.

Minimal reproducible example

I downloaded https://github.com/vaadin/base-starter-gradle and applied the change above. I copied the code when vaadin version was 2.4.10

Versions

  • Vaadin / Flow version: 24.4.10 (probably also most current)
  • Java version: 21
  • OS version: Client Windows 10, Server Linux Ubuntu Jammy
  • Browser version: reproduced with Tatu Lund on Microsoft Edge Version 129.0.2792.79, Firefox 131
  • Application Server: jetty as of starter
@tepi tepi added investigation push BFP Bugfix priority, also known as Warranty labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFP Bugfix priority, also known as Warranty investigation push
Projects
Status: 🔖 High Priority (P1)
Status: 🟢Ready to Go
Development

No branches or pull requests

2 participants