Skip to content

Chromedriver naming mismatch on Mac ARM64: downloads chromedriver-mac-arm64_v* but expects chromedriver_mac64_v* #2038

@outi5

Description

@outi5

Describe the bug

appium-device-farm downloads chromedrivers from the Chrome for Testing API with the naming format chromedriver-mac-arm64_vXXX.X.XXXX.XXX (hyphen + "mac-arm64"), but when running tests, it attempts to use chromedriver_mac64_vXXX.X.XXXX.XXXcan you (underscore + "mac64"), causing "chromedriver binary...doesn't exist!" errors.

This affects all Chrome versions 115+ on Mac ARM64/Silicon processors.

Link to Appium logs

Sanitized Appium Logs

Environment

  1. Appium version (or git revision) that exhibits the issue: appium 3.2.0
  2. Last Appium version that did not exhibit the issue (if applicable):
  3. Node.js version (unless using Appium.app|exe): node 24.13.1
  4. Npm or Yarn package manager: npm 11.8.0
  5. Mobile platform/version under test: Android 16
  6. Real device or emulator/simulator: Real Android device
  7. Appium CLI or Appium.app|exe: Appium CLI
  8. Device Farm version: 11.3.2
  9. OS: macOS (Apple Silicon/ARM64)
  10. Chrome version: 143.0.7499.194

Steps to Reproduce

  1. Configure appium-device-farm with skipChromeDownload: false
  2. Start Appium server (first start downloads v87-114 with old naming)
  3. Restart Appium server (second start downloads v115+ with new naming from Chrome for Testing API)
  4. Run a test that switches context to WEBVIEW (e.g., Terms & Conditions page)
  5. Observe error when device-farm attempts to launch chromedriver

Expected Behavior

device-farm should successfully find and launch the chromedriver matching the Chrome version on the device.

Actual Behavior

Test fails with error:

Response 500 POST http://0.0.0.0:4723/wd/hub/session/xxxxx/context (173ms)
 {
   value: {
     error: 'unknown error',
     message: "Trying to use a chromedriver binary at the path /Users/username/.appium/node_modules/appium-device-farm/chromedriver/chromedriver_mac64_v143.0.7499.192, but it doesn't exist!",
     stacktrace: ''
   }
 }

Actual file downloaded:
chromedriver-mac-arm64_v143.0.7499.192

File device-farm is looking for:
chromedriver_mac64_v143.0.7499.192

Root Cause

The Chrome for Testing API (used for Chrome v115+) provides chromedrivers with the naming convention chromedriver-mac-arm64 for ARM64 Macs. However, device-farm's device registration code constructs paths using the old naming
convention chromedriver_mac64.

This is a two-part issue:

  1. Different naming format: hyphen vs underscore (chromedriver-mac-arm64 vs chromedriver_mac64)
  2. Different platform identifier: "mac-arm64" vs "mac64"

Workaround

Create copies of the downloaded chromedrivers with the expected naming:

cd ~/.appium/node_modules/appium-device-farm/chromedriver/
for file in chromedriver-mac-arm64_v*; do
    new_file=$(echo "$file" | sed 's/chromedriver-mac-arm64_v/chromedriver_mac64_v/')
    cp "$file" "$new_file"
done

Related Issues

  • appium/appium-chromedriver#398 - Same underlying issue in the appium-chromedriver library that device-farm depends on. This issue has been open since May 2024 with no resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions