-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[BasicUI] Live update is fully unstable with OH 4.1.1 and Firefox 121.0.1 #1757
Comments
I am starting to have a serious doubt that it is due to my changes because I have undone all my changed in smarthome.js and the problem persists. |
With snapshot 3340 or snapshot 3340 + updated jupp bundle (2.7.0), the live update is apparently working. |
You can easily check, shutdown, edit the jetty.xml and start again. If it works, it‘s related, if it doesn’t, then it‘s another issue. If it does work, then please try to add an |
Interesting, if I install the last BasicUI version in snapshot 3340, the live update is still working. |
So if you install BasicUI from 3340 in a recent snapshot it works, if you use the BasicUI coming with the distribution it does not work? Then it's most likely not related to the GZIP change. |
If I remove your change in jetty.xml with a fresh snapshot 3344, it looks like live update is back. |
Closed by openhab/openhab-distro#1476 |
I reopen this issue because it happens again in 4.1.1 ! |
With http or https connections? Safari doesn't support SSE on http connections since a long time, maybe other browser catch up there. |
No sure I reopened the correct issue, the current problem is that Baisc UI is regularly loosing its SSE connection. |
HTTP on Windows 10. The problem is that the SSE connection is disconnected after a certain time, maybe one minute or something like that. I see the banner in UI telling me that the UI is disconnected. |
The something else changed, the Jetty configuration did not. |
My jetty.xml contains the lines you added in your fix. This bug is really critical, the UI is no more refreshed until you change page because the SSE connection is closed. |
The banner "disconnected" appears at bottom of UI and disappears after few seconds but at this time I believe the SSE connection is closed because item updates are not updating the page. Edit to myself: org.openhab.core.io.rest.sitemap |
I do not understand the root cause, that is why the SSE connection is now regularly broken. But when the UI (Baisc UI) detects the closed connection, it opens a new SSE connection. But this new connection is apparently monitoring the main page and not the currently opened (sub) page. It explains why the page content is not refreshed.
So there are 2 problems:
I have no idea how to fix the first issue but I can certainly try to fix issue 2. |
Did you also check if it sometimes exceeds the max 6 connections per domain limit of your browser? |
How can I check that ? That is true that I have MainUI + BasisUI opened in browser. I hope this is not MainUI opening too many SSE connections. |
Regarding the reconnection issue, there is clearly a call by BaiscUI to the REST API |
Regarding the closed SSE connections, it seems that it does not occur when I use Chrome, the SSE connection is then stable. So it may be a new problem specific to a recent version of Firefox. Edit: the SSE connection is also stable with Microsoft Edge. After a quick WEB search, it may be that Firefox expects a proper SSE close at the right moment. |
To summarize, the SSE connection is now fully unstable when using recent version of Firefox while stable with Chrome/Edge. |
After an error in the SSE connection, the event source is now reconnected to the right sitemap page. Fix one of both problems explained in openhab#1757 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
After all these years, I am still discovering how is working certain parts of Basic UI ! |
After an error in the SSE connection, the event source is now reconnected to the right sitemap page. Fix one of both problems explained in #1757 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Regarding the handling of the EventSource, when an error is detected, the EventSource is already closed bu our code before a new one is opened. |
After an error in the SSE connection, the event source is now reconnected to the right sitemap page. Fix one of both problems explained in #1757 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
The problem
It looks like BasicUI is no more updating the states in its current page.
Additional information
I don't think this is related to the other major recent changes (Karaf version, Jetty version, ...) because it was still working as expected for me yesterday in the morning.
I suddenly encountered the problem yesterday afternoon.
It might be something I broke in one of my changes yesterday. I am sorry for that and I will try to find where is the problem.
The text was updated successfully, but these errors were encountered: