(Resolved) Navigation problems after upgrade to 23.3.6 from 14

Hello Folks, After upgrading my application from version 14 to 23.3.6, which was based on the business app starter, I have encountered a strange issue. When I click on links to navigate to different views, views do not seem to load at all, nothing is shown on screen. However, if I refresh the page, the view loads fine. Console logs do not show any kind of error, neither do the java process. I am unsure what is causing this issue and would appreciate any help.

I’m wondering if there has been a change in the behavior of the onDetach method between Vaadin versions 14 and 23. I noticed that my code worked in Vaadin 14 but not in Vaadin 23.

// part of view
protected void onDetach(DetachEvent detachEvent) {
// UI.getCurrent().removeAll();

When navigating from one view to another using a RouterLink, this onDetach method gets called for the previous view, and I assume it removes all the DOM elements for that view.
In Vaadin 14, this code was uncommented and caused no issues. However, in the latest version, it leads to an empty DOM.

Using removeAll inside the detach method sounds like a nightmare to happen. There is literally zero reason to add it there. Once the component is detached it gets removed from the UI.

Thank you @quirky-zebra I agree that it seems like a bug in the app was uncovered in the new version 23. However, I am curious about how the previous version of Vaadin operated. My assumption is that in the past, the new view would generate the DOM, but this is no longer the case.

(Resolved) Navigation problems after upgrade to 23.3.6 from 14

Just an assumption: in between v14 and v23 were server-client round-trip optimisations that improves batching of multiple java calls into a single RPC event resulting in the addition and the removal to be send in the same round-trip instead of e.g. two