Appium + Error installing WebDriverAgentRunner(Underlying Error: Timed out while loading Accessibility.)) using CI pipeline

  • Appium version (or git revision) that exhibits the issue: 1.20.1 and lower
  • Desktop OS/version -Mac Mini (macOS Big Sur)
  • Node.js version (unless using|exe): v14.0
  • Npm or Yarn package manager: npm - 7.20.3
  • Mobile platform/version under test: 12.6 and lower versions [11.6]
  • Real device or emulator/simulator: 14.5 and lower versions [13.7]
  • Appium CLI

I am facing the below error while running appium test scripts on simulators using github actions on self hosted runner. The tests runs fine if i run the maven command on the actual machine instead of running the pipeline.

[Xcode] Testing failed:
[Xcode] WebDriverAgentRunner:
[Xcode] (37584) encountered an error (The test runner failed to initialize for UI testing. (Underlying error: Timed out while loading Accessibility.))
[Xcode] Testing started on 'iPhone 11'