hilla
hilla copied to clipboard
NPE when navigating to server side view during first server side view initialization
Description of the bug
If you navigate to another Java view while Flow is being initialized, navigation fails, the application disappears and only a blank page is shown
Minimal reproducible example
App with three views:
-
root view (TS)
-
view 1 (Java)
-
view 2 (Java)
-
Open the "root" view
-
Navigate to "view 1"
-
While navigation is in progress, navigate to "view 2"
Test project: https://github.com/Artur-/routing-error
- Run
mvn - open http://localhost:8080/
- Rapidly click "View 1" and then "View 2"
Expected behavior
I should end up on "view 2"
Actual behavior
A blank screen is shown and a JS exception from https://github.com/vaadin/flow/blob/9a67dbc4393af97e57c36dcd7c112895e0687b9d/flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts#L127 stating that onBeforeEnter cannot be set because this.container is undefined.
Versions:
- Vaadin / Flow version: 17
- Java version: 13
- OS version: Mac
- Browser version (if applicable): Chrome
- Application Server (if applicable): Spring Boot
- IDE (if applicable): VS Code
I think this issue is fixed by https://github.com/vaadin/flow/pull/12228? @Artur-
Let me verify
Still broken in the same way with 22.0-SNAPSHOT
Just tried, with the attached testing project, it works fine for me with both 22.0.0.rc1 and 23.0-SNAPSHOT npe-verify.zip
That's a different project. It does not even have a TS view.
right, I am now able to reproduce it.