Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the EDGEDRIVER_VERSION environment variable #10380

Closed
2 of 13 tasks
danielhjacobs opened this issue Aug 1, 2024 · 4 comments
Closed
2 of 13 tasks

Set the EDGEDRIVER_VERSION environment variable #10380

danielhjacobs opened this issue Aug 1, 2024 · 4 comments

Comments

@danielhjacobs
Copy link

Description

This uses that environment variable:

https://github.com/webdriverio-community/node-edgedriver/blob/7b2b44946f422b86e4c937d277f412a380394a1c/src/install.ts#L24

I believe it can be set on Mac by adding to this:

echo "export EDGEWEBDRIVER=${EDGE_DRIVER_DIR}" >> ${HOME}/.bashrc

echo "export EDGEDRIVER_VERSION=${edge_driver_latest_version}" >> ${HOME}/.bashrc

I believe it can be set on Windows by adding to this:

[Environment]::SetEnvironmentVariable("EdgeWebDriver", $EdgeDriverPath, "Machine")

[Environment]::SetEnvironmentVariable("EDGEDRIVER_VERSION", $latestVersion, "Machine")

I believe it can be set on Ubuntu by adding to this:

set_etc_environment_variable "EDGEWEBDRIVER" "${EDGEDRIVER_DIR}"

set_etc_environment_variable "EDGEDRIVER_VERSION" "${edgedriver_latest_version}"

Relates to #10336, MicrosoftEdge/EdgeWebDriver#156, and webdriverio-community/node-edgedriver#365

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240721.1.0

https://github.com/ruffle-rs/ruffle/actions/runs/10068053329/job/27832705746

Is it regression?

Not really, this environment variable was never set, but when Edge matches Edgedriver that's fine

Expected behavior

The version of EdgeDriver being used should be set so wdio doesn't try to install a different version.

Actual behavior

The version isn't set so wdio tries to install a different version and if that version is missing jobs may fail.

Repro steps

  1. Run an action that runs with this image.
  2. Try to use EdgeDriver with wdio for tests
@danielhjacobs
Copy link
Author

These can also be changed to print the EDGEDRIVER_VERSION environment variable as well:

[PSCustomObject] @{
"Name" = "EDGEWEBDRIVER"
"Value" = $env:EDGEWEBDRIVER
},

@{
"Name" = "EDGEWEBDRIVER"
"Value" = $env:EDGEWEBDRIVER
},

@{
"Name" = "EDGEWEBDRIVER"
"Value" = $env:EDGEWEBDRIVER
},

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @danielhjacobs , we will be checking the issue and provide solutions ,Thanks

@danielhjacobs
Copy link
Author

This has been circumvented downstream in npm's edgedriver by webdriverio-community/node-edgedriver@68043fe which is included in https://github.com/webdriverio-community/node-edgedriver/releases/tag/5.6.1, so if you use webdriverio with edgedriver you can circumvent this issue by updating the webdriverio-related and edgedriver dependencies. However, it would be better if the environment variable were set so this wouldn't have to go through the complicated logic of:

2024-08-05T22:34:48.348Z INFO edgedriver: Detected Microsoft Edge v127.0.2651.74
2024-08-05T22:34:48.348Z INFO edgedriver: Downloading Edgedriver from https://msedgedriver.azureedge.net/127.0.2651.74/edgedriver_linux64.zip
2024-08-05T22:34:48.690Z ERROR edgedriver: Failed to download Edgedriver: Failed to download binary from https://msedgedriver.azureedge.net/127.0.2651.74/edgedriver_linux64.zip (statusCode 404), trying alternative download URL...
2024-08-05T22:34:48.690Z INFO edgedriver: Attempt to fetch latest v127 for linux from https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver?delimiter=%2F&maxresults=2500&restype=container&comp=list&_=1722752483611&timeout=60000
2024-08-05T22:34:49.371Z INFO edgedriver: Downloading alternative Edgedriver version from https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/LATEST_RELEASE_127_LINUX
2024-08-05T22:34:49.443Z INFO edgedriver: Downloading Edgedriver from https://msedgedriver.azureedge.net/127.0.2651.87/edgedriver_linux64.zip
2024-08-05T22:34:50.000Z INFO edgedriver: Finished downloading Edgedriver

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @danielhjacobs , The need to set the environment cannot be implemented at our end,
Customers can do it do it via DRIVER_VERSION=$(msedgedriver --version) in their workflows.
Thanks closing this issue .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants