Error when calling Rule Machine App via HTTP

Hello,

Rule Machine is throwing the following error when I run a specific rule via HTTP:

org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: ruleMachineV.getLabelById() is applicable for argument types: (java.lang.String) values: [879] (getLabelById)

When I run the same rule from the UI the error is not thrown - the rule completes successfully.

Here is the URL I am hitting when the error fails:
http://{{hubitatUrl}}/apps/api/849/trigger/runRuleAct=879?access_token={{accessToken}}

I am getting the following response (in addition to the error above being thrown):
{"response":"Triggered Action: runRuleAct on 879:null"}

I've included a screenshot of the rule below. The hassioHubitatIntegratorUrl is defined in the hub variables, I am just not sharing it since it is a publicly accessible URL and also since the rule runs fine from the UI. This can be reproduced with any URL. I am on a C-7 hub.

What can I do to prevent this from happening?

Thank you!

Zeev


Please provide your hub model (C7, C8, etc.) and its platform version from Settings>Hub Details.

Check out the following post for help troubleshooting problems and gathering details that will help others to identify and solve the problem you are experiencing: ‼ READ FIRST - Before Posting in Get Help


I expect it will be something to do with the Id's you have included in the URL... Are you able to confirm the RM Rule App Id from the URL in your browser when you are viewing the rule?

Sure - here are screenshots of the 2 rule IDs referenced in the original post, with the URL visible.

Rule 849 has the local endpoint that is being hit.
Rule 879 is the rule screenshot in the original post whose actions should be running.


Post a screenshot of the logs with the error message.

Attached.

The 18:12:05 entry is from UI-initiated call (log entry only, no error).
The 18:12:09 entries are from the HTTP-initiated call (log and error entries)

What happens when you paste the URL into a browser?

Calling from the browser gives the same result as a separate HTTP get call (hub log from this call with error attached).

I think I may have a clue about what the problem is. I need to do some more digging, and will get back to you. If it's what I think it might be, there is a bug in Rule Machine parent app that can be fixed.

3 Likes

This bug has been found and fixed. Next release will have the fix, 2.3.8 beta...

5 Likes

Thank you for your help! Looking forward to the release! :smiley: