Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDArunner failed to built on real device through XCode - [iProxy@00008110:8100] Connection was refused to port 8100 #676

Open
fantagaro opened this issue Mar 27, 2024 · 8 comments

Comments

@fantagaro
Copy link

I am trying to run automation tests on a real device from my company. The issue boils down to XCode won't be able to build WDArunner to the device. It works with simulator or personal iPhone. Please help. Thanks in advance!

Here's the full log:

Last login: Wed Mar 27 12:03:47 on ttys000
FENGLX17@RN7T64PHC0 builds % pkill -9 -f appium
FENGLX17@RN7T64PHC0 builds % appium
[Appium] Welcome to Appium v2.5.1 (REV f6a4f42cc346694fac94fa1643bc2809d383b6f1)
[Appium] The autodetected Appium home path: /Users/FENGLX17/.appium
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/build/index.js
[Appium] XCUITestDriver has been successfully loaded in 0.464s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] http://192.168.0.110:4723/
[Appium] http://192.168.0.86:4723/
[Appium] http://100.64.0.1:4723/
[Appium] http://169.254.201.20:4723/
[Appium] Available drivers:
[Appium] - [email protected] (automationName 'XCUITest')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] Request idempotency key: 0695e523-9008-4217-ad41-6dd7d543438c
[HTTP] --> POST /session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"iOS","appium:options":{"platformVersion":"17.4.1","deviceName":"MamaiPhone","udid":"00008110-00014CE626D3801E","automationName":"XCUITest","xcodeOrgId":"5C4TK3U75S","xcodeSigningId":"iPhone Developer","app":"/Users/FENGLX17/Documents/project/builds/llu-prod-4.11.0.14-adhoc.ipa","showXcodeLog":"true"}}}}
[AppiumDriver@28ad] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"iOS","appium:options":{"platformVersion":"17.4.1","deviceName":"MamaiPhone","udid":"00008110-00014CE626D3801E","automationName":"XCUITest","xcodeOrgId":"5C4TK3U75S","xcodeSigningId":"iPhone Developer","app":"/Users/FENGLX17/Documents/project/builds/llu-prod-4.11.0.14-adhoc.ipa","showXcodeLog":"true"}}}]
[AppiumDriver@28ad] Event 'newSessionRequested' logged at 1711568287290 (12:38:07 GMT-0700 (Pacific Daylight Time))
[BaseDriver] Found appium:options capability present; will promote items inside to caps
[Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'iOS'
[Appium] The 'xcuitest' driver was installed and matched caps.
[Appium] Will require it at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver
[Appium] Requiring driver at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/build/index.js
[AppiumDriver@28ad] Appium v2.5.1 creating new XCUITestDriver (v7.3.1) session
[AppiumDriver@28ad] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@28ad] Appium's BaseDriver version is 9.5.2
[AppiumDriver@28ad] XCUITestDriver's BaseDriver version is 9.5.2
[XCUITestDriver@53eb] Creating session with W3C capabilities: {
[XCUITestDriver@53eb] "alwaysMatch": {
[XCUITestDriver@53eb] "platformName": "iOS",
[XCUITestDriver@53eb] "appium:platformVersion": "17.4.1",
[XCUITestDriver@53eb] "appium:deviceName": "MamaiPhone",
[XCUITestDriver@53eb] "appium:udid": "00008110-00014CE626D3801E",
[XCUITestDriver@53eb] "appium:automationName": "XCUITest",
[XCUITestDriver@53eb] "appium:xcodeOrgId": "XXXXXXXXXX",
[XCUITestDriver@53eb] "appium:xcodeSigningId": "iPhone Developer",
[XCUITestDriver@53eb] "appium:app": "/Users/FENGLX17/Documents/project/builds/llu-prod-4.11.0.14-adhoc.ipa",
[XCUITestDriver@53eb] "appium:showXcodeLog": "true"
[XCUITestDriver@53eb] },
[XCUITestDriver@53eb] "firstMatch": [
[XCUITestDriver@53eb] {}
[XCUITestDriver@53eb] ]
[XCUITestDriver@53eb] }
[XCUITestDriver@53eb] Capability 'showXcodeLog' changed from string to boolean. This may cause unexpected behavior
[XCUITestDriver@53eb (dd0c653e)] Session created with session id: dd0c653e-df05-4b1f-88c7-75eefe872b30
[XCUITest] Current user: 'FENGLX17'
[XCUITestDriver@53eb (dd0c653e)] Available devices: 00008110-00014CE626D3801E
[XCUITest] Creating iDevice object with udid '00008110-00014CE626D3801E'
[XCUITestDriver@53eb (dd0c653e)] Determining device to run tests on: udid: '00008110-00014CE626D3801E', real device: true
[XCUITestDriver@53eb (dd0c653e)] Normalized platformVersion capability value '17.4.1' to '17.4'
[XCUITestDriver@53eb (dd0c653e)] Event 'xcodeDetailsRetrieved' logged at 1711568287373 (12:38:07 GMT-0700 (Pacific Daylight Time))
[BaseDriver] Using local app '/Users/FENGLX17/Documents/project/builds/llu-prod-4.11.0.14-adhoc.ipa'
[Support] Found 'unzip' at '/usr/bin/unzip'
[XCUITestDriver@53eb (dd0c653e)] Found 1 bundle in 'llu-prod-4.11.0.14-adhoc.ipa': Payload/lluapp.app
[XCUITestDriver@53eb (dd0c653e)] 'Payload/lluapp.app' is the resulting application bundle selected from '/Users/FENGLX17/Documents/project/builds/llu-prod-4.11.0.14-adhoc.ipa'
[XCUITestDriver@53eb (dd0c653e)] Event 'appConfigured' logged at 1711568288177 (12:38:08 GMT-0700 (Pacific Daylight Time))
[XCUITest] Checking whether app '/var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/2024227-46158-9cukcf.dhnt4/lluapp.app' is actually present on file system
[XCUITest] App is present
[XCUITest] Getting bundle ID from app '/var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/2024227-46158-9cukcf.dhnt4/lluapp.app': 'org.nativescript.LibreLinkUp'
[XCUITestDriver@53eb (dd0c653e)] Event 'resetStarted' logged at 1711568288177 (12:38:08 GMT-0700 (Pacific Daylight Time))
[XCUITest] Reset: running ios real device reset flow
[XCUITestDriver@53eb (dd0c653e)] Event 'resetComplete' logged at 1711568288177 (12:38:08 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@53eb (dd0c653e)] Using WDA path: '/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[XCUITestDriver@53eb (dd0c653e)] Using WDA agent: '/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[XCUITest] Crash reports root '/Users/FENGLX17/Library/Logs/CrashReporter/MobileDevice/MamaiPhone' does not exist. Got nothing to gather.
[XCUITestDriver@53eb (dd0c653e)] Event 'logCaptureStarted' logged at 1711568288304 (12:38:08 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@53eb (dd0c653e)] Setting up real device
[XCUITest] Verifying application platform
[XCUITest] CFBundleSupportedPlatforms: ["iPhoneOS"]
[XCUITestDriver@53eb (dd0c653e)] App 'org.nativescript.LibreLinkUp' is already installed
[XCUITest] Reset requested. Removing app with id 'org.nativescript.LibreLinkUp' from the device
[XCUITest] Installing '/var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/2024227-46158-9cukcf.dhnt4/lluapp.app' on device with UUID '00008110-00014CE626D3801E'...
[XCUITest] Using 'serial' app deployment strategy. You could change it by providing another value to the 'appInstallStrategy' capability
[XCUITest] Getting bundle ID from app '/var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/2024227-46158-9cukcf.dhnt4/lluapp.app': 'org.nativescript.LibreLinkUp'
[XCUITest] Successfully scanned the tree structure of '/var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/2024227-46158-9cukcf.dhnt4/lluapp.app'
[XCUITest] Got 252 folders and 387 files to push
[XCUITest] Successfully created the remote folder structure (253 items)
[XCUITest] Proceeding to serial files push
[XCUITestDriver@53eb (dd0c653e)] Parsed BUILD_DIR configuration value: '/Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub/Build/Products'
[XCUITestDriver@53eb (dd0c653e)] Got derived data root: '/Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub'
[XCUITest] Successfully pushed 252 folders and 387 files within 8401ms
[XCUITest] A new application installation is going to be performed
[XCUITest] App installation succeeded after 11332ms
[XCUITest] The app has been installed successfully.
[XCUITestDriver@53eb (dd0c653e)] Event 'appInstalled' logged at 1711568300156 (12:38:20 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@53eb (dd0c653e)] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device 00008110-00014CE626D3801E on local port 8100, device port 8100
[DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for 00008110-00014CE626D3801E:8100
[XCUITestDriver@53eb (dd0c653e)] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[WD Proxy] socket hang up
[XCUITestDriver@53eb (dd0c653e)] WDA is not listening at 'http://127.0.0.1:8100/'
[XCUITestDriver@53eb (dd0c653e)] WDA is currently not running. There is nothing to cache
[XCUITestDriver@53eb (dd0c653e)] Trying to start WebDriverAgent 1 times with 10000ms interval
[XCUITestDriver@53eb (dd0c653e)] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[XCUITestDriver@53eb (dd0c653e)] Event 'wdaStartAttempted' logged at 1711568300327 (12:38:20 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@53eb (dd0c653e)] Launching WebDriverAgent on the device
[XCUITestDriver@53eb (dd0c653e)] There is no need to perform the project cleanup. A fresh install has been detected
[WebDriverAgent] Killing running processes 'xcodebuild.*00008110-00014CE626D3801E' for the device 00008110-00014CE626D3801E...
[WebDriverAgent] 'pgrep -if xcodebuild.*00008110-00014CE626D3801E' didn't detect any matching processes. Return code: 1
[XCUITestDriver@53eb (dd0c653e)] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub -destination id=00008110-00014CE626D3801E IPHONEOS_DEPLOYMENT_TARGET=17.4 DEVELOPMENT_TEAM=5C4TK3U75S CODE_SIGN_IDENTITY=iPhone Developer GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[XCUITestDriver@53eb (dd0c653e)] Output from xcodebuild will be logged. To change this, use 'showXcodeLog' desired capability
[Xcode] Command line invocation:
[Xcode]
[XCUITestDriver@53eb (dd0c653e)] Waiting up to 60000ms for WebDriverAgent to start
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[Xcode] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing test-without-building -project /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub -destination id=00008110-00014CE626D3801E IPHONEOS_DEPLOYMENT_TARGET=17.4 DEVELOPMENT_TEAM=5C4TK3U75S "CODE_SIGN_IDENTITY=iPhone Developer" GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO
[Xcode]
[Xcode] User defaults from command line:
[Xcode] IDEDerivedDataPathOverride = /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub
[Xcode] IDEPackageSupportUseBuiltinSCM = YES
[Xcode]
[Xcode] Build settings from command line:
[Xcode] CODE_SIGN_IDENTITY = iPhone Developer
[Xcode] COMPILER_INDEX_STORE_ENABLE = NO
[Xcode] DEVELOPMENT_TEAM = 5C4TK3U75S
[Xcode] GCC_TREAT_WARNINGS_AS_ERRORS = 0
[Xcode] IPHONEOS_DEPLOYMENT_TARGET = 17.4
[Xcode]
[Xcode]
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
...
...
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] 2024-03-27 12:39:21.079 xcodebuild[46249:12014850] Writing error result bundle to /var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/ResultBundle_2024-27-03_12-39-0021.xcresult
[Xcode]
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] xcodebuild: error: Timed out waiting for all destinations matching the provided destination specifier to become available
[Xcode]
[Xcode]
[Xcode] Ineligible destinations for the "WebDriverAgentRunner" scheme:
[Xcode] { platform:iOS, arch:arm64, id:00008110-00014CE626D3801E, name:MamaiPhone, error:Device is busy (Waiting to reconnect to MamaiPhone) }
[Xcode]
[Xcode] xcodebuild exited with code '70' and signal 'null'
[XCUITestDriver@53eb (dd0c653e)] Launching WebDriverAgent on the device
[XCUITestDriver@53eb (dd0c653e)] There is no need to perform the project cleanup. A fresh install has been detected
[WebDriverAgent] Killing running processes 'xcodebuild.*00008110-00014CE626D3801E' for the device 00008110-00014CE626D3801E...
[WebDriverAgent] 'pgrep -if xcodebuild.*00008110-00014CE626D3801E' didn't detect any matching processes. Return code: 1
[XCUITestDriver@53eb (dd0c653e)] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub -destination id=00008110-00014CE626D3801E IPHONEOS_DEPLOYMENT_TARGET=17.4 DEVELOPMENT_TEAM=5C4TK3U75S CODE_SIGN_IDENTITY=iPhone Developer GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[XCUITestDriver@53eb (dd0c653e)] Output from xcodebuild will be logged. To change this, use 'showXcodeLog' desired capability
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] Command line invocation:
[Xcode]
[XCUITestDriver@53eb (dd0c653e)] Waiting up to 60000ms for WebDriverAgent to start
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[Xcode] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing test-without-building -project /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub -destination id=00008110-00014CE626D3801E IPHONEOS_DEPLOYMENT_TARGET=17.4 DEVELOPMENT_TEAM=5C4TK3U75S "CODE_SIGN_IDENTITY=iPhone Developer" GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO
[Xcode]
[Xcode] User defaults from command line:
[Xcode] IDEDerivedDataPathOverride = /Users/FENGLX17/Library/Developer/Xcode/DerivedData/WebDriverAgent-aoqvxxzfjzlraxdzxowdomuagyub
[Xcode] IDEPackageSupportUseBuiltinSCM = YES
[Xcode]
[Xcode] Build settings from command line:
[Xcode] CODE_SIGN_IDENTITY = iPhone Developer
[Xcode] COMPILER_INDEX_STORE_ENABLE = NO
[Xcode] DEVELOPMENT_TEAM = 5C4TK3U75S
[Xcode] GCC_TREAT_WARNINGS_AS_ERRORS = 0
[Xcode] IPHONEOS_DEPLOYMENT_TARGET = 17.4
[Xcode]
[Xcode]
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
...
...
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[XCUITestDriver@53eb (dd0c653e)] Error: Unable to connect to running WebDriverAgent: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
[XCUITestDriver@53eb (dd0c653e)] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:393:17
[XCUITestDriver@53eb (dd0c653e)] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[XCUITestDriver@53eb (dd0c653e)] at wrapped (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13)
[XCUITestDriver@53eb (dd0c653e)] at retry (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13)
[XCUITestDriver@53eb (dd0c653e)] at retryInterval (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10)
[XCUITestDriver@53eb (dd0c653e)] at XcodeBuild.waitForStart (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:377:7)
[XCUITestDriver@53eb (dd0c653e)] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:359:26
[XCUITestDriver@53eb (dd0c653e)] Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 60000ms timeout.Try to increase the value of 'appium:wdaLaunchTimeout' capability as a possible workaround.
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] 2024-03-27 12:40:22.977 xcodebuild[46375:12016452] Writing error result bundle to /var/folders/d_/2p8pgg3n5l3cbmwgjc4pv6p40000gp/T/ResultBundle_2024-27-03_12-40-0022.xcresult
[Xcode]
[XCUITestDriver@53eb (dd0c653e)] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb (dd0c653e)] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[iProxy@00008110:8100] Connection was refused to port 8100
[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] xcodebuild: error: Timed out waiting for all destinations matching the provided destination specifier to become available
[Xcode]
[Xcode]
[Xcode] Ineligible destinations for the "WebDriverAgentRunner" scheme:
[Xcode] { platform:iOS, arch:arm64, id:00008110-00014CE626D3801E, name:MamaiPhone, error:Device is busy (Waiting to reconnect to MamaiPhone) }
[Xcode]
[Xcode] xcodebuild exited with code '70' and signal 'null'
[XCUITestDriver@53eb (dd0c653e)] Event 'wdaStartFailed' logged at 1711568424126 (12:40:24 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@53eb (dd0c653e)] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch. Consider checking the WebDriverAgent configuration guide for real iOS devices at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md.. Make sure you follow the tutorial at https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITestDriver@53eb (dd0c653e)] Quitting and uninstalling WebDriverAgent
[XCUITestDriver@53eb (dd0c653e)] Shutting down sub-processes
[XCUITestDriver@53eb (dd0c653e)] No WDAs on the device.
[XCUITestDriver@53eb (dd0c653e)] {}
[DevCon Factory] Releasing connections for 00008110-00014CE626D3801E device on any port number
[DevCon Factory] Found cached connections to release: ["00008110-00014CE626D3801E:8100"]
[DevCon Factory] Releasing the listener for '00008110-00014CE626D3801E:8100'
[iProxy@00008110:8100] Closing the connection
[DevCon Factory] Cached connections count: 0
[XCUITestDriver@53eb (dd0c653e)] Not clearing log files. Use clearSystemFiles capability to turn on.
[iProxy@00008110:8100] The connection has been closed
[AppiumDriver@28ad] Event 'newSessionStarted' logged at 1711568424396 (12:40:24 GMT-0700 (Pacific Daylight Time))
[AppiumDriver@28ad] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch. Consider checking the WebDriverAgent configuration guide for real iOS devices at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md.. Make sure you follow the tutorial at https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[AppiumDriver@28ad] at quitAndUninstall (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:787:15)
[AppiumDriver@28ad] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:875:13
[AppiumDriver@28ad] at wrapped (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13)
[AppiumDriver@28ad] at retry (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13)
[AppiumDriver@28ad] at retryInterval (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10)
[AppiumDriver@28ad] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:814:7
[HTTP] <-- POST /session 500 137123 ms - 1906
[HTTP]
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Matched '/status' to command name 'getStatus'
...
...
[XCUITestDriver@53eb] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[XCUITestDriver@53eb] connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] Error: Unable to connect to running WebDriverAgent: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
[XCUITestDriver@53eb] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:393:17
[XCUITestDriver@53eb] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[XCUITestDriver@53eb] at wrapped (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13)
[XCUITestDriver@53eb] at retry (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13)
[XCUITestDriver@53eb] at retryInterval (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10)
[XCUITestDriver@53eb] at XcodeBuild.waitForStart (/Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:377:7)
[XCUITestDriver@53eb] at /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:359:26
[XCUITestDriver@53eb] Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 60000ms timeout.Try to increase the value of 'appium:wdaLaunchTimeout' capability as a possible workaround.

@KazuCocoa
Copy link
Member

I guess the device was still not ready to build or development.

[XCUITestDriver@53eb (dd0c653e)] socket hang up
[Xcode] xcodebuild: error: Timed out waiting for all destinations matching the provided destination specifier to become available
[Xcode]
[Xcode]
[Xcode] Ineligible destinations for the "WebDriverAgentRunner" scheme:
[Xcode] { platform:iOS, arch:arm64, id:00008110-00014CE626D3801E, name:MamaiPhone, error:Device is busy (Waiting to reconnect to MamaiPhone) }
[Xcode]
[Xcode] xcodebuild exited with code '70' and signal 'null'
[XCUITestDriver@53eb (dd0c653e)] Launching WebDriverAgent on the device

Did you confirm with Xcode that the /Users/FENGLX17/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent's project can be built? I assume when you open Xcode, the device is not ready for build

@fantagaro
Copy link
Author

@KazuCocoa the WDA proj couldn't be built on the real phone from my company connected through USBC cable, but I could build it on emulator and personal iPhone which doesn't have management profile from the company. I've turned on the Developer mode and turned on UI Automation. Anything could be missed?

@fantagaro
Copy link
Author

Also, when I run the automation code, through the desired caps, the app specified in the caps could be installed onto the company device. The issue only occurs to WDA proj

@KazuCocoa
Copy link
Member

@fantagaro
Copy link
Author

Here's the screen shot of the signing on XCode of WDA
Screenshot 2024-03-29 at 10 48 19 AM
I followed the instruction here: https://appium.github.io/appium-xcuitest-driver/latest/preparation/prov-profile-generic-manual/ and got the WebDriverAgentRunner-Runner.app built successfully. But still keep getting "Waiting to reconnect to iPhone". I've turned on Development Mode and turned on UI automation on this device. So this device has company management profile which is the only difference from my personal device.
Please help. Do I need to ask the company to unlock this iPhone for development?

@KazuCocoa
Copy link
Member

Yes, could be. You could create a new Xcode project and run the project against the device if the same error is raised. I don't have much experience about such a company managed env, but it could be the cause. (At least it might not be this project related error)

@fantagaro
Copy link
Author

I have the company IT wiped the phone, but XCode still couldn't build WDA app... After checked with other automation team at the company, sounds like certain XCode won't work with certain version of iOS. Mines are: XCode 15.3 and iOS 17.4. Has this issue something been reported before?

@KazuCocoa
Copy link
Member

Possibly it could occur especially in case the Xcode is older than newer iOS versions. We perhaps hasn't gotten the combination though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants