Chromedriver auto download switches around key and value in the mapping file
See original GitHub issueThe problem
I am using the appiumDriverLocalService with the auto chromedriver autodownload argument
AppiumDriverLocalService service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingAnyFreePort().withArgument(() -> "--allow-insecure","chromedriver_autodownload"));
With the capability “chromedriverChromeMappingFile” defined, this should fill up the mapping file with the required versions and automatically download any required versions to execute the tests.
The issue: it fills up the mapping file but switches around keys and values so when the chromedriver goes to look for the correct driver file to use it cannot find a suitable version.
Manually switching key and value makes the test execute so i’m sure this is the issue.
Environment
- Appium version (or git revision) that exhibits the issue: v1.16.0
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: Windows
- Node.js version (unless using Appium.app|exe): v8.11.4
- Npm or Yarn package manager: npm
- Mobile platform/version under test: Android (hybrid app)
- Real device or emulator/simulator: real device
- Appium CLI or Appium.app|exe: not sure, using AppiumDriverLocalService included in Appium dependency 7.3.0 on Maven Central
used desiredCapabilities:
{"desiredCapabilities":{"appActivity":"","appPackage":"","chromedriverChromeMappingFile":"C:\\projects\\doccle-qa\\testautomation\\src\\test\\resources\\Doccle\\utilities\\chromedriver\\chromedriverChromeMappingFile","newCommandTimeout":300,"platformName":"Android","deviceName":"*","platform":"ANDROID"},"capabilities":{"firstMatch":[{"appium:appActivity":"","appium:appPackage":"","appium:chromedriverChromeMappingFile":"C:\\projects\\censored\\testautomation\\src\\test\\resources\\censored\\utilities\\chromedriver\\chromedriverChromeMappingFile","appium:deviceName":"*","appium:newCommandTimeout":300,"platform":"ANDROID","platformName":"android"}]}}
chromedriverChromeMappingFile: { “79.0.3945.16”: “79”, “79.0.3945.36”: “79” }
should be:
{ “79”: “79.0.3945.16”, “79”: “79.0.3945.36” }
Link to Appium logs
https://gist.github.com/aberx1/fe313617dbdf0a9254fe51bb01e0614c
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
The patch has been published to appium@beta
Also regarding the format of the mapping file: its keys should be valid chromedriver version strings. Exact match is applied here. Values are the minimum chrome browser version numbers supported by corresponding chromedrivers. These values can also consist of single numbers, because we only consider the major browser version for matching. Invalid/non parseable values are skipped in the matching procedure.