Error: Cannot invoke method tokenize() on null object aka Rule Machine is painfully broken

This is the 5th time I have received this error with Rule Machine. The problem is when I am building my rule I usually start with an IF condition. I add my action then followed by an END IF. Sometimes end up deleting the IF part with the END IF still in the rule which breaks the app immediately. I cannot fix by removing the END IF or by adding back an IF condition as the app won't let me because I just get the error over and over and have to recreate the rule again. 45 min just wasted.

Please fix this error.

Rule machines is the number one reason I do not recommend a hubitat to friends. If I could just give them code to paste into their Rules that would solve most of the issues but using the UI is painful, slow and as I find out all the time, prone to breaking.

1 Like

Give them Groovy code to paste in as an app.

Or, they can use WebCoRE.

No one is forced to use Rule Machine.

+1 on WebCore.
Easy to share, backup and restore with full tracing/debugging.

You are correct no one is forced to use Rule Machine, but that is like saying no one is forced to one of the most important feature of a home automation product. I want it for the automation and if I can't do that then there is not much point with a HE.

I will give that a go. Thank you for the suggestion!

1 Like

I've been using RM since RM 2.x and I've never had a rule break that way. By any chance did you screen shot one of the broke rules? I just hashed together a simple RM rule to attempt to re-create the condition you described and received no error. I put the If-Then back and the rule worked as expected. I only bothered with this simple test in case a new behavior was introduced with the last update.

I'm in no way saying RM is perfect or it's "ALL YOUR FAULT", but there must be something different on either your setup or methodology for forming rules that is triggering this erroneous behavior. If you can steer me in the right direction I'd like to help identify why you are getting these errors.

Well, it does have a pretty green light. :slightly_smiling_face:

I have broken rule Machine about 10% of the time. Sadly this error is the one I cannot recover and usually is in my bigger rules I build. This specific error seems to be nested IFs that have both nested and parent END IF then I remove one of the IFs and it just breaks immediately.

Most of RM breaking is missing statement. Say you make an IF condition1 AND condition2, then delete condition1, it breaks RM. I have to usually delete the entire IF which in the case of the example above it breaks.

Here is the rule I had that broke.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.