I have a rule that has been running without issue for a while. I just went in to it today to tweak some of the settings. Now when I click on the "Actions" to edit something I get an error message:
errorgroovy.lang.MissingMethodException: No signature of method: java.lang.Integer.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), div(java.lang.Number), use([Ljava.lang.Object;), times(groovy.lang.Closure), div(java.lang.Character) on line 2494 (selectActions)
Anyone know how I can fix this? Do I need to delete and start over?
Correct... If thatās the case, re-creating it might be the best alternative. You could also try exporting it and re-importing it. I would be surprised if it worked, but worth a try! (Be sure to backup the hub first - it is still beta and, well, they recommend a backup...)
(2) take a screenshot of the rule, delete (remove) the rule, recreate the rule.
Actually, thereās a possible variant if the only good backup of the rule is from the distant past and you have made many other changes to your DB since then: backup your current database, do a soft reset, restore that ancient working backup, export the rule, do a soft reset, restore the current database backup, import the exported rule.
Of course there is no backup because it's a new (but already complex) rule - so my daywork is lost...
BTW: I just want a working system - and no more workarounds...
--8<------ RANT ----------
I'm dealing with Hubitat since 13 days - and have already found too many bugs and unnecessary obstacles, where the answer was just "you can't undo this", or "the rule is messed up", or "restore your backup", or "the code is not open", or "no code editor for rule machine"(which would solve such problems easily), or "just write an app" (but there is no full documentation), ...
---------- RANT ------>8--
Admittedly, Hubitat is a fragile system, or seems that way to me. Iāve been using it for about a year. Itās gotten better over time, but a whole new set of instabilities was introduced with the C-7/Z-Wave 700 chip.
Iāve made the journey from Wink to SmartThings to Hubitat C-5 to Hubitat C-7. Hubitat seems the best of these, but itās not perfect. Itās better now, I just wish that it was more robust. I just want it to work.
This is a bug that came about as a side affect of fixing another problem. I think this can be fixed fairly easily. Would you be so kind as to post the App Status - Application State portion, of this rule?
And, please show the rule itself so I can reproduce the problem.
Actually, there is a (3) third choice: tag @bravenel so I can look into the error. RM should not throw any errors (ideal world, not reality). So when it does throw one, I'd like to know about it so it can be fixed. One exception is "Can't pop null list" error.
As a general rule, this should be the case for all built-in apps: they should not throw errors, and if they do we want to know about them. Tagging me is a good way to go to get attention to it.
AND: always use screenshots to show logs, not copy paste. PLEASE. It's hard to read copy/paste logs.
With pleasure, but how can I do this?
The Application State alone would be 6 screenshots...
Or is there a possibility to export that part of this rule?
Maybe Cut'n'Paste to you via PM?
The rule does not contain the new action I wanted to add and which introduced the error while saving. Before that action there was no problem...
If I remember right, I added an Wait for Event (or Condition?) action and clicked on "done" (to save the new action).
=> First time that the error message appears. After clicking "done" again (to confirm that message) the optical unchanged rule code appeared.
But something strange must still have survived in this rule - because it's error'ing everytime I hit the big "actions edit" button.
BTW, I've noted that this rule seems to run - but not to end correctly: When I call this rule from another, the other rule doesn't do anything after the calling Run Rule Action (indirectly by setting a Connector variable), what is very strange, as I thought that the two rules would be running concurrently...
Well, I'd need to see all of the supporting information and log screenshots to make any sense of this. Have you turned on rule action logging. That's going to show in gory detail what the rule does or doesn't do.
That's the sort of things logs reveal, and has nothing to do with an error when opening the rule to edit. If you can't open the rule to edit it without getting an error, then it's toast and needs to be removed. But before you do that, please take a screenshot from Application State (the gear icon should still work), for the state variable named "actionsMain".
Thanks. The error you reported above can only occur from a Wait action. I am not able to reproduce it by just adding a Wait for Events to a rule. So, I need some idea of what the action was with some specificity.
I (think that I) wanted to wait for the Custom Attribute "mediaSource" (Chromecast Audio Device)...
Mhhh, maybe I hit "Add another WaitEvent" and than - without specifiing anything - hit the "Done" button?
BTW: Why is it there a "Done" but no "Cancel"?
IMHO it's strange that this ugly test rule is still running (and editable!):
BTW: How can I remove an empty Wait-For?
However, I'm not able to reproduce the error message with a new rule. (In the meantime I had already done the big update.) The old rule is still error'ing...
These sorts of UI issues simply have not been caught up with. Having the functionality work when setup correctly was more important than catching every UI problem that can arise when not setup correctly.