While typing too fast when creating a new hub variable, I managed to cause a fatal pathological condition. Now whenever I open the hub variables page I get an unexpected error due to a NULL global variable name (see screenshot).
Is there a way I can correct this problem or is a system programmer needed to sort it out? Since I can't open the hub variables page, I can't rename or delete the malformed variable.
This is "sort of" an HE bug. Can programmers address this rate scenario that could occur when creating a variable or at least be code-tolerant of it if it ever occurs?
There is an endpoint in the hub, /installedapp/deleteState/123, where 123 is the appId of the app in question. For this situation you would use the appId of Hub Variables. This number is in the url for Hub Variables.
Once state is deleted, Hub Variables UI would not throw the error.
I have a similar problem with an Unexpected Error being thrown when accessing the Global Variables as per below; I have a C-7 Hub running platform 2.4.2.159
I am trying to determine if the above fix is relative to my problem and if so understanding the actions for the solution?
Previous remedies tried are restoring from a previous cloud backup, however once the process is completed I can access the Variables page but it soon throws the error if I try to do anything in there and then back to not being able to access the page again.
Your problem looks different, but I would just try the above. It should be safe, but you already have a backup from before that you can restore just in case you're worried. Your app ID appears to be 10.
I'd also be curious what the "Set value for..." (or "Set level for...," etc.) field in the UI or the "varV" value in "Application Settings" on the App Status page for app:10 is (might be able to see the former if it's before the point of this error; you'd have to use a trick to get to the latter with this app), if you happen to be able to see that before doing anything -- but you could also just see if this helps.
I tried the deleting /installedapp/deleteState/10 which worked and allows me back in the page, but still faced with same issue. In reference to your suggestion I cannot locate the Application Settings" on the App Status page for app:10 ?
Yeah, it's hard to get to for this particular app (since you don't normally need to and doing anything besides looking at it can get you in trouble). Try /installedapp/status/10. In the "Settings" table, I'm curious about "varV".
Thanks! I see why the error is throw and an idea of how it might have happened. Platform version 2.4.3, currently in beta, should have a fix for this problem.
Do you have any hub variable connectors? It looks like you might. There is another fix you could try otherwise if not and you need something now (though writing a rule or something to set the value would also be a workaround).
Yes, clicking on the Variable Connectors on that page shows 13 x Variable Connectors as per below. Are you suggesting one of these has a corrupt value set against the variable causing the issue? Or is it the connector for the variable causing the issue?
I dont believe I am actually using any of the Variable connectors so if there is a way to remove the connector then perhaps that's the way forwards?
I'd prefer to try and get it sorted now rather than wait for the updated Platform software as trying to weed out a few bugs in my Home Automations (due to improvements needed on some of my pistons in Webcore), before I upgrade to a C-8 hub which has been sitting on my desk for the last 3 months waiting for installation and migration.
No, the connectors are not the problem. I was just saying there is another way to fix this issue if you didn't have any, but if you do, it will break them.
If you're not using them, you can remove them and then try the other fix. They are just devices you can remove from their device detail page, heeding warnings about removing them from any apps you're using them in first. (It sounds like you don't think you are, in which case there's really no reason to create them in the first place, but this or the "In use by" tab on each connector device will tell you for sure.)
It's using the "Remove" button at the bottom of the App Status page. (Caution for anyone who finds this with a search -- do not try without reading all of the above.)
I have deleted all but 6 of them which have connectors being used by Maker API then by Node Red running on a Raspberry Pi. I need to investigate further why they are being used as was too long ago to remember and then change it so the connectors can be deleted.
So just to understand the process after I sort out the remaining connectors, I assume you are referring to the Remove Hub Variables button (at the top of my Apps Status page). I assume that will remove all the Hub Variables? It will then need to be rebuilt?
It will not delete your hub variables, only the connectors (but I would do that yourself beforehand so you know what is in use where -- nothing by the time you are done).
Finally been able to delete those remaining connectors after changing the way of sending Variable data to my Rasp Pi to MQTT.
After hitting the "Remove Hub Variables button" (at the top of my Apps Status page), all is well again and can now navigate into the Variable page and add / change Variables without issue.