question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XcodeBuild of WebDriverAgent is working fine in Xcode but not Viz Appium Session

See original GitHub issue

Hi Friends,

I am facing problem with the WebDriverAgent, that is when i try to run ‘xcodebuild’ code alone it does not throw any error and launches the application. But when the same xcodebuild was executed via an appium session, it throws

No profiles for ‘com.profile.name’ were found: Xcode couldn’t find a provisioning profile matching ‘com.profile.name’

I have tried reinstalling the entire setup several times with appium 1.6.3 and appium 1.6.1 Configurations: MacOS - 10.11.6 iOs - 10.2.1 Appium (tried both 1.6.3 and 1.6.1)

Following the Appium Log

appium --address 192.168.1.117 --port 7850

[Appium] Welcome to Appium v1.6.1 (REV b8d80a6c2f2dff801bb2774d9b5cc8f864c2d15f)

[Appium] Non-default server args:

[Appium] address: ‘192.168.1.117’

[Appium] port: 7850

[Appium] Appium REST http interface listener started on 192.168.1.117:7850

[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:“/Users/indium/Documents/Sabesan/Dream11/Dream11_Staging.ipa”,“newCommandTimeout”:“600”,“platformVersion”:“10.2”,“platformName”:“iOS”,“udid”:“64759eeb71e74f4f35e69bd901c7950d376d5bcd”,“deviceName”:“iPad Pro 2”}}

[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:“/Users/indium/Documents/Sabesan/Dream11/Dream11_Staging.ipa”,“newCommandTimeout”:“600”,“platformVersion”:“10.2”,“platformName”:“iOS”,“udid”:“64759eeb71e74f4f35e69bd901c7950d376d5bcd”,“deviceName”:“iPad Pro 2”},null,null,null,null]

