This indicates that your system is a “little bit” slow, and there is a timing issue when starting the browser the first time. I assume that at your 2nd (etc) call the browser is already running, and thus all works well.
Now, skype is the name of the macro. The first line of the macro is
XRun /root/skype2.sh
And skype2.sh is
#!/bin/bash
/usr/bin/skypeforlinux &
Now, what do you want me to do?
How can I just run firefox without the url that contains the skype macro?
If I just run firefox, pause, and then again run firefox with skype macro in the url, I will get the error message saying “firefox is already running. Close it.”
I hope you understand my problem. So, how can I start the browser first, and then the RPA command line?
I confirmed the issue with launching Firefox is Firefox is already open. Chrome does not show this issue. So one solution is to use Chrome.
If you want to work with Firefox, I found that using wdg-open for the first launch solves the issue. (I am not sure why this works/what makes the difference here, if anyone knows, please let us know)
Here is a video of the test. First I run the normal script twice, and then the one that first opens Firefox, then runs the command line. What also helps on slow machines is to add continueInLastUsedTab=0 - With 0 it avoids the tab switching, which can also cause a timing issue (and then we get Invalid tab id).
#!/bin/bash
# Clean up left-overs before start
/usr/bin/killall firefox
# start Firefox first. Any URL can be used. This is for slow systems
xdg-open "https://ocr.space"
sleep 5s #Give the browser enough time to fully open
#Now run the actual RPA command line URL
/usr/bin/firefox "file:///home/m/Desktop/ui.vision.html?continueInLastUsedTab=0¯o=linux%20test&storage=browser&direct=1&closeBrowser=true&closeRPA=true"