No tab with id solution


I have several unattended macros that are triggered via task scheduler that start with chrome not already open and noticed a recent increase (over 50% of the time) getting the No tab with id: xx error like shown below:

Screenshot 2020-10-02 085439

After a lot of testing I found out that the error doesn’t happen when chrome is already loaded or if my script loads chrome first, pauses for it to load, then starts UIVision and the macro.

If I remove the pause in the script the error comes back. I’m not sure why but a pause in the beginning of the macro itself doesn’t help, it has to be before UI.Vision is even called.

If anyone is getting this error with this specific scenario try the loading pause to see if it helps.

Maybe a pause needs to be hardcoded in UI.Vision before it tries to communicate with Chrome?


I’ve had this problem in the past using the command line (batch file) with continueInLastUsedTab-0/1 option since I no longer use this option it’s resolved and I haven’t noticed this bug anymore,

@User9898 I’m seeing this error, as you said when chrome is taking a bit longer to load I observe this issue. Between could you please let me know how are you adding loading pause as you mentioned?
I added a pause before and after calling UI vision macro proc through command line api in my python script but it did not help much.

I am just loading chrome, pausing, then calling the macro.

Start-Process “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”
Start-Sleep -Seconds 8
Start-Process “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” “file:///C:/Users/Path//UIVision/ ……”

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”
timeout 8
“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” “file:///C:/Users/Path//UIVision/ ……”

I’m not familiar with Python