Pausing (stopping) Issue


#1

Moving discussion to new post. So here’s some code I run and it pauses pretty frequently on me. It won’t stop every time I run it but probably 40-50% of the time it will pause on me. And my wording maybe caused some confusion, my issue isn’t with the “pause” command. My macro will just stop in random spots (not after a “pause” command). It will stop and it just sits there without erroring out until i either hit “stop” to cancel or “resume”. Hitting “resume” will normally start back up again just fine. Like just now it stopped on this random line of code

{
“CreationDate”: “2018-10-5”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.amazon.com/report/infringement”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorIgnore”
},
{
“Command”: “store”,
“Target”: “51”,
“Value”: “z”
},
{
“Command”: “label”,
“Target”: “restart”,
“Value”: “”
},
{
“Command”: “csvRead”,
“Target”: “KantuEnforcements.csv”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “${!csvReadLineNumber}”,
“Value”: “!csvReadLineNumber”
},
{
“Command”: “store”,
“Target”: “${!csvReadMaxRow}”,
“Value”: “rows”
},
{
“Command”: “while”,
“Target”: “${!csvReadLineNumber}<${z}”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=inputASIN”,
“Value”: “${!COL1}”
},
{
“Command”: “store”,
“Target”: “${!COL1}”,
“Value”: “a”
},
{
“Command”: “click”,
“Target”: “id=inputGoButton”,
“Value”: “”
},
{
“Command”: “select”,
“Target”: “id=inputInfringingElement-${A}”,
“Value”: “label=ASIN/ISBN-10”
},
{
“Command”: “storeEval”,
“Target”: “${!csvReadLineNumber}+1”,
“Value”: “!csvReadLineNumber”
},
{
“Command”: “csvRead”,
“Target”: “Kantu.csv”,
“Value”: “”
},
{
“Command”: “endWhile”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “if”,
“Target”: “${!csvReadMaxRow} > ${!csvReadLineNumber}”,
“Value”: “”
},
{
“Command”: “storeEval”,
“Target”: “${z}+50”,
“Value”: “z”
},
{
“Command”: “selectWindow”,
“Target”: “tab=open”,
“Value”: “https://www.amazon.com/report/infringement
},
{
“Command”: “gotoLabel”,
“Target”: “restart”,
“Value”: “”
},
{
“Command”: “endif”,
“Target”: “”,
“Value”: “”
}
]
}


Insert Variable Inside String Issue
#2

I don’t have an answer to your question BUT it has been my experience that if a site, especially a site like Amazon, gets a set of fast hits from an IP they will block or throttle that IP… I try to insert a random pause in my scripts (Kantu may or may not support same) to fool the server into thinking there is a human behind the requests… maybe what you are seeing is amazon throttling your IP until it figures out if you are a robot…?


#3

I run a 563 step script every night as I sleep. It was not uncommon for my script to randomly stop and eventually stop because I was sleeping and unable to interact. I added

{
  "Command": "store",
  "Target": "!replayspeed",
  "Value": "slow"
},

to the start of my script. This helped a lot but did not completely resolve the stopping issue. I then started documenting what line of the script caused the pattern. I discovered that the version I launch prior to 11:35 PM and nearly all the pauses and the script I launch if after 11:55 PM worked better. I copied and then modified the 11:55 PM script into a new 11:35 PM script. IF I am remembering correctly the bad 11:35 PM script would go to an input box and a second command would be used to type in the input compared to the good 11:55 PM omitted the click in the input box prior to entering the data.

In my case, the website that the script is used on has far less traffic from 10 PM to 6 AM. The script failure rate is much lower during that period. Although the issue seemed to be resolved with a change to the script, I believe that the issue was with the website’s response . The number of failures were much higher whenever I ran the script outside low use period.

Not a direct answer, but hopefully something will getting you going the right direction.


#4

Thanks for all the info. The issue is - the macro should never just stop without an error, even if the website would behave strange. So we will take this test case, debug it and see what we find (it just might take a bit, as this looks like a tricky issue).


#5

Yeah I know sites can implement methods to slow people down, however I did not have this issue until after the latest Kantu update. Also, if I hit resume it instantly kicks back up and starts working again so I’d think if it was Amazon blocking me that wouldn’t be the case. I’ve been blocked by sites before haha, I don’t think that’s what’s going on here.


#6

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.


#7

563 step macro! Wow!


#8

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


Script Stops Working After Running A While
Script Stops Working After Running A While