Can't Edit Rule: Unexpected Error

Yes.

I can't be certain, but I think I have a fix for this coming soon, in a hot fix release. Please do not delete that rule, so you can see if it is fixed.

Itā€™s a LOCAL variable, by the way. I actually have several local variables in this rule,

A hot fix release is out that should fix this. Please let me know if it does or not. If it still throws an error, please post screenshot of the log like you did before.

Still getting error message after hub update.

OK, thanks. Please keep that broken thing around. I have to try a different theory about what might be wrong.

New hot fix release should fix this. Please let me know.

You fixed it! Thanks!

1 Like

Im running platform 2.1.3.128, but Iā€™m still getting a very similar error when trying to edit one of my rules.

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: Command 'size' is not supported by device.

app:92019-08-07 07:50:22.605 pm errororg.h2.jdbc.JdbcSQLException: Column "disabled" not found [42122-197] on line 429 (ruleList)

That's a database error. If it persists you may have a corrupted database. The fix would be to reboot your hub.

@bravenel I rebooted my Hubitat but the error still persists unfortunately. Are there any other suggestions?

Thank you!

I forgot to mention that the error pops open when I try editing the triggers but works fine when trying to edit the action.

I also tried cloning the rule and editing the trigger but still received the same error.

Hmm. So I created a rule and used local variables for my xiaomi door sensors to store the last openned time. I used them to do a comparison of which one is larger to do a certain task dpeending on which one is larger (later openning time).

Problem is the device attribute is a string so the local variables that I said shoul dbe numbers seem to make the rule problem as per below.

I can't edit the rule, so I also can't delete it and start again (as I have other thoguths on recording when a door is opened).

Any suggesions as it appears I still have problems on an up to date hubitat box.

Error when editing rule.

#### An unexpected error has occurred trying to load the app. Check [Logs](http://192.168.1.25/logs) for more information.

Error: For input string: "1570232459284"

Error in log

[app:484] (http://192.168.1.25/logs#app484)2019-10-05 09:52:05.996 am [error](http://192.168.1.25/installedapp/configure/484)java.lang.NumberFormatException: For input string: "1570232462552" on line 472 (allHandler)

You can delete the messed up rule by opening its App Status page (gear icon left of the rule on the Apps Page). At the bottom of that page is where you can remove the rule.

Yes, a full epoch time value is too great to be stored in a number variable. You can however, store them in a decimal variable, and from there you could do comparisons, etc.

You can put it in a string variable, and you can convert that to decimal by setting a decimal variable using the "string" option.

Oh good.

I'll give that a shot later today. Hadn't realised that was an option when setting variables in rule machine.

So I have created a local variable as a string in my rule. Then I have set that variable to the device attribute lastOpenned which is a string. Now I am not sure how to convert it. Can this be done in rule machine or require coding?

As I was struggling with this device attribute to get as a decimal, I created a global variable that gets set as the current time in seconds. That gets triggered from the contact sensor being opened so effectively works the same I believe. Maybe I will leave it like that.

I have noticed that numbers seem to be a signed 32 bit integer so have a limit of 2,147,483,647 but this seems enough for many years to come.... Outside the lifespan of this box anyway.

You do it where you set a Decimal variable with the string that contains the time string.

1 Like

Argh, @bcopeland I just had this happen to me after RM crashed while editing a rule:

[app:277](http://192.168.1.170/logs/past#app277)2020-09-08 01:25:32.234 pm [error](http://192.168.1.170/installedapp/configure/277)java.lang.NullPointerException: Cannot invoke method tokenize() on null object on line 2699 (selectActions)

and now I cant edit it, aside from the trigger.

Ordinarily, I wouldn't care and I'd delete it and start over, but this is my huge GV data gathering rule that I've been working on for hours. :sob: I prolly should have left the IF, THEN, ELSE section out and put that in a separate rule triggered by the data changing.

Oh that's not good, I've ripped out the Rule (I documented it first) and rebooted the hub as some things were acting weird and im seeing the occasional java errors in the logs now eg:

[app:11]2020-09-08 02:13:03.579 pm [error]java.lang.NullPointerException: Cannot get property 'expires_in' on null object on line 1245 (syncDevice)

[app:11]2020-09-08 02:20:32.963 pm [error](http://192.168.1.170/installedapp/configure/11)java.lang.NullPointerException: Cannot get property 'title' on null object on line 817 (dynamicDevicePage)

[app:11]2020-09-08 02:20:24.397 pm [error](http://192.168.1.170/installedapp/configure/11)groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (java.util.HashMap) values: [[prefGroup:hcnetatmowx, title:Weather Stations & Devices]] Possible solutions: wait(), any(), wait(long), take(int), each(groovy.lang.Closure), any(groovy.lang.Closure) (connectPage)

In this case the Netatmo rain gauge is no longer working but most other things are ok atm.

Any ideas?

Never mind - I was able to fix the rain gauge by re-importing the code.