flow: Browser back navigation not working on 24.4.11 (on react-router)

Description of the bug

After upgrading to Vaadin 24.4.3 and disabling the vaadin-react feature within the properties the browser back navigation isn’t working. The following error can be aquiered from the developer console.

Errorlog indexhtml-C98SXJYq.js:62437 You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via window.history.pushState/window.location.hash instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.

Expected behavior

The browser back navigation should work.

Minimal reproducible example

Currently we got no time to provide a example project. We demonstrated the bug to Sascha Merkel and Sebastian Kühnau today.

Versions

  • Vaadin / Flow version: 24.3.13 -> 24.4.3 & also 24.4.11
  • Java version: 17
  • OS version: Windows 11 and Ubuntu 24
  • Browser version (if applicable): Chrome Version 128.0.6613.120
  • Application Server (if applicable): Wildfly 30.0.0
  • IDE (if applicable): IntelliJ IDEA 2024.1.4 (Ultimate Edition) Build #IU-241.18034.62

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Disabling must be added to the plugin. With only the property it doesn’t work in my case.

<plugin>
   <groupId>com.vaadin</groupId>
   <artifactId>vaadin-maven-plugin</artifactId>
   <executions>
    <execution>
      <goals>
        <goal>build-frontend</goal>
      </goals>
      <phase>compile</phase>
    </execution>
  </executions>
  <configuration>
    <!--  Disables "react router", which brings no features for flow app, but grows the front-end bundle -->
    <reactEnable>false</reactEnable>
    <!-- Make sure a custom bundle is created, otherwise the default prod bundle might contain various React related features. -->
    <forceProductionBuild>true</forceProductionBuild>
  </configuration>
</plugin>

We upgraded the version to 24.4.11 as recommended. The problem still exists on that version. Also we checked that the react-router is disabled and performed several clean-installs which had no effect on the result.

We try to assemble a demo project which has show cases the error.