Occasionally getting "No tab with id:" error

I am kindly asking for help because Ive been struggling for days with this error.
I got 5 Chrome profiles and Im using uivision html file to open rpa. These chromes are being closed and opened every 5 minutes by batch file.
Occasionally(like 5 times a day) Im getting “No tab with id” error. It happens before Rpa has started a macro.
I got delays between every single action (opening closing chrome and rpa). At least 5 sec.
Would you please explain me what triggers this error?

It’s a old bug not solved and showed when you run via command line or bookmarklet

Im trying to figure out why is the error happening so I can find a workaround.

In my opinion this error occurs when you start via command line a macro and the browser is lagging behind loading and therefore generates this error because ui vision is not ready to run the macro.

I have already tried to adjust the uivision html file and put delay between opening the html and running rpa.
Didnt work. Thank you tho for replying, I appreciate it.

There is no solution, I had this identical problem 2 years ago and have not found a definitive solution. To reduce the error I first start the browser and after 30 seconds start the macro, doing so occurs a few times.

My workaround for this problem is:

  1. In the file (batch, powershell or whatever) that you use to run the HTML, before openning the HTML, save a 0 to a csv file i.e. C:\Kantu\csv\OK.csv

  2. Add a command at the beggining of your macro to save to a file some flag i.e. csvSaveArray | OK (variable with an array [[1],[2]]) | C:\Kantu\csv\OK.csv

  3. In the file (batch, powershell or whatever) that you use to run the HTML check after openning the HTML (20 seconds or so) if the file C:\Kantu\csv\OK.csv already has the 1 saved in the first position, if it’s not, then try to open again the HTML.

I use this workaround and now it doesn’t matter if the “No tab with id:” error appears

You are a genious, sir.
Thank you so much for your solution!

1 Like

This is not a solution to the problem and the problem will continue to manifest itself, also when you have the browser blocked what will you do ?
this does not seem to me to be a solution to the problem.

1 Like

it is not a solution, it is a workaround, and for my macros, i always kill chrome processes before starting a new macro, so it won’t genereate a conflict or if chrome was stuck somewhere
I know this “workarounds” are specific to my use, but thought it’d help.
As I said, is a workaround, not a solution to the problem

agree with you guys but theres no solution for years and this guys idea works for me so its a solution for me :smiley:

1 Like

Kill Chrome process is dangerous because can damage/delete chrome files.

I never kill browser process is very dangerous, it’s a bad idea kill process of browser.

just reopen ui vision and the error disappears.

Agreed… killing processes can crash it to the point of needing to be reinstalled. In PS, you can close chrome gracefully like this:

Get-Process -Name chrome | ForEach-Object { $_.CloseMainWindow() }

1 Like