question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Route not found after recompiling and reloading a page

See original GitHub issue

Sometimes, recompiling and reloading a page causes NotFoundException and leads to the available routes page. It doesn’t happen all the time. It’s likely to happen when the CPU is busy. I can reproduce it with a plain servlet app with the Maven Jetty plugin.

Vaadin version: 14.1.18 OS: macOS Catalina 10.15.3 Browser: Chrome 80 IDE: IntelliJ IDEA Ultimate 2019.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jojulecommented, Jul 16, 2020

This is a timing issue: When you do not have fast enough computer, this keeps occurring regularly.

For example, on my 4-core 3.3GhZ i5 iMac with 16GB memory and 4TB SSD, route is lost every time one makes a code change to a view. Thus Spring DevTools and reload is completely broken on anything but the latest computers. If you take 2020 MacBook Pro with 8 core i9, reload works reliably; except if you happen to be streaming video at the same time.

My environment where bug can be reproduced reliably:

  • MacOS 10.15.5 (19F101)
  • iMac (Retina 5K, 27-inch, Mid 2015), 3.3 GHz Quad-Core Intel Core i5, 16 GB 1600 MHz DDR3
  • OpenJDK Runtime Environment (build 14.0.1+14)
  • Node v14.5.0
  • Apache Maven 3.6.3
  • Chrome 83.0.4103.116 (Official Build) (64-bit)
  • Vaadin 14.3.0
  • IntelliJ 2020.1.3 CE

To reproduce

  • Download default app starter from https://vaadin.com/start/v14 (Spring Boot)
  • Unzip
  • idea pom.xml
  • Run by double-clicking Maven > My Starter Project > Plugins > spring-boot > spring-boot:run
  • Open localhost:8080 in Chrome and see that app runs correctly and shows that live reload is available with Spring Boot Devtools and is enabled
  • In MainView.java, add add(new Button("Foo")); to end of MainView method.
  • Click Build Project
  • Browser incorrectly updates to shows “You are offline” page for “Vaadin Application”
  • Reload page
  • White page with error: Could not navigate to ‘’, Eeason: Couldn’t find route for ‘’, Available routes:

This is a known bug in Spring Devtools: https://github.com/spring-projects/spring-boot/issues/19543

Proposed fix: In the “Could not navigate to” view, explain the issue and link to documentation that explains how to work around this by using other available options for reload until underlaying Spring Devtools issue is fixed

0reactions
joherikscommented, Aug 26, 2020

Tailored Spring add-on’s “route-not-found” page to show an explanatory message as suggested in https://github.com/vaadin/flow/issues/7822#issuecomment-659712226.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-router URLs don't work when refreshing or writing ...
The historyApiFallback is what fixed this issue for me. Now routing works correctly and I can refresh the page or type in the...
Read more >
.NET Hot Reload support for ASP.NET Core | Microsoft Learn
NET Hot Reload applies code changes, including changes to stylesheets, to a running app without restarting the app and without losing app state....
Read more >
Hot reload - Flutter documentation
Hot reload works by injecting updated source code files into the running Dart Virtual Machine (VM). After the VM updates classes with the...
Read more >
Hot Reload | Vue Loader
"Hot Reload" is not simply reloading the page when you edit a file. With hot reload enabled, when you edit a *.vue file,...
Read more >
Hot Module Replacement - webpack
This guide extends on code examples found in the Development guide. ... Since webpack-dev-server v4.0.0, Hot Module Replacement is enabled by default.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found