Closed erdncyz closed 1 month ago
it could indicate that the InstrumentService to launch XCTest process had an issue. https://github.com/appium/WebDriverAgent/blob/fb7932255359460b6962b14abada08ca70333195/lib/webdriveragent.js#L403
The reason could vary. Does it occur only on a specific device, OS version etc?
Hi @KazuCocoa,
ı have 3 different devices which are ; iPhone 11 Pro Max v 17.2.1 iPhone 11 Pro v 16.0.3 iPhone 11 v 17.5.1
Also machine the same so these devices are connected the same machine(Mac Mini) ı encounter all of the devices. Sometimes, all of them are okay, but sometimes one device is okay at that time, and other devices are not okay.
The issue is not device/os specific but perhaps connection-related between the host and each device then. I assume this is kind of random XCTest session failure because of the device side internal reason.
Will the device reboot reduce the frequency?
Hi @KazuCocoa
ı tried my all devices' connection and reboot my all devices but ı encounter still this error sometimes. Why is wda upload each session? If wda was installed once and used it all the time, this wouldn't be a problem. is this possible ?
Appium doesn't re-install since the caps have usePreinstalledWDA: true
. https://appium.github.io/appium-xcuitest-driver/latest/guides/run-preinstalled-wda/ is what you do. Then, Appium launches the preinstalled bundle id.
If it occurs sometimes only, the main reason could be the iOS internal, which means only Apple can improve it. We probably could guess possible reasons by checking the device log, but probably no good solution by outside Apple people. Based on my experience, iOS 17 is more unstable than iOS 16 in terms of keeping device connection.
(I guess failed to start XCTest session, or xctest session got disconnected by testmanagerd, which is iOS internals' deamon for testing, stuff etc.)
Or possibly you could use 3rd party tools to launch WDA https://appium.github.io/appium-xcuitest-driver/latest/guides/attach-to-running-wda/ and attach the WDA as more advanced method. For iOS 17+, it will not use Apple tools to start the WDA. I'm not sure how it will be stabler though.
okey thank you @KazuCocoa ı wil try it so ı opened this ticket if ı have any problem ı will open this issue again
Hi @KazuCocoa,
ı try to all steps but ı encounter this error. Also ı upgrade xcuitest latest version.
Error Message :
Failed to kill 'com.facebook.WebDriverAgentRunner.xctrunner'. Original error: Error: reply channel data timeout [ca52ec2f][XCUITestDriver@d145] Launching WebDriverAgent on the device without xcodebuild [ca52ec2f][ios-device] SignerIdentifier: Apple Development: PdoQa Digi (DK9NZXVCYQ) [ca52ec2f][ios-device] Xctest for com.facebook.WebDriverAgentRunner.xctrunner on device 00008030-001445A62E6A802E has stopped! [ca52ec2f][XCUITestDriver@d145] Event 'wdaStartFailed' logged at 1725266418747 (11:40:18 GMT+0300 (GMT+03:00)) [ca52ec2f][XCUITestDriver@d145] Error: TypeError: Cannot perform 'get' on a proxy that has been revoked at InstrumentService._callChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:159:15) at InstrumentService.makeChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:116:5) at InstrumentService.callChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:134:25) at Xctest._launchAppRunner (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:100:9) at Xctest.start (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:261:25) at WebDriverAgent.launchWithPreinstalledWDA (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/webdriveragent.js:403:9) at WebDriverAgent.launch (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/webdriveragent.js:463:14) at /Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:834:34 at wrapped (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13) at retry (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13) at retryInterval (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10) at /Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:824:7 [ca52ec2f][XCUITestDriver@d145] The executable name for the bundle id 'com.facebook.WebDriverAgentRunner.xctrunner' was 'WebDriverAgentRunner-Runner' [HTTP] --> GET /device-farm/api/device {} [device-farm-main] Received non-webdriver request with url /device-farm/api/device. So, not proxying it to downstream. [HTTP] <-- GET /device-farm/api/device 304 1 ms - - [HTTP] --> GET /device-farm/api/queue/length {} [device-farm-main] Received non-webdriver request with url /device-farm/api/queue/length. So, not proxying it to downstream. [HTTP] <-- GET /device-farm/api/queue/length 304 0 ms - - [device-farm-main] Found 0 device candidates to be released [device-farm-main] Cleaning pending sessions... [device-farm-main] Session queue ID:24225c2d-fbc4-4414-ac2d-5766155aeaa9 has been pending for 18248 ms [device-farm-main] No pending sessions to clean [ca52ec2f][XCUITestDriver@d145] Failed to kill 'com.facebook.WebDriverAgentRunner.xctrunner'. Original error: Error: reply channel data timeout [ca52ec2f][XCUITestDriver@d145] {} [ca52ec2f][DevCon Factory] Releasing connections for 00008030-001445A62E6A802E device on any port number [ca52ec2f][DevCon Factory] Found cached connections to release: ["00008030-001445A62E6A802E:50121"] [ca52ec2f][DevCon Factory] Releasing the listener for '00008030-001445A62E6A802E:50121' [ca52ec2f][iProxy@00008030:50121] Closing the connection [ca52ec2f][DevCon Factory] Cached connections count: 0
Hi team,
With the last update, I get the error I shared below. Can you help?
Appium version: 2.11.3 Appium driver list :
My gist: https://gist.github.com/erdncyz/5f8d9669ecd3b1912da8dccac76929b9
Error message :
[3c4ff8e1][XCUITestDriver@4385] Failed to kill 'com.facebook.WebDriverAgentRunner.xctrunner'. Original error: Error: reply channel data timeout [3c4ff8e1][XCUITestDriver@4385] Launching WebDriverAgent on the device without xcodebuild [3c4ff8e1][ios-device] SignerIdentifier: Apple Development: PdoQa Digi (DK9NZXVCYQ) [device-farm-main] Found 0 device candidates to be released [device-farm-main] Cleaning pending sessions... [device-farm-main] Session queue ID:7e7e1051-4ee9-45f6-a980-b0077dd5e865 has been pending for 13155 ms [device-farm-main] No pending sessions to clean [3c4ff8e1][ios-device] removing /tmp/WebDriverAgentRunner-983CE96D-CC31-4F02-A12B-2493EA8DB97D.xctestconfiguration [3c4ff8e1][ios-device] Xctest for com.facebook.WebDriverAgentRunner.xctrunner on device 00008030-001445A62E6A802E has stopped! [3c4ff8e1][XCUITestDriver@4385] Event 'wdaStartFailed' logged at 1724843425224 (14:10:25 GMT+0300 (GMT+03:00)) [3c4ff8e1][XCUITestDriver@4385] Error: TypeError: Cannot perform 'get' on a proxy that has been revoked at InstrumentService._callChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:159:15) at InstrumentService.makeChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:116:5) at InstrumentService.callChannel (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/instrument/index.js:134:25) at Xctest._launchAppRunner (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:100:9) at Xctest.start (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/xctest.js:261:25) at WebDriverAgent.launchWithPreinstalledWDA (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/webdriveragent.js:403:9) at WebDriverAgent.launch (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/webdriveragent.js:463:14) at /Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:834:34 at wrapped (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13) at retry (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13) at retryInterval (/Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10) at /Users/techqaautomation2/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:824:7 [3c4ff8e1][XCUITestDriver@4385] The executable name for the bundle id 'com.facebook.WebDriverAgentRunner.xctrunner' was 'WebDr