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

Freeze on main UI when openning multiple Tabs in web browser, #2914

Closed
lo92fr opened this issue Dec 11, 2024 · 9 comments
Closed

Freeze on main UI when openning multiple Tabs in web browser, #2914

lo92fr opened this issue Dec 11, 2024 · 9 comments
Labels
duplicate This issue or pull request already exists ohc bug A problem or unintended behavior of openHAB Core

Comments

@lo92fr
Copy link

lo92fr commented Dec 11, 2024

The problem

When you open multiple tabs on the main UI in your browser, at some point, there can be a freeze in the UI that will not refresh until you close the other opentabs.

This happens mainly when you right click on a link, and click on the "open new tab" link.
At the start, I was thinking it was comming from my reverse proxy configuration.
But I was able to reproduce it using direct local ip connections.

When this happens, the broswer seems to freeze requesting new network ressource in the new tab.
As soon as your close the primary tabs where you come from, the new tab unfreeze and finish to load.

Does anyone experience similar behaviour ?

Expected behavior

Load of main UI ressource without freeze.

Steps to reproduce

Start a new session to openhab in your web broswer.
Right click on some link to openhab new tabs, for example a settings / items page.
The new tab is freeze on loading.

Your environment

Openhab 4.3 M4 build (but was already presents in previous release I think, possibly 4.2.x and 4.1.x.
Executing on Linux environment, fedora, Java 17.
Client mainly on Windows, Google chrome browser, but also see the issue in Firefox.

runtimeInfo:
  version: 4.3.0
  buildString: "Build #4384"
locale: fr-FR
systemInfo:
  configFolder: /opt/openhab4/conf
  userdataFolder: /opt/openhab4/userdata
  logFolder: /opt/openhab4/userdata/logs
  javaVersion: 17.0.13
  javaVendor: Red Hat, Inc.
  javaVendorVersion: (Red_Hat-17.0.13.0.11-1)
  osName: Linux
  osVersion: 6.11.8-300.fc41.x86_64
  osArchitecture: amd64
  availableProcessors: 12
  freeMemory: 1123517768
  totalMemory: 1992294400
  uptime: 681771
  startLevel: 70
addons:
  - automation-groovyscripting
  - automation-jrubyscripting
  - automation-jsscripting
  - automation-pwm
  - binding-airq
  - binding-airquality
  - binding-astro
  - binding-bluetooth
  - binding-chromecast
  - binding-deconz
  - binding-denonmarantz
  - binding-enigma2
  - binding-exec
  - binding-freeboxos
  - binding-harmonyhub
  - binding-heos
  - binding-homeconnect
  - binding-hue
  - binding-icalendar
  - binding-icloud
  - binding-ipp
  - binding-knx
  - binding-lgwebos
  - binding-lifx
  - binding-linky
  - binding-linuxinput
  - binding-lirc
  - binding-mail
  - binding-miele
  - binding-mielecloud
  - binding-mqtt
  - binding-network
  - binding-networkupstools
  - binding-ntp
  - binding-openweathermap
  - binding-pioneeravr
  - binding-remoteopenhab
  - binding-rfxcom
  - binding-samsungtv
  - binding-siemenshvac
  - binding-smartthings
  - binding-sonyprojector
  - binding-spotify
  - binding-squeezebox
  - binding-upnpcontrol
  - binding-zigbee
  - binding-zoneminder
  - misc-homekit
  - misc-openhabcloud
  - persistence-influxdb
  - persistence-inmemory
  - transformation-bin2json
  - transformation-exec
  - transformation-jinja
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - transformation-rollershutterposition
  - transformation-scale
  - transformation-vat
  - transformation-xpath
  - transformation-xslt
  - ui-basic
  - ui-cometvisu
  - ui-habot
  - ui-habpanel
  - voice-googlestt
  - voice-googletts
  - voice-mactts
  - voice-marytts
  - voice-mimictts
  - voice-picotts
  - voice-rustpotterks
  - voice-voicerss
  - voice-voskstt
  - voice-watsonstt
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 0.8999999761581421
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 16
    language: fr-FR
    languages:
      - fr-FR
      - fr
      - en-US
      - en
    onLine: true
    platform: Win32
  screen:
    width: 2560
    height: 1440
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
    blocklyRenderer: null
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/131.0.0.0 Safari/537.36
timestamp: 2024-12-11T17:36:10.837Z

Browser console

No errors in console.

Browser network traffic

Network is stuck on loading the ressource, waiting for ever from the network.
If you open the same ressource in another independant browser session, the ressource is loading correctly.

image

Additional information

Seems like there is some deadlock on the network ressource loading, but don't undestand why so far.

@lo92fr lo92fr added bug Something isn't working main ui Main UI labels Dec 11, 2024
@cdjackson
Copy link
Contributor

You don't (as far as I can see) state how many tabs you have open. I normally have 3 or 4 tabs open and have observed no problems on my 2019 MacBook Pro.

@lo92fr
Copy link
Author

lo92fr commented Dec 11, 2024

Not a lot, it can start after 2 or 3 open tabs.

Laurent.

@lo92fr
Copy link
Author

lo92fr commented Dec 11, 2024

I will try to narrow down where it can come from.
But so far, I'm not sure where I can look at.

@cdjackson
Copy link
Contributor

cdjackson commented Dec 11, 2024

I certainly have no problem with this number of tabs in chrome. I currently have 3 tabs in chrome, and I just remembered I also have Safari open with another instance of OH (opened while I was doing some development last night and then forgot to close it - it's still updating ok).

[edit] note that by instance in the above text - I just mean another web page opened and pointing to my main OH server - not another instance of the OH server.

@ghys
Copy link
Member

ghys commented Dec 11, 2024

Don't forget that browsers have a pretty severe limitation on the number of concurrent SSE connections.
This limits the number of tabs you can open, all UIs included (Main UI uses from 1 to 3 connections per tab, Basic UI uses one, HABPanel uses one, etc.)

MDN

https://issues.chromium.org/issues/40329530

https://stackoverflow.com/questions/18584525/server-sent-events-and-browser-limits

https://ably.com/blog/websockets-vs-sse#:~:text=You%20can%20only%20have%20six,more%20information%20and%20workaround%20suggestions.

HTTP/2, or WebSockets are possible solutions but neither are likely to materialise soon.

@lo92fr
Copy link
Author

lo92fr commented Dec 15, 2024

Hello,

It seems that I'm not the only one to experience the issue.
I see a discussion from other today in 4.3 Milestone discussion thread.
See post ~70 : https://community.openhab.org/t/openhab-4-3-milestone-discussion/158139/73.
Also mention in this issue : openhab/openhab-core#4466.

Laurent.

@florian-h05
Copy link
Contributor

florian-h05 commented Dec 17, 2024

This is caused by openhab/openhab-core#4466, but I have created that issue in core because we need to fix it there.
Changing HTTP version through a reverse proxy fixes this issue.

@florian-h05
Copy link
Contributor

I will close this issue here to prevent having duplicates.

@florian-h05 florian-h05 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2024
@florian-h05 florian-h05 added duplicate This issue or pull request already exists ohc bug A problem or unintended behavior of openHAB Core and removed bug Something isn't working main ui Main UI labels Dec 17, 2024
@lo92fr
Copy link
Author

lo92fr commented Dec 17, 2024

Hello,

Ok, thanks for the update.

Laurent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists ohc bug A problem or unintended behavior of openHAB Core
Projects
None yet
Development

No branches or pull requests

4 participants