[Issue #513] Pausing (stopping) Issue

Were you able to replicate the stopping issue from running this? Thanks for looking into this. Like I said it pretty much always starts right back up if I hit resume but it’s kind of annoying because then I have to babysit it while it’s running.

563 step macro! Wow!

Hello, same issue here! Macro stop in random command each time.

No error, it simply remains frozen, without continuing.

Macro fail 100% of the time, because my loop is infinite, or almost.

Sometimes fails at 60 minutes, others at 3, or 10… is completely random (apparently).

I have tried in chrome and firefox, it does not matter that there are more tabs and I’m doing other things, or just one tab for the macro without touching anything else on the pc, alway fail.

Click pause and click resume is the only solution, but it requires manual presence, obviously …

I leave my code in case you want to try
It work on any profile of instagram “https://www.instagram.com/INSERT_HERE_PROFILE
then, click on ‘followers’, when the list of ‘followers’ is displayed, then play the macro, The operation is simple, make scroll down.

{
“CreationDate”: “2018-10-20”,
“Commands”: [
{
“Command”: “storeEval”,
“Target”: “0”,
“Value”: “N”
},
{
“Command”: “while”,
“Target”: “${N} < 4000”,
“Value”: “”
},
{
“Command”: “storeEval”,
“Target”: “${N}+1”,
“Value”: “N”
},
{
“Command”: “click”,
“Target”: “/html/body/div[3]/div/div/div[2]/ul/div/li[${N}]/div/div[1]”,
“Value”: “”
},
{
“Command”: “endWhile”,
“Target”: “”,
“Value”: “”
}
]
}

Thanks

Note: I’ve also tried make loop with label instead of ‘while’, but same result

I also have this issue

1 Like

This issue is also affecting me. I’m running Kantu in Firefox 65.0.1 on MacOS Mojave (10.14). My macro will pause (without indicating a pause) on random commands. Sometimes it will stop on a storeEval, other times on a clickAndWait. As others have stated, clicking Pause then Resume causes the macro to continue without issue. No errors are present in the logs.

I’ve included my macro below:

{
  "Name": "Update RouteOp Contraints",
  "CreationDate": "2019-3-1",
  "Commands": [
    {
      "Command": "csvRead",
      "Target": "feb-district-customer-contraints.csv",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "https://app.######/search",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "name=LocationCode",
      "Value": "${!COL1}"
    },
    {
      "Command": "echo",
      "Target": "Location code: ${!COL1}",
      "Value": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "id=butSearch",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "1",
      "Value": "counter"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "while",
      "Target": "(${!statusOK} == true)",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "2",
      "Value": "!timeout_wait"
    },
    {
      "Command": "verifyElementPresent",
      "Target": "css=div#modal.ui-dialog-content",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "${!statusOK} == true",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "css=button.modal-alert.ui-button",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "1000",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "3",
      "Value": "!timeout_wait"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!statusOK"
    },
    {
      "Command": "verifyElementPresent",
      "Target": "//table[@id='ProgramsTable']//tr[@class='collapsible'][${counter}]",
      "Value": ""
    },
    {
      "Command": "gotoIf",
      "Target": "${!statusOK} == false",
      "Value": "noMoreServices"
    },
    {
      "Command": "store",
      "Target": "10",
      "Value": "!timeout_wait"
    },
    {
      "Command": "echo",
      "Target": "${counter}",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "${!statusOK}",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "${!URL}",
      "Value": "currentUrl"
    },
    {
      "Command": "clickAndWait",
      "Target": "//table[@id='ProgramsTable']//tr[@class='collapsible'][${counter}]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=butEdit",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('mon') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay1",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('tue') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay2",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('wed') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay3",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('thu') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay4",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('fri') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay5",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('sat') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay6",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL4}'.toLowerCase().indexOf('sun') > -1)",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=RouteOptIncludeDay7",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL6}'.length > 0)",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "'${!COL6}'.split(' ')[0]",
      "Value": "startTime"
    },
    {
      "Command": "type",
      "Target": "id=RouteOptTime1Beg",
      "Value": "${startTime}"
    },
    {
      "Command": "storeEval",
      "Target": "'${!COL6}'.split(' ')[1]",
      "Value": "startTimeAmPm"
    },
    {
      "Command": "select",
      "Target": "id=RouteOptTime1BegAmPm",
      "Value": "label=${startTimeAmPm}"
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL7}'.length < 1 && '${!COL6}'.length > 1)",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=RouteOptTime1End",
      "Value": "5:00"
    },
    {
      "Command": "select",
      "Target": "id=RouteOptTime1EndAmPm",
      "Value": "label=PM"
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL7}'.length > 0)",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "'${!COL7}'.split(' ')[0]",
      "Value": "endTime"
    },
    {
      "Command": "type",
      "Target": "id=RouteOptTime1End",
      "Value": "${endTime}"
    },
    {
      "Command": "storeEval",
      "Target": "'${!COL7}'.split(' ')[1]",
      "Value": "endTimeAmPm"
    },
    {
      "Command": "select",
      "Target": "id=RouteOptTime1EndAmPm",
      "Value": "label=${endTimeAmPm}"
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "if",
      "Target": "('${!COL6}'.length < 1 && '${!COL7}'.length > 1)",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=RouteOptTime1Beg",
      "Value": "8:00"
    },
    {
      "Command": "select",
      "Target": "id=RouteOptTime1BegAmPm",
      "Value": "label=AM"
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "clickAndWait",
      "Target": "id=butSaveTop",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "${counter} + 1",
      "Value": "counter"
    },
    {
      "Command": "endWhile",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "label",
      "Target": "noMoreServices",
      "Value": ""
    }
  ]
}