[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.

[Appium] Creating new XCUITestDriver session

[Appium] Capabilities:

[Appium] app: ‘/Users/indium/Documents/Sabesan/Dream11/Dream11_Staging.ipa’

[Appium] newCommandTimeout: ‘600’

[Appium] platformVersion: ‘10.2’

[Appium] platformName: ‘iOS’

[Appium] udid: ‘64759eeb71e74f4f35e69bd901c7950d376d5bcd’

[Appium] deviceName: ‘iPad Pro 2’

[debug] [XCUITest] XCUITestDriver version: 2.2.0

[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘600’) to integer (600). This may cause unexpected behavior

[BaseDriver] Session created with session id: 7aa429df-5e36-4b99-990a-6c7cbf2dbc55

[debug] [XCUITest] Xcode version set to ‘8.2.1’

[debug] [XCUITest] iOS SDK Version set to ‘10.2’

[debug] [XCUITest] Available devices: 64759eeb71e74f4f35e69bd901c7950d376d5bcd

[debug] [XCUITest] Creating iDevice object with udid 64759eeb71e74f4f35e69bd901c7950d376d5bcd

[XCUITest] Determining device to run tests on: udid: ‘64759eeb71e74f4f35e69bd901c7950d376d5bcd’, real device: true

[BaseDriver] Using local app ‘/Users/indium/Documents/Sabesan/Dream11/Dream11_Staging.ipa’

[debug] [BaseDriver] Copying local zip to tmp dir

[debug] [BaseDriver] Unzipping /tmp/2017227-38998-11g2j9t.fq7p919k9/appium-app.zip

[debug] [BaseDriver] Testing zip archive: /tmp/2017227-38998-11g2j9t.fq7p919k9/appium-app.zip

[BaseDriver] Unzipped local app to ‘/tmp/2017227-38998-11g2j9t.fq7p919k9/Payload/Dream11 Staging.app’

[debug] [XCUITest] Checking whether app ‘/tmp/2017227-38998-11g2j9t.fq7p919k9/Payload/Dream11 Staging.app’ is actually present

[debug] [XCUITest] App is present

[debug] [ios-app-utils] Getting bundle ID from app ‘/tmp/2017227-38998-11g2j9t.fq7p919k9/Payload/Dream11 Staging.app’: ‘com.dream11.dream11app.staging’

[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog

[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’

[XCUITest] Setting up real device

[debug] [XCUITest] App is already installed.

[debug] [XCUITest] Full reset not requested. No need to install.

[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’

[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’

[XCUITest] Launching WebDriverAgent on the device

[debug] [XCUITest] Carthage found: /usr/local/bin/carthage

[debug] [XCUITest] Killing hanging processes

[debug] [XCUITest] Using real device logger ‘idevicesyslog’

[debug] [XCUITest] Beginning test with command ‘xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=64759eeb71e74f4f35e69bd901c7950d376d5bcd -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’

[XCUITest] Waiting for WebDriverAgent to start on device

[debug] [XCUITest] Log file for xcodebuild test: /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/46F38587-3932-482D-AAAD-7B768E1B08D9/Session-WebDriverAgentRunner-2017-03-27_225224-NaO1KQ.log

[Xcode] 2017-03-27 22:52:26.753 xcodebuild[39030:200972] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/46F38587-3932-482D-AAAD-7B768E1B08D9/Session-WebDriverAgentRunner-2017-03-27_225224-NaO1KQ.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/46F38587-3932-482D-AAAD-7B768E1B08D9/Session-WebDriverAgentRunner-2017-03-27_225224-NaO1KQ.log}

[Xcode]

Testing failed:

No profiles for ‘com.facebook.WebDriverAgentRunners.Test’ were found: Xcode couldn’t find a provisioning profile matching ‘com.facebook.WebDriverAgentRunners.Test’.

Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’

[Xcode] ** TEST FAILED **

The following build commands failed:

Check dependencies

(1 failure)

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’

[debug] [XCUITest] xcodebuild failure warrants retry. Retrying…

[XCUITest] Shutting down sub-processes

[XCUITest] Shutting down Logger process (pid 39037)

[XCUITest] System log exited with code ‘0’

[debug] [XCUITest] Removing WDA application from device

[XCUITest] Launching WebDriverAgent on the device

[debug] [XCUITest] Carthage found: /usr/local/bin/carthage

[debug] [XCUITest] Killing hanging processes

[debug] [XCUITest] Using real device logger ‘idevicesyslog’

[debug] [XCUITest] Beginning test with command ‘xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=64759eeb71e74f4f35e69bd901c7950d376d5bcd -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’

[XCUITest] Waiting for WebDriverAgent to start on device

[debug] [XCUITest] Log file for xcodebuild test: /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/9E6F2D2C-E278-4A17-B7CC-95CF1D7A8FBB/Session-WebDriverAgentRunner-2017-03-27_225230-wIlq4X.log

[Xcode] 2017-03-27 22:52:33.652 xcodebuild[39300:201431] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/9E6F2D2C-E278-4A17-B7CC-95CF1D7A8FBB/Session-WebDriverAgentRunner-2017-03-27_225230-wIlq4X.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/9E6F2D2C-E278-4A17-B7CC-95CF1D7A8FBB/Session-WebDriverAgentRunner-2017-03-27_225230-wIlq4X.log}

[Xcode] 2017-03-27 22:52:33.653 xcodebuild[39300:201635] Connection peer refused channel request for “dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”; channel canceled

[Xcode]

Testing failed:

No profiles for ‘com.facebook.WebDriverAgentRunners.Test’ were found: Xcode couldn’t find a provisioning profile matching ‘com.facebook.WebDriverAgentRunners.Test’.

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’

** TEST FAILED **

The following build commands failed:

Check dependencies

(1 failure)

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’

[XCUITest] Error: xcodebuild failed with code 65

at SubProcess.<anonymous> (…/…/lib/webdriveragent.js:332:25)

at emitTwo (events.js:106:13)

at SubProcess.emit (events.js:191:7)

at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14)

at emitTwo (events.js:106:13)

at ChildProcess.emit (events.js:191:7)

at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) Error: xcodebuild failed with code 65

at SubProcess.<anonymous> (…/…/lib/webdriveragent.js:332:25)

at emitTwo (events.js:106:13)

at SubProcess.emit (events.js:191:7)

at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14)

