Error Running Edge Browser via Orchestrator: How to Fix It?

Error Running Edge Browser via Orchestrator: How to Fix It?

Issue

During the execution of robots using the Microsoft Edge browser through the orchestrator, a specific issue was identified: the browser did not start correctly, whereas when running locally, the flow executed normally.

The error presented was:

Warning

Warning
Message: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir

Investigation

After a detailed analysis, we found that the issue is a known bug already reported in the official Selenium repository, available at:
https://github.com/SeleniumHQ/selenium/issues/15340

This behavior mainly occurs in execution environments controlled by runners.

Solution

To resolve the issue, it was necessary to add the following startup argument in the Selenium settings for Edge:

Notes

Notes
op.add_argument("--edge-skip-compat-layer-relaunch")

This parameter prevents Edge from attempting to relaunch processes using the compatibility layer, which is the root cause of the problem in this execution context.

Important:
The solution was found through comments on the official Selenium issue and has so far proven effective in working around this bug.

Conclusion

If you are facing the same error when using the Edge browser in orchestrated executions, we recommend adding the --edge-skip-compat-layer-relaunch parameter to the driver configuration. This approach avoids the need to change local settings or execution policies and allows the robots to run normally in the orchestrated environment.

    • Related Articles

    • Error Running Wizard.exe: How to Fix It?

      Issue When attempting to start the installation, configuration, or authentication process of the BotCity Runner using the wizard in .exe format, you may encounter difficulties opening the file. This error usually occurs due to company security ...
    • How to fix Python environment preparation failed error

      A very common error when executing automations through the Runner is Python Environment Preparation Failed. As the name suggests, the Runner fails when trying to prepare the Python environment for the robot's execution. This error occurs in different ...
    • "Session Not Found" Error When Using a Startup Script to Disconnect User Sessions

      Issue Description When using a startup or logout script to disconnect user sessions on Windows, some users encounter the following error: Session not found This usually happens when the username contains spaces, for example: USER NAME In such cases, ...
    • Problems with dependencies when running an automation

      This problem usually occurs when the dependencies installation step is not done correctly. When running the code, a message is displayed regarding the installation of the packages: ModuleNotFoundError: No module named 'botcity’ The first step is to ...
    • Resolving SSL certificate verification issues when running commands using 'pip'

      Access blocks are quite common in corporate environments. As a result, you may encounter problems when trying to use BotCity tools and Python resources on a machine in your company's environment. One problem that may occur in these scenarios is the ...