actions / runner-images

GitHub Actions runner images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install-Edge.ps1 fails when WebDriver missing for latest Edge version

dd-eg opened this issue · comments

commented

Description

I saw Install-Edge.ps1 fail when running last week (14-Jul-2022) because the URL generated for the latest version of WebDriver was invalid -- for whatever reason, this version did not include an x64 download.

Platforms affected

  • Azure DevOps
  • GitHub Actions

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

I do not have a public example and am using a custom image. Here are the log messages from running the script though:

2022-07-14T05:38:28.7747217Z ==> azure-arm: Provisioning with powershell script: D:\a\r1\a\_escher-group.ado-scale-sets\ADO-Scale-Sets\images\win/scripts/Installers/Install-Edge.ps1
2022-07-14T05:38:34.7268091Z     azure-arm: Running [#1]: choco install microsoft-edge -y
2022-07-14T05:38:34.7274408Z     azure-arm: Chocolatey v1.1.0
2022-07-14T05:38:34.7280983Z     azure-arm: Installing the following packages:
2022-07-14T05:38:34.7290318Z     azure-arm: microsoft-edge
2022-07-14T05:38:34.7327564Z     azure-arm: By installing, you accept licenses for the packages.
2022-07-14T05:38:35.4140016Z     azure-arm:
2022-07-14T05:38:35.4146299Z     azure-arm: microsoft-edge v103.0.1264.49 [Approved]
2022-07-14T05:38:35.4157124Z     azure-arm: microsoft-edge package files install completed. Performing other installation steps.
2022-07-14T05:38:36.4817373Z     azure-arm: Downloading microsoft-edge 64 bit
2022-07-14T05:38:36.4826758Z     azure-arm:   from 'https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/2e65d28e-ed30-4d82-bd51-4871d9307087/MicrosoftEdgeEnterpriseX64.msi'
2022-07-14T05:38:38.7452652Z     azure-arm:
2022-07-14T05:38:38.7458870Z     azure-arm: Download of MicrosoftEdgeEnterpriseX64.msi (124.38 MB) completed.
2022-07-14T05:38:42.6886367Z     azure-arm: Hashes match.
2022-07-14T05:38:42.6894905Z     azure-arm: Installing microsoft-edge...
2022-07-14T05:39:31.8032323Z     azure-arm: microsoft-edge has been installed.
2022-07-14T05:39:31.8064159Z     azure-arm:   microsoft-edge may be able to be automatically uninstalled.
2022-07-14T05:39:31.8070982Z     azure-arm:  The install of microsoft-edge was successful.
2022-07-14T05:39:31.8073313Z     azure-arm:   Software installed as 'MSI', install location is likely default.
2022-07-14T05:39:31.8079038Z     azure-arm:
2022-07-14T05:39:31.8080486Z     azure-arm: Chocolatey installed 1/1 packages.
2022-07-14T05:39:31.8084320Z     azure-arm:  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2022-07-14T05:39:33.8365505Z     azure-arm: Package installed: microsoft-edge|103.0.1264.49
2022-07-14T05:39:33.8373019Z     azure-arm: Install Edge WebDriver...
2022-07-14T05:39:33.8385897Z     azure-arm:
2022-07-14T05:39:33.8389351Z     azure-arm:
2022-07-14T05:39:33.8393838Z     azure-arm:     Directory: C:\SeleniumWebDrivers
2022-07-14T05:39:33.8402862Z     azure-arm:
2022-07-14T05:39:33.8413597Z     azure-arm:
2022-07-14T05:39:33.8420652Z     azure-arm: Mode                LastWriteTime         Length Name
2022-07-14T05:39:33.8427762Z     azure-arm: ----                -------------         ------ ----
2022-07-14T05:39:33.8435991Z     azure-arm: d-----        7/14/2022   5:39 AM                EdgeDriver
2022-07-14T05:39:33.8443975Z     azure-arm: Get the Microsoft Edge WebDriver version...
2022-07-14T05:39:33.8460414Z     azure-arm: Downloading package from: https://msedgedriver.azureedge.net/LATEST_RELEASE_103 to path C:\SeleniumWebDrivers\EdgeDriver\versioninfo.txt .
2022-07-14T05:39:33.8466066Z     azure-arm: Package downloaded successfully in 0.13 seconds
2022-07-14T05:39:33.8472388Z     azure-arm: Download Microsoft Edge WebDriver...
2022-07-14T05:39:33.8485706Z     azure-arm: Downloading package from: https://msedgedriver.azureedge.net/103.0.1264.51/edgedriver_win64.zip to path C:\Users\packer\AppData\Local\Temp\edgedriver_win64.zip .
2022-07-14T05:39:33.8489898Z     azure-arm: There is an error encounterd after 0.39 seconds during package downloading:
2022-07-14T05:39:33.8494464Z     azure-arm:  Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
2022-07-14T05:39:33.8500548Z     azure-arm: Waiting 30 seconds before retrying. Retries left: 19

Is it regression?

No

Expected behavior

Install-Edge.ps1 should not fail if there is not a WebDriver release for the latest Edge version -- it would probably be better to install the latest version of Edge where a compatible WebDriver release is available. As Install-Edge.ps1 is currently written, the latest version of Edge is installed first, and then the WebDriver release is sought out.

Actual behavior

For reasons unknown to me, MS Edge Driver 103.0.1264.51 (https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=103.0.1264.51/) does not include an x64 download, and thus the URL https://msedgedriver.azureedge.net/103.0.1264.51/edgedriver_win64.zip is invalid.

Compare this to the release that has come out since then: https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=103.0.1264.62/

Repro steps

This would only be reproducible when the latest Edge WebDriver is missing the expected x64 download (i.e. with the now-current release, the script shouldn't fail).

We parse edge webdriver version from the https://msedgedriver.azureedge.net/LATEST_RELEASE_103_WINDOW file. At the time of writing the latest available version is 103.0.1264.62. We changed the link for downloading edge driver in scope of the #5106 PR "https://msedgedriver.azureedge.net/LATEST_RELEASE_$($EdgeVersion.Major)" -> "https://msedgedriver.azureedge.net/LATEST_RELEASE_$($EdgeVersion.Major)_WINDOWS" 5 months ago. I see your branch is quite stale, please pull the latest changes from the main branch and rerun your build.

commented

Ah-ha! I looked over the latest Install-Edge and missed that _WINDOWS suffix change :) Thank you for pointing that out, much appreciated!