flow icon indicating copy to clipboard operation
flow copied to clipboard

Browser history navigation fails silently in v23 with v14 bootstrapping enabled

Open SoylentBob opened this issue 1 year ago • 0 comments

Description of the bug

When using server side navigation (e.g. UI.getCurrent().navigate("some-link")) in a Vaadin v23.1.6 Application built with gradle and v14 bootstrapping enabled, the browser navigation history is displayed correctly, but going back via the browsers history does not open the previously opened pages, even though the URL in the browser is updated correctly.

Other links such as HTML Anchors or Router Links seem to not be affected by this issue.

Expected behavior

Going through the browsers history should work even with server-side navigation and v14 bootstrapping enabled.

Minimal reproducible example

Clone https://github.com/SoylentBob/vaadin-navigation-bug (the project is based on https://github.com/vaadin/base-starter-gradle)

  1. Start the application with the command ./gradlew jettyRun
  2. Open http://localhost:8080 in your browser.

Result of Step 2

  1. Click on the "Open second view", you should be on the URL http://localhost:8080/second now

Result of Step 3

  1. Click on the browsers back button, your browsers URL should have changed to http://localhost:8080, without actually displaying the "Main" view.

Result of Step 4

Setting the useDeprecatedV14Bootstrapping flag in the build.gradle file to false seems to fix the bug in the attached test project, but is not feasible at the moment for the project that we noticed the bug in.

Versions

  • Vaadin / Flow version: 23.1.6 (v14 Bootstrapping enabled)
  • Java version: 17
  • OS version:
  • Browser version (if applicable):
  • Application Server (if applicable):
  • IDE (if applicable):

SoylentBob avatar Aug 11 '22 10:08 SoylentBob