Problems with autorun open html random bug

Hey there,

I’m running two macro’s after each other in Kantu all the time by opening an autorun file with: “macro=yyy&storage=xfile”. They work fine. Now when I use the autorun html content as macro, they become random buggy when it’s about opening an url:

Executing: | open | https://zzzzzzzz.yyy.nl:5001/webclient/#/login | |

(Not actual url)

I get the error:
[error][ignored]

open’ failed. No page load event detected after 10 seconds. Error detail: still same ipc secret.

The interesting part is that running the first macro and opening a page (which opens the browser) works, closing the browser, and opening another url also works.

But then then this macro is done, the second macro (which is exactly the same macro atm with a different name) has problems with opening an url. The browser opens, the page is loaded, but kantu does not recognize the page is loaded. Once i reload the page manually, kantu thinks all is oke and continues. If i don’t reload the page manually, I get the error as stated above.

The whole thing doesn’t happen when I don’t use autorun html as macro content, but do call the url of the autorunfile with “macro=yyy&storage=xfile”.

I tried to replicate the bug, this time I could run the two macro’s after each other for two times straight without error. At the third time again it gave me the error message of no page loaded event detected.

So somehow when I use the autorun content it loses the detection to this event sometimes. But when I don’t use the autorun content, but the one of Kantu, it just works all the time…

Can someone help me, is this a bug, or did I missed some other url parameters when I use the autorun html content?

Thanks in advance,

Michiel

edit:

I wrote an onError, in case something happens like the open command doesn’t work, it closes all tabs, and tries the macro again. Then the open command works.

@admin , anyone around able to help me with this? I filled in the contact form last day, but no reaction yet. This really is important to us. Thanks in advance,

Greetings,
Michiel

Hi, if can you add a screencast of this issue, this should clarify the problem further. That would be helpful.

Also, a few questions:

  • So the “Open” command gives the error in the 2nd macro?
  • Is this with Firefox or Chrome?
  • Does adding a “Refresh” command BEFORE OPEN to the 2nd macro help? (I agree that this should not be required, just as a test)
  • Does closing the macro and browser between each macro run help? (&closeKantu=1&closeBrowser=1) <= that should work for sure

Hey thnx for your reply,

  • The open command also becomes buggy at the first macro after a while…
  • This is with Chrome, everything is updated to the last version.
  • The refresh command inflicts with the autorun file. Because that refreshes the macro autorun and opens the macro in kantu.
  • I do know the macro is waiting at the open command, while the page has been loaded, when i refresh the page manually at that moment, the macro continues because it thinks the pages has been loaded well.
  • I’ll also add the closeKantu=1, i already had the browser closed. After trying this out, it still sometimes makes the situation buggy. This doesn’t solve it.

Which I also notice, that while calling the macro, i see in the log and in the bar that become green / purple when being executed, that it is excuting multiple times:

For instance:

> [status] Playing macro 3cx_verify
> [status] Playing macro 3cx_verify
> [info] Executing:  | comment | DEBUG ALLEEN AAN HEBBEN (1) ALS MACRO BUITEN SERVER OMGEVING GETEST WORDT | debug | 
> [info] Executing:  | store | 0 | debug | 
> [info] Executing:  | if_v2 | ${debug} == 1 |  | 
> [info] Executing:  | echo | verify_macro |  | 
> [echo] verify_macro
> [info] Executing:  | comment | Bovenaan zetten, indien fout dan naar label ERRORLABEL (onderaan) | ERRORLABEL | 
> [info] Executing:  | onError | #goto | ERRORLABEL | 
> [info] Executing:  | store | 5 | !timeout_pageload | 
> [info] Executing:  | store | 0 | firstTry | 
> [info] Executing:  | store | ${!cmd_var2} | s | 
> [info] Executing:  | executeScript_Sandbox | var str = ${s}; var res = str.split("*****"); return res[0] | s1_url | 
> [info] Executing:  | executeScript_Sandbox | var str = ${s}; var res = str.split("*****"); return res[1] | s2_username | 
> [info] Executing:  | executeScript_Sandbox | var str = ${s}; var res = str.split("*****"); return res[2] | s3_password | 
> [info] Executing:  | echo | The new vars are s1=${s1_url} and s2=${s2_username} and s3=${s3_password} |  | 
> [echo] The new vars are s1=https://xxxxxx.3cx.nl and s2=xxx and s3=xxxxxxx
> [info] Executing:  | label | BEGIN |  | 
> [info] Executing:  | comment | Probeer de website te openen |  | 
> [info] Executing:  | store | true | !errorignore | 
> [info] Executing:  | open | ${s1_url}/webclient/#/login |  | 
> [status] Playing macro 3cx_verify
> [info] Executing:  | comment | DEBUG ALLEEN AAN HEBBEN (1) ALS MACRO BUITEN SERVER OMGEVING GETEST WORDT | debug | 
> [info] Executing:  | store | 0 | debug | 
> [info] Executing:  | if_v2 | ${debug} == 1 |  | 
> [info] Executing:  | echo | verify_macro |  | 

So at some point (where it says: > [status] Playing macro 3cx_verify again) it also seems to restart. I have checked in the program that tries to call the macro, it only calls it once.

To fix the open bug for now, i have onError, so when there is a timeout in loading the url, it goes to the errorlabel, closes the browser, and opens again. Then it works.

So I added a screen capture:

You can see in the beginning, that it shows some kind of twitch when the macro starts (flipping between store / open command)…
Then it starts waiting for the url to be loaded, I have installed the timeout_pageload on 5, so within the 5 seconds, it goes to onError where it closes the browser, and tries the open command again and then it does work.

I barred some stuff out with a black bar, because of credentials;)

I have e-mailed you the same starting post in the contact form, so if you need the right url, its in the e-mail.

Thanks for your help already,

Michiel

1 Like

@admin Could you or one of your co-workers / developers, look at this problem? Today i’m trying to recreate the problem with different macro’s and different websites.

Hello, I tried a different macro. With a variable for setting up the url. Most of the times the macro executes well when I start this within the browser.

For instance i have a startmacro.html, which has a link for starting up the test.html (which is the autorun file).

So normally it outputs this:

* [status]

Playing macro test

* [info]

Executing: | store | https://www.google.nl | link |

* [info]

Executing: | open | ${link}/search?source=hp&ei=nBXdXcHoHou8kwWB9qawDw&q=test&oq=test | |

* [info]

Executing: | store | hello world*****123*****yoyo | s |

* [info]

Executing: | executeScript_Sandbox | var str = ${s}; var res = str.split("*****"); return res[0] | s1 |

* [info]

Executing: | executeScript_Sandbox | var str = ${s}; var res = str.split("***"); return res[1] | s2 |

* [info]

Executing: | executeScript_Sandbox | var str = ${s}; var res = str.split("***"); return res[2] | s3 |

* [info]

Executing: | echo | The new vars are s1=${s1} and s2=${s2} and s3=${s3} | |

* [echo]

The new vars are s1=hello world and s2=**123 and s3=**yoyo

* [info]

Macro completed (Runtime 6.21s)

But at some moments, it executes the macro multiple times, or just keeps hanging on opening a page. See new youtube video:

Could you guys please give a response or notice that when using autorun (html) Kantu is more buggy and fix this? Otherwise we need to switch to a different software solution for macro’s.

This issue was caused because if on URLs with anchor # links the page was already loaded. Thus no page load event is fired by the browser. The solution is now that UI vision loads about:blank before such a page. Fixed in V6.1.1