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

Combination of: liveReload enabled and PreserveOnRefresh enabled - generates a new UI on each Route change #8825

Closed
silvan-lincan opened this issue Aug 6, 2020 · 1 comment

Comments

@silvan-lincan
Copy link

silvan-lincan commented Aug 6, 2020

Hi,
The following scenario:

  • Vaadin Version: 14.3.2
  • DevMode
  • -Dvaadin.devmode.liveReload.enabled=true
  • @PreserveOnRefresh: enabled

results in creation of a new UI each time the Route is changed

As soon as I disable either @PreserveOnRefresh or liveReload, then the issue disappears: no new UI is created on Route change.

Since disabling @PreserveOnRefresh is out of the question, it remains only to disable liveReload:
-Dvaadin.devmode.liveReload.enabled=false
in order for the issue to go away.

The issue is not present in Vaadin versions lower than 14.3.2 (e.g. 14.3.1, 14.3.0)
The issue is not present in Production Mode in any of the above mentioned versions.

This can be reproduced with the following starter: Simple App:
preserve-on-refresh.zip
I only modified it to be able to add logging to see the effects.

Just start it up:
mvn jetty:run

navigate to different Routes and you will see the following output:

INFO: CustomUIInitListener#uiInit: initializing new UI: 0
Aug 06, 2020 7:13:00 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 1
Aug 06, 2020 7:13:36 PM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 6.0.16.Final
Aug 06, 2020 7:13:36 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 2
Aug 06, 2020 7:13:47 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 3
Aug 06, 2020 7:13:49 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 4
Aug 06, 2020 7:14:27 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 5
Aug 06, 2020 7:14:30 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 6

- Vaadin / Flow version: 14.3.2 / 2.3.2
- Java version:1.8
- OS version: 
- Browser version (if applicable):
- Application Server (if applicable):
- IDE (if applicable):
@denis-anisimov
Copy link
Contributor

Duplicate of #8822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants