Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScriptBoostrapUI stuck with navigationInProgress true when exceptions are thrown in beforeEnter #10757

Closed
eriklumme opened this issue Apr 21, 2021 · 1 comment · Fixed by #10823

Comments

@eriklumme
Copy link

eriklumme commented Apr 21, 2021

Consider an application that has a BeforeEnterListener that is run on every navigation. Navigation is done using client-side routing.

Consider also that this listener throws an error if the VaadinServletRequest.getCurrent() is null, such as when navigating from a background thread.

Now navigate from a background thread using UI#navigate inside a UI#access call.

Expected outcome

Navigation fails in some way, but other UI#navigate calls will still work in the same UI.

Actual outcome

Navigation fails. Because the exception is also thrown when navigating to the error view, JavaScriptBoostrapUI#navigate is stuck in a state where navigationInProgress is true, and as such, no other attempts at using UI#navigate will work in that UI.

Versions

Vaadin 20.0-SNAPSHOT
Flow 7.0-SNAPSHOT

@miguelatvaadin miguelatvaadin added this to Needs triage in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) via automation Apr 21, 2021
@denis-anisimov denis-anisimov self-assigned this Apr 27, 2021
denis-anisimov pushed a commit that referenced this issue Apr 27, 2021
OLD Vaadin Flow bugs & maintenance (Vaadin 10+) automation moved this from WIP to Closed Apr 29, 2021
denis-anisimov pushed a commit that referenced this issue Apr 30, 2021
* fix: preserve internal JS UI state properly (#10823)

fixes #10757

* chore: add missing import

Co-authored-by: Denis <denis@vaadin.com>
Co-authored-by: Manolo Carrasco <manolo@vaadin.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 19.0.7. For prerelease versions, it will be included in its final version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment