Items disappeared from model, then model and some items became unaccessible

  • Platform information:
    • Hardware: Intel Celeron 2.9 GHZ, 24 GB RAM, 3 TB
    • OS: Debian/Docker
    • Java Runtime Environment: openhab/openhab:3.1.0 docker image
    • openHAB version: 3.1.0
  • Issue of the topic: please be detailed explaining your issue

I have a media player item as equipment in one of the rooms (locations) in the semantic model for a while but I hadn’t included all of its channels at first setup. So today I wanted to add one of those channels to the model, so I went to the Player equipment in the model, clicked on it, selected Add point from thing", selected the Player thing and then the channel I wanted to add (switching play mode between Shuffle, repeat and normal).

When I saved it, something very strange happened: the entire Player equipment had disappeared from the model, including the previously added items. They are still in the items list, but not in the model.

I then tried adding the player back to the room, either by modifying the “direct group members” of the room item or the “direct parent group” of the player item. I’m not sure which way around I did it, but I believe I first tried editing the “direct parent group” of the player but the link was not clickable so I tried the other way around.

I was able to add the player to the rooms “direct group members” but when I saved, the entire model became unavailable (stuck on “loading…”). Also the room and the player item in the item list are no longer accessible (just showing empty pages, even when I click edit)

Might this be a bug? If so, let me know what logs you need to trace it down (and where I can find them).

In any case, I’d appreciate any advice in how to fix this.

That might be the clue for how it started … perhaps working with historic data (Thing UID etc.) that may have changed since. Example, a binding update or device-led change may have changed the “shape” of the Thing.

I have no ideas about that, I’m afraid.

I believe the thing and the existing channels worked before I tried to add the other ones. What exactly do you mean by “historic data” and “device-led change”?

But you are basically saying that there was nothing wrong with what I did but that some old settings probably caused the failure?

Whatever the exact cause, I believe that there is some kind of bug here, because I would think that things should never just vanish from the model and, even more importantly, that the model would always be accessible through as long as I only modify it through the UI. Is that correct?

If this is a bug I would be very willing to help track it down before I try what happens if I just remove the thing and all its items and start from scratch (I would hope that that will also fix the model, but I don’t know).

Do you know where the relevant files (e.g. for the model) are stored? I can’t find anything in the config directory…

Don"t know speculating based on description.

Don’t think there are any, and instead it’s all managed as Item metadata.

It now occurred to me to look at the browser console for errors when trying to load the semantic model (at ../settings/model/) and this is what I found:

content.js:514 Uncaught TypeError: Te.$hook is not a function
    at new <anonymous> (content.js:514)
    at content.js:513
    at XMLHttpRequest.V.onreadystatechange (content.js:511)
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
app.js:7 TypeError: Cannot read property 'val' of undefined
    at s.value (app.js:7)
    at i.<anonymous> (16.app.js:1)
    at Array.<anonymous> (app.js:7)
    at Ze (app.js:7)
Ge @ app.js:7
16.app.js:1 Uncaught TypeError: Cannot read property 'update' of undefined
    at 16.app.js:1
app.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at new Ee (app.js:7)
    at Te (app.js:7)
    at $e (app.js:7)
    at Ee.walk (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
    at $e (app.js:7)
    at Ee.walk (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
app.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at new Ee (app.js:7)
    at Te (app.js:7)
    at $e (app.js:7)
    at Ee.walk (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
    at $e (app.js:7)
    at Ee.walk (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
DevTools failed to load source map: Could not load content for chrome-extension://hponfflfgcjikmehlcdcnpapicnljkkc/static/js/smartquotes.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
app.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at Ee.walk (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
    at Ee.observeArray (app.js:7)
    at new Ee (app.js:7)
    at Te (app.js:7)
    at Object.set [as equipment] (app.js:7)
    at i.getChildren (16.app.js:1)
    at Array.forEach (<anonymous>)
    at i.getChildren (16.app.js:1)
Promise.then (async)
load @ 16.app.js:1
onPageAfterIn @ 16.app.js:1
qe @ app.js:7
n @ app.js:7
qe @ app.js:7
e.$emit @ app.js:7
(anonymous) @ app.js:7
t.a @ app.js:7
dispatchEvent @ app.js:23
onPageAfterIn @ app.js:23
(anonymous) @ app.js:7
(anonymous) @ app.js:7
value @ app.js:7
(anonymous) @ app.js:7
value @ app.js:7
(anonymous) @ app.js:7
value @ app.js:7
value @ app.js:7
W @ app.js:7
D.forward @ app.js:7
v @ app.js:7
e @ app.js:23
(anonymous) @ app.js:7
(anonymous) @ app.js:7
value @ app.js:7
updated @ app.js:23
qe @ app.js:7
tn @ app.js:7
(anonymous) @ app.js:7
pn @ app.js:7
(anonymous) @ app.js:7
Ze @ 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
(anonymous) @ app.js:7
pageComponentLoader @ app.js:23
D.load @ app.js:7
t @ app.js:7
(anonymous) @ app.js:33
Promise.then (async)
(anonymous) @ app.js:33
b @ app.js:7
(anonymous) @ app.js:7
o @ app.js:7
k @ app.js:7
D.navigate @ app.js:7
(anonymous) @ app.js:7
(anonymous) @ app.js:7
(anonymous) @ app.js:7
value @ app.js:7
_ @ app.js:7
(anonymous) @ app.js:7
Show 2 more frames

What does it mean?

Edit: It looks like this might be what is going on:

Yes, I managed to fix it by removing the most recently edited items one by one.

Thanks to @waitz_sebastian for opening a github issue for this. Since the developers classified it as “enhancement” rather than “bug”, I’ll remove the bug tag from this topic, but I agree that some kind of circularity detection would be very helpful. Until we have that feature, perhaps the webpage could issue some hint that there might be circularity going on so that users don’t just see the “loading” circle but get a pointer to what is going on?