openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
218 stars 238 forks source link

OH3 unresponsive MainUI, empty overview and frozen page #796

Open ladismrkolj opened 3 years ago

ladismrkolj commented 3 years ago

HI, earlier today I was setting some rules, then I noticed that my "Overview" isn't working anymore. If I click on the openHab icon in the top-left corner it just refreshes the page or does nothing. I once managed to come to the "overview" page but it was unresponsive, also I couldn't click on equipment/location tabs. This unresponsiveness also now happens now and then in the settings tab and I must refresh the page to be able to click anything. When exiting the chose item dialogs the page exits back to the settings page, so setting up new rules was really hard, as in most cases when selecting an item it then just exits to the settings page. The overview and homepage work if I go to pages->overview/homepage and then click run mode. But they only work in run mode.

Logs show nothing special, the bindings still work, so do the already set rules. openhab.log events.log

The developer mode in the browser shows this: image

I have OH3.0.0 latest image, running in docker on synology rs820+ with 18gb RAM.

I have already tried restarting the docker, clearing the docker image (but not files, as I don't want to lose all the settings ), I tried clearing cache by emptying cache folder in userdata. Nothing helped and the problem persists.

UPDATE: I tested further and the image is fine, The problem is in the userdata folder, most probably in the conf or etc subfolder. I managed to pinpoint in to that extent. But from there I wasn't able to advance. I am attaching the backup of the broken userdata folder (get it here). Should you install it to test: username:admin, pass:ladi1234 . I am aware this is off topic, but where are the bindings and automation addons stored. I want to know for future backup/restore to know which files to copy, as I now managed to copy all things/semantic model/z wave, but I had to reinstall all my bindings.

ghys commented 3 years ago

Please go to Help & About, Technical information, Show details, Copy and paste the results here. Also you seem to have a HTTP2 reverse proxy? Never tested whether SSE works well with those.

ladismrkolj commented 3 years ago
runtimeInfo:
  version: 3.0.0
  buildString: Release Build
locale: en_SI
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 11.0.9
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+21-CA
  osName: Linux
  osVersion: 4.4.59+
  osArchitecture: amd64
  availableProcessors: 1
  freeMemory: 250615072
  totalMemory: 801112064
bindings:
  - astro
  - icloud
  - openweathermap
  - zwave
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: 1
    prefersColorScheme: light
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: 8
    hardwareConcurrency: 4
    language: en-US
    languages:
      - en-US
      - en
      - sl
    onLine: true
    platform: Win32
  screen:
    width: 2560
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75
timestamp: 2021-01-13T15:14:42.479Z
ladismrkolj commented 3 years ago

Oh and neither Reload app nor Purge Caches and Refresh has any effect. Yes I am running a reverse proxy on my Synology.

ghys commented 3 years ago

1) either add "Slovenian" as the language in Settings > Regional Settings, or remove Slovenia as the region 2) try with an incognito window (InPrivate in Edge), you may have extensions interfering

ladismrkolj commented 3 years ago

@ghys doesn't help. I tried no region, then I tried Slovenian lang. with Slovenia region. I did Purge Cache and app reload after both, also tested both combinations in incognito and still the same.

I should also point out, that this is the second time this has happened to me. But the first time I had only added one z wave device and I just reinstalled the whole OH3 fresh and deleted the user data. From yesterday I have also created a new container and copied the Z wave files and the thing files over, so I now have a fully working OH3 install. But I want to get to the bottom of this...sure I could always just delete the userdata and do the fresh install, then copy over part of data, but I'm sure you understand. The problem is also recreatable. For fun I created a new container with fresh install and after making sure it was working fine, I just copied over the "corrupted" userdata folder, and the same thing happened. Then I deleted the userdata folder and did a restart, and it worked again...

evan-a-a commented 3 years ago

I can replicate this fairly easily by setting the language to English. When the language is unset, the overview page works fine. If I set the language to English, the overview page breaks and the following JS error is logged from app.js:

RangeError: invalid language tag: "en-US_POSIX"

This actually only occurs when I set the variant to "Computer", which adds the POSIX part. Even though this is an advanced setting, the settings page should either disallow setting of invalid language/variant combinations, or the WebUI should fall back to a known good language if the language/variant combination is invalid.

ladismrkolj commented 3 years ago

@evan-a-a Thankyou that worked! Maybe we leave this open, so that the automatic sanity check should be added in future?