elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.03k stars 1.1k forks source link

[BUG] ELSA 2 - Elsa.Activities.Rpa.Web fails to download chrome driver #5665

Open hcfv opened 5 days ago

hcfv commented 5 days ago

Description

When instantiating a workflow that requires the nuget Elsa.Activities.Rpa.Web and to the activities presented on it requires during execution time that a chromedriver is downloaded If the chrome version presented on the machine executing the code is before version 115 everything is downloaded as expected but when the chrome version is equal or after 115 then it can no longer download it due to changes on the API called. More details can be presented here

System.Exception: ChromeDriver version not found for Chrome version 126.0.6478
   at Elsa.Activities.Rpa.Web.Services.ChromeDriverInstaller.Install(String chromeVersion, Boolean forceDownload) in C:\Users\hugo.vilaca\source\repos\elsa-core\src\activities\Elsa.Activities.Rpa.Web\Services\ChromeDriverInstaller.cs:line 41
   at Elsa.Activities.Rpa.Web.Services.BrowserFactory.OpenAsync(String driverType, Object options, CancellationToken cancellationToken) in C:\Users\hugo.vilaca\source\repos\elsa-core\src\activities\Elsa.Activities.Rpa.Web\Services\BrowserFactory.cs:line 40
   at Elsa.Activities.Rpa.Web.OpenBrowser.OnExecuteAsync(ActivityExecutionContext context) in C:\Users\hugo.vilaca\source\repos\elsa-core\src\activities\Elsa.Activities.Rpa.Web\Activities\OpenBrowser.cs:line 46
   at Elsa.Services.Workflows.WorkflowRunner.TryExecuteActivityAsync(ActivityOperation activityOperation, ActivityExecutionContext activityExecutionContext, IActivity activity, CancellationToken cancellationToken) in C:\Users\hugo.vilaca\source\repos\elsa-core\src\core\Elsa.Core\Services\Workflows\WorkflowRunner.cs:line 393

Steps to Reproduce

To help us identify the issue more quickly, please follow these guidelines:

  1. Detailed Steps: Execute the attached workflow in any Elsa 2 with the RPA activity instantiated with a chrome version equal or above 115 and the following errors happens image

  2. Attachments: rpa-fail-download-driver.json

  3. Reproduction Rate:
    Every time that ChromeVersion is newer than 115

Providing a comprehensive and clear description will greatly assist in diagnosing the problem quickly and accurately. If you're unable to share some of the requested information publicly, please note that, and we can arrange for secure information transfer.

Expected Behavior

ChromeDriver is download as expected and the workflows executes successfully

Actual Behavior

Workflow fails with the above error

Environment

glime-ai[bot] commented 5 days ago

Based on the description provided, it seems that the issue is related to the Elsa.Activities.Rpa.Web package not being able to find or download the appropriate ChromeDriver version for Chrome versions equal to or above 115. This could be due to changes in the API used to fetch the ChromeDriver or changes in the versioning scheme used by the ChromeDriver project.

To resolve this issue, you may need to manually download the appropriate ChromeDriver version that matches your Chrome browser version and ensure it is available in the expected path for the Elsa.Activities.Rpa.Web activities to use. Alternatively, you can check if there is an update to the Elsa.Activities.Rpa.Web package that addresses this issue or if there is a workaround provided by the maintainers.

You should also report this issue to the maintainers of the Elsa Workflow project if it has not already been reported. They may provide a fix or a more suitable workaround.

For now, you can try the following steps:

  1. Visit the official ChromeDriver download page: https://sites.google.com/chromium.org/driver/
  2. Download the version of ChromeDriver that matches your version of Chrome.
  3. Place the downloaded ChromeDriver in a directory that is in the system's PATH or specify the path to the ChromeDriver when configuring the RPA activities in your workflow.

If you are unable to resolve the issue with these steps, please provide additional information such as the version of the Elsa.Activities.Rpa.Web package you are using and any relevant configuration details for the RPA activities in your workflow.

This comment was generated by Glime.