Freeze or Non-responsive issue


#1

I have been running Kantu verions 3.3.3 with Chrome Version 70 on windows 2012.
here is the code im running in loop:

{
“CreationDate”: “2018-11-25”,
“Commands”: [
{
“Command”: “store”,
“Target”: “slow”,
“Value”: “!replayspeed”
},
{
“Command”: “store”,
“Target”: “1”,
“Value”: “!TIMEOUT_WAIT”
},
{
“Command”: “store”,
“Target”: “20”,
“Value”: “!TIMEOUT_PAGELOAD”
},
{
“Command”: “csvRead”,
“Target”: “ReadCSVTestData.csv”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://soundcloud.com/”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “//[@id=“main”]/div/div[5]/div[1]/nav/div[2]/p[2]/button",
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=login-username”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=login-username”,
“Value”: “${!COL1}”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=login-password”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=login-password”,
“Value”: “${!COL2}”
},
{
“Command”: “click”,
“Target”: “id=login-button”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id=“main”]/div/div[4]/div[1]/nav/div[3]/div/a/span”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://soundcloud.com/16yrold/mobamba”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “222000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//*[@id=“main”]/div/div[4]/div[1]/nav/div[3]/div/a/span”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “link=VIEW ACCOUNT”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=1”,
“Value”: “”
},
{
“Command”: “deleteAllCookies”,
“Target”: “tab=1”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=CLOSEALLOTHER”,
“Value”: “”
}
]
}
so what this macros does is, it runs in loop, opens a link, submits the login form using csvRead, plays a track, deletes the cookies and moves to next loop to repeat the same.
It runs seemingly smooth, without any errors but with one big annoying issue of getting stuck at some loop randomly.
when i run it with “fast !replayspeed” it freezes at some random line within less than 10 loops, but when i run it with “slow !replayspeed” and “No log” it freezes after like 30+ loops.
The point is, it does freeze(stuck) and most of the times it freezes when opening a link. I have tried everything but this freeze issue is not getting resolved as it happens only randomly and requires to stop and start the loop again where it left off. Can the Admin or someone please point out what might be causing this issue? Thank you


#2

Welcome to the club! :grinning:


#3

As @commensal mentioned, this “stop after 10…100” loops is a known issue. But we are making progress fixing it. We have now a way to create it, so fix should be available in the near future.

That said, if you want to run a script truly 24/7 I recommend that you use the command line. This allows you to check on the return value. And if Kantu or Chrome gets stuck, you can simply kill the process and continue. Here is a sample script that does this:

Full source code here

247

PS: With this script, when the “freeze issue” happens, then Chrome gets closed and the next loop starts, so the work continues.


Apparent stalling and no CSV view
Kantu gets slower and slower the longer the script is running
Auto-close iFrame causes timeout error
#4

@admin
could you please add any demo macro in the above “run one macro forever.ps1” code, so that it is easier to understand how to use it. Thank you