Potential bug report: Execution Count
Posted: 26 Sep 2018 15:15
Over the last weeks i noticed some quick fails, causing stops withing my "Check Ping Response" flow.
Now, somewhere in that flow i use the action "Execution Count" to ping my host multiple times in case something goes a bit off.
I have set that number to 10. The problem is that, half of the time or so, it does not even reach the 10 times... it just cuts of at a number that seems very random (5,6 or 3).
So, in this particular instance, i came home yesterday and switched my Automagic-made profile to "Home".
It does all sorts of things locally on the phone, and at the end it's supposed to ping my router to do all sorts of thing within my home... that's where the "Check Ping Response" flow comes in.
That flow is supposed to fail after 10 tries of unsuccessfully pinging my router.
...
Problem is, it failed after only 2 tries.
As soon as the flow reached "Execution Count" for the second time, it exit with a 'true' value
Here is my flow:
In the log, that i catched as soon as i could, you'll notice that when searching for 'Execution Count: 10 times' there are only 2 instances.
The important part is actually everything after the flow-element called:
------========------
Empty Node Collector
------========------
Now, somewhere in that flow i use the action "Execution Count" to ping my host multiple times in case something goes a bit off.
I have set that number to 10. The problem is that, half of the time or so, it does not even reach the 10 times... it just cuts of at a number that seems very random (5,6 or 3).
So, in this particular instance, i came home yesterday and switched my Automagic-made profile to "Home".
It does all sorts of things locally on the phone, and at the end it's supposed to ping my router to do all sorts of thing within my home... that's where the "Check Ping Response" flow comes in.
That flow is supposed to fail after 10 tries of unsuccessfully pinging my router.
...
Problem is, it failed after only 2 tries.
As soon as the flow reached "Execution Count" for the second time, it exit with a 'true' value

