[error] Invalid tab ID : 5

Hi,

I must be the unlucky guy since I have another problem running my macros in command line. May be it is related to my previous topic : [UI.Vision RPA] No tab for dashboard yet - #4 by admin

For test purpose, I have the same macro code running from the command line 5 times. This macro open a website to catch the ip address. So I run a serie of 5, one same macro after another (as it is said in the video Run one macro after another with the UI Vision command line API - YouTube) waiting for the log file and then launch the next one.

I start macro 1-4 with closeBrowser=0&closeRPA=1, and the last macro (5) with closeBrowser=1&closeRPA=1.

So after several series everything was fine. But for the last one, the macro 3 stopped (even if !errorignore is set to true) to this [error] Invalid tab ID:5.

I use a Firefox browser. My macro just opens a website (“http://whatismyippro.com/”), and doesn’t close any tab or doesn’t use any tab command.

I solved this problem with my previous solution (testing a ok.csv I create at the beginning of the macro to test if the macro starts and if not kill Firefox for a fresh start of the command line).

What I can see when I start my serie is that Firefox (the home page of Firefox is about:blank), displays a web page (ui.vision.html) saying it starts RPA. The RPA starts. Then the macro runs and open the website (“http://whatismyippro.com/”) in the same tab. Macro 1 ends.

Then Firefox displays again the web page saying it starts RPA (in the same tab where the http://whatismyippro.com/ was). The RPA opens. Then in the same tab the http://whatismyippro.com/ page is “restored”. The macro starts again and opens again the http://whatismyippro.com/ page, etc.

But in this case the Macro (the 3rd one to be started) stopped immediatly on this error “[error] Invalid tab ID : 5”. I suppose the “ID : 5” has something to do with the fact that previously it opened 4 differents pages : 1) start RPA page 2) my ip page 3) start RPA page 4) my ip page.

So may be I did something wrong. May be I have to open a new tab in my macro after the start and run the macro in this new tab. May be I should define my Firefox homepage with a real website (google). Since it doesn’t happen all the time I think it is the same kind of problem than my previous topic : [UI.Vision RPA] No tab for dashboard yet - #4 by admin. A problem when opening the IDE (tempo ?).

Thanks for reading (!!) and your possible help.

Eric.

Thanks again for the info. This issue sounds similar to [Recreator Required] No tab with id: 1662 - #5 by admin - which is already on our todo list. I will update this post once we know more.

This is a good workaround!

We found that Invalid tab ID: and t.message is undefined can be a side effect error message when the macro is not found (e. g. wrong macro name or wrong folder). For more details see here:

Another reason for “Invalid tab ID” or double UI.Vision windows opening on command line start can be a very slow CPU performance, as you can find on shared VPS systems that have throttled CPUs.

Performance test

Here is a comparison between a 2-core 4GB system running inside a VirtualBox on a Macbook, and a 2-core 4GB system VPS (shared CPU!). As you can see the browser startup time is very slow on the VPS:

^In the screencast above we first start Firefox on the VPS, and then on the VirtualBox. Despite starting first on VPS, the Firefox only opens long after the VBOX Firefox is open.

Running the RPA Node.JS automation:

On the regular Ubuntu system, the RPA automation runs fine and without issues:

On the throttled VPS CPU, the very slow browser startup time can lead to some strange issues, such as two or more UI Vision widows opening up. We plan to improve the performance of UI Vision further and logged a ticket about the issue, but some systems are just too underpowered.

Recommendation: Use a non-shared VPS or dedicated server. The browser startup time is an easy way to test VPS performance.

PS: If your system is only “a little bit” too slow, you can use the workaround to start the browser first, and then call the RPA command line.

Hey, I think I figured it out.
In my case Edge somehow remember from which tab macro was initially played from and if you close tab “to the left” or “to the right” of this tab if will spew this incorrect id error. Every time this happens I just drag the tabs around or try to close one tab/open empty one to recreate the position. Since then no problems with this error.
Sincerely,
Matt