This issues requires me to be at my workstation to pause and resume the macro.

Any investigation of this issue is appreciated!

If you know Python or another scripting language, the best and rock-solid way to run a macro reliably “forever” is to use command line: UI Automation Open-Source Selenium IDE plus additional features, iMacros alternative

2 Likes

This is a great solution for running a macro that is known to have no inherent issues, thanks!

I can start running some web-fills this way and see if there are any issues. It would still be great to be able to use the GUI to reliably run a loop for an undetermined period without having to Pause/Resume.

:warning: Edit:

I should mention, my web-fill macro has the potential to “Freeze” at pretty much any command, including “type”, “clickAndWait”, “verifyElementPresent” and even “if” statements.

Two things:

  • We confirmed the “stop issue” and we are working on a solution for it.

  • For reliable non-stop automation we recommend to use command line + script method (as mentioned by @ulrich) because it also takes care of non-Kantu issues (e. g. if the website behaves unexpectedly or the browser hangs)

Thanks admin.

FWIW, as a workaround, try your script(s) in Firefox.

I have the same issue in Chrome and for me it doesn’t occur when using FF (but no promises other issues will not emerge!).

Same issue for me as well. Thanks.

Seems it’s happening in Firefox now :frowning:

this a big problem!!

In my experience, my macros run for more loops through Chrome than they do from Firefox.

Kantu also runs marginally slower via Firefox.

This just happened to me a few times too. I thought it was some chrome extensions, so I disabled or removed all of those. I got to about 83 loops this time before the random pausing. It’s waiting on a DOM element that is there. I have to manually enter the next step on the browser for the script to continue.

According to this post by @admin :

We were able to recreate this issue, it seems to be an issue with the Windows message queue. It does not happen on Mac or Linux.

I took a look at my list of windows features a la the “Turn Windows features on or off” menu and I did not have this service installed.

I’ve installed it, rebooted the computer and I ran a macro I have that has been hanging the past few days every 20-60 loops. Since installing the service, at the time of typing out this post I am @ 171 of 563 loops [42 lines w/ several if statements and label/gotoLabel]. Whether this is a fluke, I don’t know; but I will update this post with just how far it had gotten today.

As a side note, I think recent iterations/releases have made the problem worse, as I could average more loops before stalling and I can no longer Pause/Resume to get the macro to continue where it left off. I’ve been considering rolling back the Chrome add-on and may do so back to mid-June back to before, what seems to be, when this issue was being reported.

EDIT: This run ultimately made 292 successful loops before stalling. False alarm…

As an aside, I’m running Kantu on Chrome and Firefox on OS X. So, it does do this random pausing on Mac at the very least. I’m running High Sierra and Mojave on two different systems.

the Demo script link for running Kantu 24/7 using Powershell or Python both lead to a dead page (404 error).

@Jab Broken links are fixed, thanks for pointing this out!

I close and lock this post as it is a duplicate of [Issue #513] Script freezes unexpectedly with no error written to log. Manual pause/resume brings it back - #61 by admin

Note: Issue solved (but if you still see issues, please post them in this ticket, or open a new one)