Here is my flow:
In the log, that i catched as soon as i could, you'll notice that when searching for 'Execution Count: 10 times' there are only 2 instances.
The important part is actually everything after the flow-element called:
------========------
Empty Node Collector
------========------
Code: Select all
25.09.2018 19:44:09.230 [Check Ping Response] End executing action 'Execute Flows: Check Router Connection'
25.09.2018 19:44:09.287 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:09.287 [Check Ping Response] Start executing condition 'Return Value:
HomeConnection'
25.09.2018 19:44:09.290 [Check Ping Response] End executing condition 'Return Value:
HomeConnection' with return value true
25.09.2018 19:44:09.290 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:09.290 [Check Ping Response] Start executing action '------========------
Empty Node Collector
------========------'
25.09.2018 19:44:09.290 [Check Ping Response] End executing action '------========------
Empty Node Collector
------========------'
25.09.2018 19:44:09.291 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:09.291 [Check Ping Response] Start executing action 'Widget (Network):
Set Pinging
&
Ping Attempt'
25.09.2018 19:44:09.303 [Check Ping Response] End executing action 'Widget (Network):
Set Pinging
&
Ping Attempt'
25.09.2018 19:44:09.303 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:09.304 [Check Ping Response] Start executing action 'Execute Command: ping -c 1 {ping_address} in '
25.09.2018 19:44:14.318 [Check Ping Response] Action 'Execute Command: ping -c 1 {ping_address} in ' Could not execute command
ch.gridvision.ppam.androidautomagiclib.util.m: Executing command failed, see log output
at ch.gridvision.ppam.androidautomagic.model.a.am$1.a(SourceFile:144)
at ch.gridvision.ppam.androidautomagic.model.a.am$1.c(SourceFile:112)
at ch.gridvision.ppam.androidautomagiclib.util.cj$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)
25.09.2018 19:44:14.354 [Check Ping Response] End executing action 'Execute Command: ping -c 1 {ping_address} in ' and exception Executing command failed, see log output
25.09.2018 19:44:14.356 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:14.357 [Check Ping Response] Start executing condition 'Expression: exit_code == 0'
25.09.2018 19:44:14.360 [Check Ping Response] Start executing action 'Write to File: {triggertime,dateformat,dd.HH:mm:ss} - Attempt: {ping_attempt}
to /storage/emulated/0/file.txt (append)'
25.09.2018 19:44:14.364 [Check Ping Response] End executing condition 'Expression: exit_code == 0' with return value false
25.09.2018 19:44:14.374 [Check Ping Response] End executing action 'Write to File: {triggertime,dateformat,dd.HH:mm:ss} - Attempt: {ping_attempt}
to /storage/emulated/0/file.txt (append)'
25.09.2018 19:44:14.375 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:14.375 [Check Ping Response] Start executing condition 'Execution Count: 10 times'
25.09.2018 19:44:14.377 [Check Ping Response] End executing condition 'Execution Count: 10 times' with return value false
25.09.2018 19:44:14.378 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:14.378 [Check Ping Response] Start executing action 'Sleep: 1s (keep device awake)'
25.09.2018 19:44:14.379 [Check Ping Response] Action 'Sleep: 1s (keep device awake)' Sleeping for 1s (keep device awake)
25.09.2018 19:44:15.381 [Check Ping Response] End executing action 'Sleep: 1s (keep device awake)'
25.09.2018 19:44:15.383 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:15.384 [Check Ping Response] Start executing action 'Widget (Network):
Set Pinging
&
Ping Attempt'
25.09.2018 19:44:15.407 [Check Ping Response] End executing action 'Widget (Network):
Set Pinging
&
Ping Attempt'
25.09.2018 19:44:15.408 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:15.409 [Check Ping Response] Start executing action 'Execute Command: ping -c 1 {ping_address} in '
25.09.2018 19:44:20.418 [Check Ping Response] Action 'Execute Command: ping -c 1 {ping_address} in ' Could not execute command
ch.gridvision.ppam.androidautomagiclib.util.m: Executing command failed, see log output
at ch.gridvision.ppam.androidautomagic.model.a.am$1.a(SourceFile:144)
at ch.gridvision.ppam.androidautomagic.model.a.am$1.c(SourceFile:112)
at ch.gridvision.ppam.androidautomagiclib.util.cj$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:761)
25.09.2018 19:44:20.418 [Check Ping Response] End executing action 'Execute Command: ping -c 1 {ping_address} in ' and exception Executing command failed, see log output
25.09.2018 19:44:20.419 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:20.419 [Check Ping Response] Start executing condition 'Expression: exit_code == 0'
25.09.2018 19:44:20.420 [Check Ping Response] Start executing action 'Write to File: {triggertime,dateformat,dd.HH:mm:ss} - Attempt: {ping_attempt}
to /storage/emulated/0/file.txt (append)'
25.09.2018 19:44:20.425 [Check Ping Response] End executing condition 'Expression: exit_code == 0' with return value false
25.09.2018 19:44:20.427 [Check Ping Response] End executing action 'Write to File: {triggertime,dateformat,dd.HH:mm:ss} - Attempt: {ping_attempt}
to /storage/emulated/0/file.txt (append)'
25.09.2018 19:44:20.427 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:20.428 [Check Ping Response] Start executing condition 'Execution Count: 10 times'
25.09.2018 19:44:20.429 [Check Ping Response] End executing condition 'Execution Count: 10 times' with return value true
25.09.2018 19:44:20.429 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:20.429 [Check Ping Response] Start executing action 'Ping:
Set Response
(false)'
25.09.2018 19:44:20.432 [Check Ping Response] End executing action 'Ping:
Set Response
(false)'
25.09.2018 19:44:20.432 [Check Ping Response] Flow continues executing with the next step.
25.09.2018 19:44:20.432 [Check Ping Response] Start executing action 'Widget (Network):
-Set Total Time
-Ping Response
-Set End Time'
25.09.2018 19:44:20.443 [Check Ping Response] End executing action 'Widget (Network):
-Set Total Time
-Ping Response
-Set End Time'
25.09.2018 19:44:20.444 [Check Ping Response] Flow ended.