Multiple UI.Vision RPA Macro Windows Opening

Recently, I have been having issues with multiple UI.Vision Macro windows opening when I open from command line.

I run the auto created html file and it loads into the browser (MS Edge), and then opens the macro with the JSON link. This happens if I open from powershell or from batch file.

Most of the time it works fine, but randomly it will open between 2 to 5 macro windows. It then runs through the macro that was called and closes the browser and the 1 macro window that was running the commands. This leaves the rest open and hangs the automation from moving on to the next line. When multiple windows do open, only 1 seems to go to the correct macro listed in the JSON file, the others seem to go to the last macro that was run. Sometimes when it opens multiple windows the one that runs errors out that it has no connection to the browser.

I run about 15 macros, one after the other, from a script. The issue occurs randomly on different ones, so I know the html files work properly.

I have tried updating the to a newer version but that did not help. I am running v8.2.7 on MS Edge.

Can you test if it works better in for Chrome?

Chrome extension version is 8.3.1. Chrome also has Desktop Automation enabled instead of Browser Automation as Edge is configured.

I ran through a large number of command line open/run macro/close using Chrome and it didn’t open more than one Macro Window.

@admin any ideas on what is causing this on Edge? Is it the version (8.2.7) vs Chrome (8.3.1)?

To test this, I have installed the Chrome version from the Chrome extension store into Edge. Not sure if it works for updates and everything, but I will let you know how that works!

1 Like

So updating the Edge extension from 8.2.7 (latest on Edge store) to 8.3.1 from the Chrome store seems to have fixed it. Any ideas on when Edge store will get the latest version? Will the extension update from the Chrome store automatically?

I also have the same problem with ui vision for firefox, it seems to me that it opens multiple ui gui when the browser is slow to open and it seems to try again to reopen the ui vision window multiple times. It’s an old bug, I use 2 years ago version of ui vision and it was happening before. It is necessary to be able to accurately replicate the error so that it can be corrected but as it occurs randomly it has always been difficult to reproduce and fix it

So I have 2 sets of macros that run through a powershell script. Both use Edge and run the browser opening the auto created autorun file. I have the file set to wait 15 seconds before it opens the macro window, to try and let the browser finish loading.

The first set was failing daily because it was opening multiple macro windows for almost every run. After installing and switching to 8.3.1, the first run has not opened multiple macro windows for the past 3 mornings.

The second set I can usually watch, and now it is opening multiple macro windows for a few of the runs. The only difference is that I have Firefox open doing other things until the macro starts, and so I leave it open in the background.

So maybe the issue with the second set is related to slowness of the system. I will try tomorrow having Firefox closed before the second macro starts!

This bug has never been fixed because it is not known exactly what causes it.
It seems to me that it happens when firefox opens slowly in fact in the past I had set up a batch file that first opened firefox, after 30 seconds it started the macro but I don’t remember exactly the commands I used.
Sometimes it happens that ui vision also opens 2 or more firefox tabs with selectwindows

@newuserkantu @admin

So this has started happening again since the update to 8.3.6. The funny thing is, if the command line call fails, I can refresh the screen with the url calling the macro (\Scripts\scriptlogs\macrolog.txt&closeBrowser=1&macro=macro.json) and it will open multiple macro windows again, and it will open the exact same number of windows every time. No idea what is going on with this, but I doubt it is the browser being slow, since there is nothing else running when this happens, and it is hours later of no activity on the computer that I am refreshing it.

I use an old version of ui vision for firefox 6.2.6 which is the latest available and this bug rarely occurs.
I don’t use Chrome because it consumes too many resources it starts many processes in the task manager.
This bug has been around for years and has never been fixed,
I no longer use to start macros from the command line because when you automate something you have to be sure at 100% that it always works and starting from the command line there was often some problem (it happened to me that the ui vision gui opened but then the macro didn’t start).
It would be great if it could there would be the possibility to start macros with keyboard shortcuts and use an external program to start it without using the command line (with AutoHotkey for example or another program)

@newuserkantu I have gotten around most of the issue by putting a time limit on each macro in the powershell script. Basically, I give it 12 minutes and if it hasn’t finished I kill it! For the most part it is OK, but I lose the logging. I usually have to open Edge and the Macro window and I can see which macros had issues by them not being coloured green!

Let me know if you want the powershell code for this!

It is still a pain in the ass though!

Using the kill process can damage the browser, lose data and ruin programs is a solution that should never be used.
I used this solution years ago and several times my browser profile was corrupted by using the kill process command

Just to confirm: So it worked ok with V8.3.2?

@admin I was still seeing this same error very infrequently (once every 20 or so macros) on v 8.3.1, but once it updated to 8.3.6 it was happening almost every third or fourth macro. I made some changes so that my script would keep running, and haven’t really looked, although I can still see it happening if I am monitoring the macro running.

Also, like I said, if I am watching and see it open multiple macro windows, and then I stop the macro and close the macro windows, and rerun the command in the browser, it will open the exact same number of windows. If it had 5 before, refreshing the file URL will open 5 again, and keep opening the same number.

To be honest, I kill processes all the time. I would never expect corruption of the browser profile or anything else related to the process.

That being said, I have backups of the system and can restore it faster than the time that it uses if the scripts are hung!!

@admin turned off some of the error checking and it is still happening every third or fourth macro run. They all run from the command line.

I’m having this same problem since the new upgrade to version 9. (Two browser windows open & two windows every time I run from a bash file on linux). I’ve not seen this behaviour before and the code has been running for a year or more prior to this upgrade. I’m trying to go back to the previous version to test.

@PT7 Can you please post the shell command line you are using?

google-chrome “file:///home/pt/Desktop/MEGAsync/UIVISION/” --disable-session-crashed-bubble

I tried removing the parameter without success.