Openhab 3 UI - not loading items on browser refresh on pages

Hi,

I just upgraded from 3.1.0-SNAPSHOT - Build #2230 to build #2260 and since then I have an issue with the main UI:

  • Loading the main page (http://openhab:8080/ using all major browsers) is not an issue and I can also use the browser refresh
  • Loading one (any) of my defined pages also works for the first load (e.g. http://openhab:8080/#!/page/page_start)
  • However, using the browser refresh button results in no items being loaded at all. All elements on the page are undefined. The Chrome browser console then also shows this error (which does not show when initially loading the page)
app.js:7

TypeError: Cannot read property 'config' of undefined
    at i.<anonymous> (app.js:23)
    at i.e._render (app.js:7)
    at i.a (app.js:7)
    at fn.get (app.js:7)
    at new fn (app.js:7)
    at app.js:7
    at i.On.$mount (app.js:7)
    at i.On.$mount (app.js:7)
    at init (app.js:7)
    at app.js:7
Ge @ app.js:7
Ue @ app.js:7
We @ app.js:7
e._render @ app.js:7
a @ app.js:7
fn.get @ app.js:7
fn @ app.js:7
(anonymous) @ app.js:7
On.$mount @ app.js:7
On.$mount @ app.js:7
init @ app.js:7
(anonymous) @ app.js:7
d @ app.js:7
y @ app.js:7
(anonymous) @ app.js:7
S @ app.js:7
(anonymous) @ app.js:7
e._update @ app.js:7
a @ app.js:7
fn.get @ app.js:7
fn.run @ app.js:7
pn @ app.js:7
(anonymous) @ app.js:7
Qe @ app.js:7
Promise.then (async)
Ye @ app.js:7
at @ app.js:7
(anonymous) @ app.js:7
fn.update @ app.js:7
pe.notify @ app.js:7
set @ app.js:7
Pe @ app.js:7
(anonymous) @ app.js:7
t.a @ app.js:7
setState @ app.js:23
mounted @ app.js:23
qe @ app.js:7
tn @ app.js:7
insert @ app.js:7
O @ app.js:7
(anonymous) @ app.js:7
e._update @ app.js:7
a @ app.js:7
fn.get @ app.js:7
fn @ app.js:7
(anonymous) @ app.js:7
On.$mount @ app.js:7
On.$mount @ app.js:7
e._init @ app.js:7
On @ app.js:7
(anonymous) @ app.js:28
o @ app.js:1
(anonymous) @ app.js:23
o @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1

I also get this error on every page load:

GET http://openhab:8080/undefined 404 (Not Found)                    

Using the breakpoints in the console the browser stops at

[e.page.config.hideNavbar?e.page.config.hideSidebarIcon?e._e():n("f7-link",{staticClass:"sidebar-icon"

Do I have a faulty element somewhere? Maybe on a page?

Thanks for the investigation, looks like a new bug introduced with the merge of https://github.com/openhab/openhab-webui/pull/835 9 days ago.

openhab-webui/bundles/org.openhab.ui/web/src/pages/page/page-view.vue at main · openhab/openhab-webui · GitHub cc @hubsif there are some checks on page or ready (same thing) missing on lines 3, 15 & 17.

Yep, seen. Will fix it.

1 Like

I just pushed a commit addressing this, but I think that there might actually be another issue with your page, @Chrishab, since what I’ve fixed should also have occurred on the first load, and didn’t occur at all with my tests on reload.
My browser also showed the error on the console, but still rendered the page. So, perhaps your page render issue is actually not related to that console error.

Please test and let us know if it actually fixes your issue.

1 Like

Will test as soon as the new snapshot is available!

@hubsif , just updated to the latest snapshot #2263 and I can confirm that your fixes worked!
The pages is loading again and the error does not show in the console anymore.

Thanks a lot!!

Good to hear! And thank you for the feedback!