[SOLVED] OH3 Issue - "Model" Page endless loading - Maximum call stack size exceeded in app.js

This looks like you have a cycle in your hierarchy of groups/members i.e. maybe you added a group as a member of one of its own parent groups, or something even more complex that makes your tree “infinite”. This is not detected/supported at the moment.

1 Like

I don’t want to exclude that I made a mistake with the item configuration. On the other hand, I would have hoped that the GUI would not allow me to configure something that would lead to its “self-destruction” afterwards…
Any idea how I could find this? Especially the model view would help to structure the items but it doesn’t work anymore…

According to your hint I did the following:

  • I deleted 30 percent of my items - the ones which are easy to recreate. The idea was that I probably get the one causing the problem.

  • Since this didd not help I “flattened” my model removing most of the parent groups.

This looked like:

This solved the probklem. The model page is loading again and I was able to rerarrange the model. But in fact I was unable to detect exactly which Item / Group nesting caused the issue. Anyway, I worked.

But for some future realeases I hope that the GUI gets some logic to prevent this kind of misconfiguration.

Greetz
Christoph

Hi,
Your solution of removing items, got me thinking.
I removed one by one the group items by clicking on change and removing the direct group members and then remove the group item. Every time i removed one group item, i checked the model and suddenly when i removed the my Home group item (highest in hierarchy) I got my model back. Do not ask me why Home group items was “corrupt”, but I am glad i got my model back and can configure my OH3 again.
Thanks for your tip. Maybe we should have a model consistency check to find errors in the model file.
Patrick

1 Like

I’m glad that it helped even if the solution works on the principle of trial and error.
And yes I think it really needs a check routine for the model. I am sure it will happen to others.

Greetz
Christoph

Same here. I had this issue twice already.
The first time, I got some log errors that one of my groups cannot be loaded. I removed the group using REST API. Then it worked again. Seemed to me like a circular dependency which broke the view.

Second time I did lots of changes in the items section and when heading back to the model page, I saw it broke again. Unfortunately this time, I edited about 50 items, so I can hardly tell which item broke the model view.

Any troubleshooting insights would be highly appreciated so that I dont have to wipe items one after the other until it works, and then re-create all again without the error.

Some circular dependency checking would be really helpful. Especially when setting up more complex models with 2 or more equipment memberships.

1 Like

This is exactly the same that happened to me and therefore I was unable to determine which change was the cause.
It really seems that the “risk” of running into this problem is really high… Since it is nearly impossible to figure it out afterwards it should be prevented at all.

Hey,
in order to get my model page loading again, I had to delete about 30 item configurations until the page was loading again. Then I had do add my items again.
Unfortunately I havent been able to know what exactly was wrong. Since reverting config, fixing it, and re-creating them, is more a workaround than a solution, I filed an issue at github (#797). Just a matter of view if this is a bug or a feature enhancement :slight_smile:
In case anyone knows how to easily reproduce the issue, feel free to add a comment to the issue.
Thanks

Very new to OH and this forum so please forgive any protocol and etiquette faux pas.

I’m running 3.0.1 on a Mac with Big Sur 11.2.3.

Everything was working fine until I decided to install the scripting libraries and that is when the Pages page got stuck in a loading state. Other things, including the sitemap that allows me to perform actions like turning lights on/off are still working.

There was some output in Terminal but I logged out, cleared the cache, and restarted and there is no output now.

The browser console is showing this:

app.js:7 TypeError: (t.config.label || t.uid).substring is not a function
    at app.js:32
    at Array.reduce (<anonymous>)
    at indexedPages (app.js:32)
    at fn.get (app.js:7)
    at fn.evaluate (app.js:7)
    at i.indexedPages (app.js:7)
    at i.<anonymous> (app.js:32)
    at i.e._render (app.js:7)
    at i.a (app.js:7)
    at fn.get (app.js:7)
Ge @ app.js:7
app.js:32 Uncaught TypeError: Cannot read property 'update' of undefined
    at app.js:32
app.js:7 TypeError: (t.config.label || t.uid).substring is not a function
    at app.js:32
    at Array.reduce (<anonymous>)
    at indexedPages (app.js:32)
    at fn.get (app.js:7)
    at fn.evaluate (app.js:7)
    at i.indexedPages (app.js:7)
    at i.<anonymous> (app.js:32)
    at i.e._render (app.js:7)
    at i.a (app.js:7)
    at fn.get (app.js:7)

In my case, navigate to the path: /var/lib/openhab/jsondb and edit the file: org.openhab.core.items.Item.json. In it, I knew which equipment had moved and where, from what I found quickly what the solution is, I found that my equipment that was giving problems had like groupNames: itself, a superior equipment and a superior group (with superior I mean ladder).
For me it only had to be inside the group so I modified the file.

Note: I think it must be done with the openhab service turned off to modify the file.

I hope it helps.