appium-device-farm
appium-device-farm copied to clipboard
Unable to create session for iOS test on LambdaTest
The issue pertains to an error encountered while attempting to create a session using Appium, specifically involving the createSession command. Despite the default handlers being registered, the command was instead processed by the device-farm plugin. During this process, an internal error occurred, indicated by the message: "Unknown error while creating session."
Link to Appium logs
https://gist.github.com/alokkr016/7e1462dbc3285c42a7b546cb06e34d4c
Environment
- Appium version: 2.2.2
- Node.js version (unless using Appium.app|exe): 20.12.2
- Npm or Yarn package manager: 10.5.0
- Mobile platform/version under test: iOS-16
- Real device
@alokkr016 Looks like the request to lambdatest server are failing due to timeout which is default to 60s. Can you increase the timeout to some higher value using the plugin argument --plugin-device-farm-remote-connection-timeout 120000 (in MilliSeconds)
Still getting the same error :
https://gist.github.com/alokkr016/d05a2936ceb5ce7cc525cd60629b4cd4
Even when I am able to create a session, the commands are not being sent.
Could you please tell me which new capabilities I should add or remove from the current ones?
@alokkr016 looks like your machine is unable to connect lambdatest hub. Can you check if your behind proxy
I am able to connect after increasing the remote connection timeout, but I am not able to Send Commands
What is the error ?
Logs : https://gist.github.com/alokkr016/d05a2936ceb5ce7cc525cd60629b4cd4
@alokkr016 Can you try making the request from postman
https://username:[email protected]/wd/hub/session
{
"capabilities": {
"firstMatch": [
{}
],
"alwaysMatch": {
"appium:autoAcceptAlerts": true,
"appium:idleTimeout": 300,
"appium:newCommandTimeout": 30,
"platformName": "IOS",
"appium:build": "Lambda IOS suite",
"appium:app": "lt://APP1016055611715975022871754",
"appium:platformVersion": "16",
"appium:isRealMobile": "True",
"appium:appiumVersion": "2.0",
"appium:wdaLaunchTimeout": 60000,
"appium:automationName": "XCuiTest",
"appium:deviceName": "iPhone 14 Pro Max",
"appium:platform": "ios"
},
"pendingSessionId": "71b994c7-685e-4ae1-a2a1-f276cc0a0203"
},
"desiredCapabilities": {
"appium:autoAcceptAlerts": true,
"appium:idleTimeout": 300,
"appium:newCommandTimeout": 30,
"platformName": "IOS",
"appium:build": "Lambda IOS suite",
"appium:app": "lt://APP1016055611715975022871754",
"appium:platformVersion": "16",
"appium:isRealMobile": "True",
"appium:appiumVersion": "2.0",
"appium:wdaLaunchTimeout": 60000,
"appium:automationName": "XCuiTest",
"appium:deviceName": "iPhone 14 Pro Max",
"appium:platform": "ios"
}
}
can you share the output of this request ?
@saikrishna321
Output :
{
"value": {
"capabilities": {
"autoAcceptAlerts": true,
"automationName": "XCUITest",
"browserName": "",
"bundleID": "com.ninja.dream.qa",
"bundleId": "com.ninja.dream.qa",
"databaseEnabled": false,
"derivedDataPath": "/Users/ltadmin/Documents/appium/2.0-10-8-23-mac/build/",
"deviceName": "iPhone 14 Pro Max",
"headless": false,
"javascriptEnabled": true,
"locationContextEnabled": false,
"nativeWebScreenshot": true,
"networkConnectionEnabled": false,
"newCommandTimeout": 0,
"noReset": false,
"orientation": "PORTRAIT",
"platform": "MAC",
"platformName": "ios",
"platformVersion": "16",
"takesScreenshot": true,
"udid": "00008120-000C581C0244C01E",
"uiautomator2ServerLaunchTimeout": "60000",
"usePrebuiltWDA": true,
"waitForQuiescence": false,
"wdaLaunchTimeout": 60000,
"wdaLocalPort": 11011,
"wdaStartupRetries": 3,
"webStorageEnabled": false,
"webkitResponseTimeout": 20000
},
"sessionId": "3c2b2323-2cd1-43fa-af11-8655af4b6dd4"
}
}
@alokkr016 Are you behind a corporate proxy ?
@saikrishna321 No, I am not using any proxy.
Hi @alokkr016
Did you solve this problem?
@Glaycongx haven't tried with the latest version
@alokkr016 Hello! I have the same issue with iOS; sometimes a session is created, but the commands are not run. How did you solve this issue? Please let me know
Hi @YuliiaMilian! I hope this message finds you well! Which framework are you using?
I used WDIO and Appium v.2.15.0