11-09-24 12:39 PM
Hi,
I have a bot whose task is to launch a web portal, log out and close MS Edge. The bot repeats the process 20 times per run. When I run the bot with the scheduler, it sometimes shows the following error when launching the web portal.
"Failed to perform step 1 in Navigate Stage 'Launch' on page 'Sign in' - Process with an Id of -1 is not running"
However, when I run the bot manually, the problem does not occur. I have checked the Run mode of Object Studio. It is selected as Exclusive.
What could be the reason of the Error?
11-09-24 07:53 PM
1. I know you mentioned it is set to "Exclusive," Are other processes running on the same resource at the time?, If any other process tries to interact with the browser or the same application, it might cause conflicts.
2. Maybe the application might take longer to launch when scheduled. Can you try Adding a retry mechanism or increase wait stages (for example, by waiting for the window to appear) before performing actions. You can add a delay after closing MS Edge and before relaunching the portal to ensure the application has fully exited.
11-09-24 10:43 PM
Run Mode won't cause this. That purely affects whether other sessions are allowed to run at the same time as the current session and in no way affects how the Object itself runs or the application that it is automating. (I know Run Mode sounds like it would mean that but it just doesn't.)
I see you marked Blue Prism Enterprise v7. Specifically what version are you using?
I don't know what causes that error so I'm just spit balling here. Are you waiting an appropriate amount of time after closing Edge before launching it again, such as using the Sleep action in the Utility - General object between close and launch?
Have you had this issue in the past or did this used to work just fine? If it used to work, has anything changed in your environment, such as operation system version, new runtime resource, upgraded Blue Prism, etc.?
12-09-24 07:11 AM
Hi,
I would implement retry logic if you haven't done so as this happens to me randomly as well and trying it for the second or third time it usually succeeds.
One case which happens really rarely to me (once in a month or two) is that the whole OS is in a weird status as msedge processes cannot be killed with standard kill action and the whole machine must be restarted (well, I found power shell script to avoid restarting but did not implement it yet).
To conclude - try retry logic if it helps.
Regards
Zdenek
12-09-24 09:28 AM
Hi @Brigianakopec @david.l.morris @zdenek.kabatek,
Thanks for the information.
First of all, I would like to mention that only one process is running at a time. We have two other processes running from the same resource where SAP and another web portal are automated. There are no issues with these two bots.
Secondly, I have used both delay and retry logic to fix the problem. In the navigate stage during the launch, I used a delay of 5 seconds. After that, I used the wait stage with a 10 second delay and with a triple loop. If the portal could not be loaded within 30 seconds, the bot will kill the Edge and launch the portal again. This is repeated three more times. After that, the bot will display the error.
Regards,
Ekram
12-09-24 11:17 AM
My guess would be that there is something between the end of the loop and the start of the next iteration. Try a Wait for Detach loop after you close, as a means of being (more) certain that everything is ready for the next cycle. Sometimes apps are slightly slow to close, and your automation can be trying to relaunch too soon, before the app is ready.
3 weeks ago
Hi @John__Carter,
Sorry for the late reply. The problem occurred at launch stage. That is why the next stage could not be executed after the launch. But the problem has been solved. I used recovery and resume stage for the launch stage. Then I linked resume stage to the next stage (attach stage). Now it is working.
Still, I could not find out what the error “Process with an Id of -1 is not running” is and why it is occurring.