Error when creating rule?

I'm getting an error when creating a rule. This has happened a few times now. I'm creating from new, not editing an existing rule, I haven't closed the page, clicked back or anything like that. At one point while creating it I'd clicked the wrong action but did click "cancel this action" in order for RM to take me back to the previous page - so that shouldn't have caused it? The error I get is below:

And in the log I get this:

When this happened previously I could open the rule again and attempt to continue but the same happened again repeatedly. A bit of a pain to have to delete the rule and start again - I'm slow at this at the best of times!

This continues to happen. To trigger this error which results in having to delete and re create the rule from scratch I simply have to:

1 - during rule creation select an incorrect action type
2 - realise it's wrong and click the "cancel this action" to avoid going further and return
3 - continue creating the rule. At some point a couple of steps later, the error will occur

What build are you running, and what version of Rule is this?

Could you give an example of the first step you describe? Do you hit cancel after selecting the first drop down menu (the one with groups of actions), or after the second drop down menu (the one with specific actions in that group)?

I'm on version 2.2.9.146 and using Rule Machine 5.1. I've just tried again to deliberately make the mistake that caused the error but cannot (typical). I was setting up a Motion lighting rule with a sunset/sunrise predicate. It was something like this:

  • On a new rule I defined the predicate (using sunrise to sunset)
  • Set the trigger (motion detector active)
  • Actions (conditional If rule Then)
  • Certain time (between two times)
  • I think I then selected a wrong action from the dropdown selection and so on the resulting (unwanted) page I clicked the "cancel this action" to take me back so I could select the correct dropdown item.

I was able to get one maybe two steps further on when I get the unexpected error. I was left with an uninstalled rule and it was corrupted as if I tried to go back in and edit it, as soon as I tried to continue the unexpected error would appear again.

I'll see if it happens again and hopefully will be able to note at the time, the exact sequence of events leading to it.