[BUG] Macros SOMETIMES Repeat Twice (no looping in macros)

I have noticed that macros sometimes repeat twice, I have attached a log of a run where it repeated and another run where it didn’t.

At the start of the repeat log it says:

2022-01-29T03:55:10.423Z - UI.Vision RPA started
2022-01-29T03:55:10.422Z - UI.Vision RPA started
2022-01-29T03:55:12.442Z - [status] Playing macro RegistryAu(QLD).json
2022-01-29T03:55:12.466Z - [status] Playing macro RegistryAu(QLD).json
2022-01-29T03:55:12.506Z - [info] Executing: | run | GetCommandLineParameters() | |
2022-01-29T03:55:12.513Z - [info] Executing: | run | GetCommandLineParameters() | |

The log seems to show everything happening at once but it opens a tab, runs to completion, then opens a second and completes.

This is the URL that invokes the macro (parameters slightly manged by this forum, also in zip):


2022-01-29 - Macro Repeats Twice - sometimes - logs.zip (5.0 KB)

I’m not sure this is always the case but duplication appears to happen much more often (if not only) if I already have ui vision started. Also its not consistent, sometimes two tabs open at once and one executes.

I am experiencing the same issue.
I have a powershell script (based on the script on github) which is launching a series of macro in an infinite loop.
After a random number of repetition, it’s like it was running twice the macro in the same time. Here an example of log file:

[status] Playing macro F:\Google drive 2plus\swap_on_mist-t.json
[status] Playing macro F:\Google drive 2plus\swap_on_mist-t.json
[info] Executing: | pause | 1000 | |
[info] Executing: | pause | 1000 | |
[info] Executing: | open | manual:faq:use_sdcard_on_kitkat [ Locus Map - knowledge bas] | |
[info] Executing: | open | manual:faq:use_sdcard_on_kitkat [ Locus Map - knowledge bas] | |
[info] Executing: | pause | 1000 | |
[info] Executing: | pause | 1000 | |
[info] Macro was stopped manually (Runtime 6.00s)

In the log folder, there are also 2 log files at exactly the same time.
Concerning the execution of the loop, the iterations that are following this double execution are stoped at the very beginning with this issue:

Status=Error: Could not establish connection. Receiving end does not exist.

[status] Playing macro F:\Google drive 2plus\swap_on_mist-t.json
[info] Executing: | pause | 1000 | |
[info] Executing: | selectWindow | TAB=OPEN | manual:faq:use_sdcard_on_kitkat [ Locus Map - knowledge bas] |
[error] Could not establish connection. Receiving end does not exist.

Could someone already solved this ?

No sorry, still happens as does not opening a url when it is supposed to, for now I’m doing as much as I can with AHK, I’ll look into these issues more at some stage…

Hello Denis,
Thanks for your answer.
In order to see if we’re talking about the same thing, I’ll sum what I do.

I am using UI Vision free Edition. I am launching from powershell a series of macros, introducing variables and using feed back from macros via csv files. All the process in powershell is in a infinite while loop. In theory, the script and macro are working correctly but when I check the logs that, I saw that sometimes (not so rarely), some lines are kind of executed more than once, up to 4 times.

Sometimes it affects the process with error so I just managed, so far, when I get a status error from the results, to reinitialise the process what is not really a big deal.

Like you, I was also considering to solve the problem later but I realised yesterday that it could affect the process in the macros without error what is unacceptable. It seems my problem is more severe than your. As it appears that not a lot of users are experiencing this, I am hoping that maybe I (and maybe you) am using the tool badly. Would you agree to see with me if it’s the case ? (I would send you a ps script but it seems it is only possible to upload jpg file)

Could you tell me if you think your problem is similar ?

I’m invoking the URL (generated HTML) via chrome.exe, other than that I have seen most of what you say, but until I don’t currently use this code that often so for now I have many other more urgent issues to look at.

I do wonder about the people who put it to serious use because I haven’t find it to work reliably.

@roger128 Do you have a test case for us?

If you look at our Powershell RPA scripts you will see that they check the status of the RPA software, and - if something goes wrong - close Chrome and restart the macro. This way you can run the RPA automations non-stop even if once in a while something goes wrong (website hangs, browser freezes, etc…).


I understand with your answer that you are aware of that bug, is it true ?
What you suggest to do is what I actually do, I mean what I was doing so far. I check in the variable $result if there is the word “error” and if so, I restart the browser and reinitialise the process. But what I experienced recently push me to consider that workaround inacceptable : the value of 2 variables in the macro were exchanged (I can show you the logs and I suspect that the reason may be the double opening of the macro) and no error was detected.
Moreover, the proportion of problematic macros (which open several times) is very high, more than 30%. It is not safe to accept this rate of errors.

For my understanding: What two variables do you mean?

loop.zip (9.8 KB)
Please find attached
-the powershell script that I used
-A number of logs while running the script which is launching the same macros. Some of them are fine, some of them have errors.

In the log named “log_04-24-2022_16_28_47”, you can find this:

[info] Executing: | storeValue | xpath=/html[1]/body[1]/div[1]/div[1]/main[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[3]/div[1]/div[1]/div[2]/input[1] | offer |
[info] Executing: | executeScript | return ${step_amount}*${!cmd_var3} | limit |
[info] Executing: | echo | ${offer} ${limit} | |
[echo] 2666.72 103.84215991692601

The value of $offer is just impossible and no error is indicated in the log.

@admin how could I only re-run if an error pops up? I tried this but it run a forever loop even if the macro is perfectly done.