at emitTwo (events.js:106:13)

at ChildProcess.emit (events.js:191:7)

at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) [XCUITest] Shutting down sub-processes

[XCUITest] Shutting down Logger process (pid 39310)

[XCUITest] System log exited with code ‘0’

[debug] [XCUITest] Running ios real device reset flow

[debug] [XCUITest] Resetting simulator

[debug] [iOSLog] Stopping iOS log capture

(node:38998) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Can’t stop process; it’s not currently running

[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65

at SubProcess.<anonymous> (…/…/lib/webdriveragent.js:332:25)

at emitTwo (events.js:106:13)

at SubProcess.emit (events.js:191:7)

at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14)

at emitTwo (events.js:106:13)

at ChildProcess.emit (events.js:191:7)

at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) [HTTP] <-- POST /wd/hub/session 500 23840 ms - 167

Also the Capabilities

 ```

capability.setCapability(MobileCapabilityType.PLATFORM_NAME, “iOS”); capability.setCapability(MobileCapabilityType.PLATFORM_VERSION, “10.2”); capability.setCapability(MobileCapabilityType.DEVICE_NAME, “iPad Pro 2”); capability.setCapability(MobileCapabilityType.UDID,“64759eeb71e74f4f35e69bd901c7950d376d5bcd”); capability.setCapability(MobileCapabilityType.APP, “/Users/indium/Documents/Sabesan/Dream11/Dream11_Staging.ipa”); capability.setCapability(“xcodeConfigFile”, “/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/xcodeConfigiOs.xcconfig”);//The .xcodeconfig file created under iOS Xcode Template type under New File capability.setCapability(“xcodeConfigFile”, “/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/xcodeConfigMacOs.xcconfig”);//The .xcodeconfig file created under macOS Xcode Template type under New File

I am facing this issue for quite a long time, so it would be great if any one help me PLS _/_

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
akyuzgcommented, Mar 29, 2017

fdsf sd sd

2017-03-29 15:46 GMT+03:00 Sabesna notifications@github.com:

I have also tried logging into my developer account and check for the profile com.facebook.WebDriverAgentRunners.Test. But, it seems it is not appearing in list of profiles that i have in my developer account. Does this has anything to do with the error. Also this profile was auto generated in Xcode.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8117#issuecomment-290078693, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKEjg4_Hk0s31pEzKMMe14qq66dYHKIks5rqlKagaJpZM4Mr4sT .

0reactions
lock[bot]commented, Apr 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XcodeBuild of WebDriverAgent is working fine in Xcode but ...
Hi Friends, I am facing problem with the WebDriverAgent, that is when i try to run 'xcodebuild' code alone it does not throw...
Read more >
Xcode is unable to correctly run W… | Apple Developer Forums
Xcode is consistently failing to launch WebDriverAgent on an ipad 3 correctly causing it to launch several times and fail. Error: Xcode encountered...
Read more >
appium-xcuitest-driver - npm
Start using appium-xcuitest-driver in your project by running `npm i ... This limitation does not affect screenshooting APIs though (e.g. the overlay is...
Read more >
Webdriver-agent app is not installed after build successful ...
mac os: Ventura 13.1 xcode : 14 appium : 1.22.3 Homebrew : 3.6.12 iphone : 11 pro(ios 16) WebDriverAgent.xcodeproj % xcodebuild -project ...
Read more >
Appium error [resolved] - Unable to launch WebDriverAgent ...
If the build successful, then you are good to go! Another way to test, run this below command – [test command]. xcodebuild -project ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found