Can not Install the WebDriverAgent

I can not Install the WebDriverAgent.
This is log, please help me with this isssue:

Building WebDriverAgentRunner…

Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing -project /Users/xxxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination platform=iOS,id=00008110-000A615E14F0A01E

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (2 targets)
Target ‘WebDriverAgentRunner’ in project ‘WebDriverAgent’
➜ Implicit dependency on target ‘WebDriverAgentLib’ in project ‘WebDriverAgent’ via file ‘WebDriverAgentLib.framework’ in build phase ‘Link Binary’
Target ‘WebDriverAgentLib’ in project ‘WebDriverAgent’ (no dependencies)

GatherProvisioningInputs

CreateBuildDescription
Build description signature: 643cab735e5dc65dadbef61b1a8d49e3
Build description path: /Users/xxxx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dlnzplmlddmxkwdewsagvedkhrgi/Build/Intermediates.noindex/XCBuildData/643cab735e5dc65dadbef61b1a8d49e3.xcbuilddata

/Users/xxxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj: error: Provisioning profile “xxx_uat_development” has app ID “com.xxxxx.xxxx-uat”, which does not match the bundle ID “com.facebook.WebDriverAgentRunner.xctrunner”. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)
/Users/xxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj: error: Provisioning profile “xxx-uat_development” doesn’t match the entitlements file’s value for the application-identifier entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)
2025-07-17 12:05:00.898 xcodebuild[71939:965078] Writing error result bundle to /var/folders/bn/kfjf_8q94l524d446g61k_sh0000gn/T/ResultBundle_2025-17-07_12-05-0000.xcresult
xcodebuild: error: Failed writing xctestrun file: The folder “WebDriverAgentRunner_iphoneos17.2-arm64.xctestrun” doesn’t exist..

Failed to run the installation step: “Building WebDriverAgentRunner…”.
Failed to run the installation command.

1 Like

provisioning profile for WebDriverAgent (WDA) is misconfigured.

Step-by-Step Solution:

  1. Open WebDriverAgent Project in Xcode

bash

open /Users/xxxx/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj
  1. Fix Bundle Identifier for WebDriverAgentRunner:
  • Select WebDriverAgentRunner target
  • Go to “Signing & Capabilities” tab
  • Change Bundle Identifier to match your provisioning profile (com.xxxxx.xxxx-uat)
  • Enable “Automatically manage signing”
  • Select your development team
  1. Fix Bundle Identifier for WebDriverAgentLib:
  • Select WebDriverAgentLib target
  • Repeat same steps as above (use same bundle ID)
  1. Clean Derived Data:

bash

rm -rf ~/Library/Developer/Xcode/DerivedData/*
  1. Update Provisioning Profiles:
  • Open Xcode → Preferences → Accounts
  • Select your Apple ID → Download Manual Profiles
  • Restart Xcode
  1. Verify Configuration:
  • Ensure both targets have:
    • Same bundle ID as your provisioning profile
    • Automatic signing enabled
    • Same team selected for both targets

Alternative Solution (If You Can’t Change Bundle ID):

  1. Create a new provisioning profile for WDA’s default bundle ID:
  • Visit Apple Developer Portal
  • Create new App ID: com.facebook.WebDriverAgentRunner.xctrunner
  • Generate new Development Provisioning Profile for this App ID
  • Download and install profile
  1. Use in Xcode:
  • For WebDriverAgentRunner target
  • Disable “Automatically manage signing”
  • Select the new provisioning profile

Final Verification:

Try building manually in Xcode:

  1. Select WebDriverAgentRunner scheme
  2. Choose your connected device
  3. Press ⌘ + B to build
  4. If successful, try running Appium again

Common Fixes:

Error Solution
Bundle ID mismatch Match bundle IDs in Xcode to provisioning profile
Entitlements mismatch Enable automatic signing
Outdated profiles Download fresh profiles in Xcode
Certificate issues Ensure valid dev certificate in Keychain

Note: You might need to revoke existing certificates and regenerate them if issues persist:

  1. Xcode → Preferences → Accounts → Manage Certificates
  2. Click “Create” to regenerate certificates

After these steps, WebDriverAgent should install correctly. The key is ensuring the bundle ID in Xcode exactly matches the App ID in your provisioning profil

1 Like

Hi @tranhuya68,

Welcome to our community. Thank you for sharing your issue.

Which KS version and Appium version are you using?

1 Like

Thank you @Elly_Tran ,

  • Appium version: 2.19
  • KS version: 10.2.4

Hi @tranhuya68,

Those versions seem to be compatible. Based on your error log, you got 2 errors:

  1. Provisioning profile “xxx_uat_development” has app ID “com.xxxxx.xxxx-uat”, which does not match the bundle ID “com.facebook.WebDriverAgentRunner.xctrunner”

You’re trying to build WebDriverAgentRunner, which has the bundle ID:
com.facebook.WebDriverAgentRunner.xctrunner. But your provisioning profile is tied to a different app: com.xxxxx.xxxx-uat

  1. doesn't match the entitlements file’s value for the application-identifier entitlement

This means the provisioning profile and entitlements aren’t aligned.

The workaround I suggest is to create a Proper Provisioning Profile for WebDriverAgent. Read more here:

and similar discussion:

Hope this can help

Hi @tranhuya68,

Have you got your issue solved? If yes, feel free to share the workaround, thank you