TypeError on build 21270-48528ec
-
Since updating I am getting flooded with these new notifications:
"
Reaction task "1" failed due to an exception. Please see the log.
TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function"From the log:
2021-09-28T10:02:05.639Z <Engine:5:Engine.js:1359> _process_reaction_queue() wake-up! 2021-09-28T10:02:05.643Z <Engine:5:Engine.js:1320> _process_reaction_queue() running task 1 { "tid": 1, "id": "rule-krq612qx:S", "rule": "rule-krq612qx", "__reaction": [RuleReaction#rule-krq612qx:S], "next_step": 3, "status": 0, "ts": 1632823320033, "parent": --null--, "__resolve": --function--, "__reject": --function--, "__promise": [object Promise], "attempts": 2 } 2021-09-28T10:02:05.644Z <Engine:NOTICE> Resuming reaction PS4 Waker Check<SET> (rule-krq612qx:S) from step 3 2021-09-28T10:02:05.646Z <Engine:5:Engine.js:1421> Engine#1 reaction rule-krq612qx:S step 4 perform { "entity": "vera>device_748", "action": "x_vera_device.set_variable", "args": { "service": "urn:upnp-org:serviceId:VContainer1", "variable": "Variable1", "value": "${{ PS4PowerStatus ?? \"Unknown\" }}" } } 2021-09-28T10:02:05.655Z <Engine:ERR> Reaction execution task 1 failed for reaction rule-krq612qx:S at step 5: TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function 2021-09-28T10:02:05.656Z <Engine:CRIT> TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function at Object._0x4e8c1b [as deref] (/home/stuart/reactor/server/lib/util.js:296:91) at /home/stuart/reactor/server/lib/VeraController.js:1124:86 at Array.forEach (<anonymous>) at VeraController.performOnEntity (/home/stuart/reactor/server/lib/VeraController.js:1108:325) at Entity.perform (/home/stuart/reactor/server/lib/Entity.js:502:54) at Engine._resume_reaction (/home/stuart/reactor/server/lib/Engine.js:1426:52) at Engine._process_reaction_queue (/home/stuart/reactor/server/lib/Engine.js:1324:100) 2021-09-28T10:02:05.664Z <Engine:NOTICE> Engine#1 entry 1 reaction rule-krq612qx:S: TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function 2021-09-28T10:02:05.665Z <Engine:CRIT> TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function TypeError: _0x19cf4f[_0x4d0fc6(...)] is not a function at Object._0x4e8c1b [as deref] (/home/stuart/reactor/server/lib/util.js:296:91) at /home/stuart/reactor/server/lib/VeraController.js:1124:86 at Array.forEach (<anonymous>) at VeraController.performOnEntity (/home/stuart/reactor/server/lib/VeraController.js:1108:325) at Entity.perform (/home/stuart/reactor/server/lib/Entity.js:502:54) at Engine._resume_reaction (/home/stuart/reactor/server/lib/Engine.js:1426:52) at Engine._process_reaction_queue (/home/stuart/reactor/server/lib/Engine.js:1324:100) 2021-09-28T10:02:05.666Z <Engine:5:Engine.js:1359> _process_reaction_queue ending with 0 in queue; none delayed/ready; waiting
Seems to be related to my Playstation 4 PSWaker rule.
This is the ps4-wrapper.sh script the rule is running:
#!/bin/sh while true; do # Run command and capture its output and exit status output=`ps4-waker $*` status=$? # If output was produced, stop looping. if [ -n "$output" ]; then break; fi sleep 1 # slow retries down a little done # Echo back the command output and exit with its exit status. echo "$output" exit $status
These are the global variables, this particular rule outputs to the variable named "PS4WakerCheck".
-
In the log output it says step 5.
I think this is step 5:
It is slightly different to the others as it using "None" rather than "Unknown" for what is to be displayed in the Vera multi-string device when no game / application is running on the PS4. This was working OK previously.
${{ PS4WakerParse?["running-app-name"] ?? "None" }}
However changing this step to this instead, makes no difference I still get the TypeErrors:
${{ PS4WakerParse?["running-app-name"] ?? "Unknown" }}
So its not this. but something it doesn't now like with step 5 ?
This is the multi-string device in Vera:
-
OK. I've got this (thanks for logs and details, really helps!). Rather than spin a build for it right now, I can give you an easy workaround... you're bare metal install right? If so...
- Edit the file
server/lib/vera_devices.yaml
- You will find 3 occurrences of the word
deref
in that file; change that word only toexpr
- Save the file and restart MSR.
For general reference for others, this bug occurs when using the
SetVariable
action. You do not need to make these changes if you are not using that action.I will, of course, have this properly fixed in the next build.
- Edit the file
-
OK. I've got this (thanks for logs and details, really helps!). Rather than spin a build for it right now, I can give you an easy workaround... you're bare metal install right? If so...
- Edit the file
server/lib/vera_devices.yaml
- You will find 3 occurrences of the word
deref
in that file; change that word only toexpr
- Save the file and restart MSR.
For general reference for others, this bug occurs when using the
SetVariable
action. You do not need to make these changes if you are not using that action.I will, of course, have this properly fixed in the next build.
@toggledbits said in TypeError on build 21270-48528ec:
expr
Thanks, I think that has fixed it, not had any notifications since.
- Edit the file
-
OK. I've updated the docker images as well.
-
OK. I've updated the docker images as well.
@toggledbits said in TypeError on build 21270-48528ec:
OK. I've updated the docker images as well.
Just double checking that the deref lines should still be there after the docker update to 21270-46679ac.
I did run one of my rules that set variables, and there is no task error in MSR. So I'm assuming the expr change was a work around and you fixed it elsewhere?
-
@toggledbits said in TypeError on build 21270-48528ec:
OK. I've updated the docker images as well.
Just double checking that the deref lines should still be there after the docker update to 21270-46679ac.
I did run one of my rules that set variables, and there is no task error in MSR. So I'm assuming the expr change was a work around and you fixed it elsewhere?
@3rdstng said in TypeError on build 21270-48528ec:
So I'm assuming the expr change was a work around and you fixed it elsewhere?
That's correct!
-
T toggledbits locked this topic on