Unable to create new rules (a big ouch) – hopefully, there is a quick fix not requiring reinstallation.
Platform Version
2.3.2.131
Hardware Version
Rev C-7
I try to create new rule (click on "Rule Machine") the exception below is thrown and no global vars from Legacy Rules engine are exposed
app:14822022-06-27 11:19:09.496 pm
errorjava.lang.NullPointerException: Cannot invoke method getClip() on null object on line 60 (method mainPage)
LEGACY RULE MACHINE (Note global vars in appl state)
None of the appear in 5.1 RULE MACHINE
Let me know if some other information might help...thanks!!!
Global variables are a Rule Machine Legacy (version 4.x) feature. The fact that they are not in the "new" Rule Machine is not a concern. (The replacement for this feature, by the way, is hub variables, which are no longer specific to Rule Machine.)
What app throws the error when you open it, Rule Machine or Rule Machine Legacy? Whichever it is, my guess is that the app got into an unexpected state somehow, and the only solutions would be for Hubitat to find and fix whatever is tripping it up (the error message you gave from Logs should help--if they know what app it's coming from) or for you to restore a hub backup from a time before this problem started.
There are also a couple newer versions than the platform version you have installed, so you could try updating, though I'm not sure there is anything specific to this that was fixed in any of them.
2 Likes
Thanks for your reply. Creating any new rule (legacy or 5.1) will generate the exception (as legacy create appears to redirect to 5.1 by default). Hopefully, don't have to restore backup, have been doing quite a bit of updating existing apps for some time...so be a lot of redo there. Hubitat has been rock solid for me for a couple years now, so I was overdue for something like this.
Tagging @bravenel to see if he can make anything of your error above.
You can only create new rules with Rule Machine, not Rule Machine Legacy.
Please take a screenshot of Rule Machine just before whatever you clicked on created an error.
Been a long time since reporting this issue on Rule creation. This has significant a effect on my efforts going forward. For this simple request (Create Rule in 5.1) throws the following exception -- and it is repeatable 100%. Trying not having to rebuild my entire system (100 devices and rules). Please advise.
app:14822022-09-14 09:08:28.436 am errorjava.lang.NullPointerException: Cannot invoke method getClip() on null object on line 60 (method mainPage)
That only could happen if you were trying to import a Basic Rule or Simple Automation Rule. Be sure you are clicking on the Create New Rule box at the top of the page that comes up when you open Rule Machine.
This is getting frustrating. Long time Hubitat (this is a new issue and catastrophic from an overall usability standpoint).
Step 1:
Result:
Log:
app:14822022-09-14 09:08:28.436 am
errorjava.lang.NullPointerException: Cannot invoke method getClip() on null object on line 60 (method mainPage)
Still no reasonable solution provided (i.e., do I rebuild rules by scratch -- 100's, is there some other trick I am unaware of in solutioning). Please advise on these very repeatable results (this is not intermittent -- so I would hope repeatability would help in the solution space).
Thanks
David 586 604 0211
Please see the PM I just sent you.