-
Notifications
You must be signed in to change notification settings - Fork 161
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
PreserveOnRefresh - Regression? - since Vaadin 14.3.2 #8822
Comments
I guess you are using dev mode with live reload Vaadin enabled. Please try without Preserve on refresh: navigation between routes has no relation to Preserve on refresh functionality so it should behave the same. Anyway: this is not related to preserve on refresh but related to Live reload. This doesn't happen in production mode, only in dev mode. |
So I have the following:
=> New UI is created on each Route change. Second Test:
=> Everything fine, no new UI. Third Test:
=> New UI is created on each Route change. Should I open a new ticket with all this new Info? |
This is important, as I wanted to upgrade to 14.3.2, because of some Dialog issues fixed, but I am not able to do this, because of this issue and I am stuck with 14.3.1 |
OK, thanks for investigation. I would recommend to check how it works in production because production doesn't use live reload for sure and only production is critical for extra UI : it doesn't matter in dev mode, right ? I reopen the ticket because apparently it requires investigation but again: I'm pretty sure there is a mistake in checks and this is Live reload issue. |
Thank you very much. |
For me dev-mode also matters, as I am using the so called "session on tabs" and having a new UI on each click, it messes the functionality. |
The absence of new UI instance created in production is the exact indicator that this is Live reload issue. So : please double/triple check that live reload is disabled. I'm pretty sure that this is Live reload issue. Live reload creates one extra UI instance. IT create a new UI instance on route change. |
Thank you very much, I will focus on that. |
Please report/close the ticket if you confirm that this is Live reload. |
Absolutely. |
Hi Denis, Having this, indeed, no new UI is created on Route change. But I noticed something else, which was not happening with previous versions, for example (14.3.1 or 14.3.0): every 5 minutes, a new UI is created. Can this be related with the heart-beat? Now, for my understanding, is this the way to go, in dev-mode, by disabling the "live reload" mechanism? Sorry for insisting with this, but for me it is important to understand how things are working and if I am on the correct path. |
I'm not aware about 5 minutes UI creation. Anyway, this ticket is about Live reload as I suggested from the very beginning. Anyway, I'm closing this ticket. Please create another one with the exact steps to reproduce if you have another issue. |
Thank you very much. |
Perfect, so my comment about a new UI every 5 minutes was indeed PWA related, as I worked with the starter Simple App which is PWA enabled. I knew about the issue, but I forgot completely. |
Since Vaadin Version 14.3.2, it seems that each time you navigate to a different Route, a new UI is created when @PreserveOnRefresh is enabled.
This does not happen with lower versions of Vaadin, for example 14.3.1 / 14.3.0
To reproduce this, I just downloaded latest version of the starter: Simple App (https://vaadin.com/start/v14)
and I registered a UI init listener so that I can add a logging line.
The result: each time you try to navigate to a different Route, at least one new UI is created:
`Aug 05, 2020 3:11:30 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 3
Aug 05, 2020 3:11:33 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 4
Aug 05, 2020 3:21:52 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 5
Aug 05, 2020 3:21:54 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 6
Aug 05, 2020 3:21:56 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 7
Aug 05, 2020 3:21:59 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 8
Aug 05, 2020 3:22:00 PM com.prsrefresh.bookstore.CustomUIInitListener uiInit
INFO: CustomUIInitListener#uiInit: initializing new UI: 9
`
Please find as attachment, the Simple App starter with the small modifications:
preserve-on-refresh.zip
Versions:
- Vaadin / Flow version: 14.3.2
- Java version: 8
- OS version: Fedora 32
- Browser version (if applicable): Chrome / Firefox
- Application Server (if applicable): Jetty - 9.4.24.v20191120
- IDE (if applicable):
Thank you.
The text was updated successfully, but these errors were encountered: