Unable to create session on remote device (while it works on local device) #740
Replies: 10 comments 18 replies
-
@ShubhangiShingade Can you please provide the remote appium server logs. |
Beta Was this translation helpful? Give feedback.
-
@saikrishna321
Please find the logs attached. |
Beta Was this translation helpful? Give feedback.
-
@ShubhangiShingade |
Beta Was this translation helpful? Give feedback.
-
Node also does not connect hub
|
Beta Was this translation helpful? Give feedback.
-
Thank you for looking into it. Can you recommend how nodes and hub should be configured ? Also FYI, the hub registered the device connected to node and tagged it as busy at the start of the test execution. |
Beta Was this translation helpful? Give feedback.
-
Hello @saikrishna321 How does device-farm form the host URL? [device-farm] Updating remote android devices http://10.120.75.2:4723/device-farm/api/register Can this cause the failure? If so, is there a way to fix such configuration ? Shubhangi |
Beta Was this translation helpful? Give feedback.
-
@saikrishna321 None of the config files (hub as well as node) mention the IP (192.XX.XX.XX)
|
Beta Was this translation helpful? Give feedback.
-
102.x.x.x is the machine IP the device is connected. But we don't use that IP to send request. We only use the IP address from the hub config. Can you share the recent logs ? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@saikrishna321 I see the device getting tagged 'Busy' for few seconds, before the create session call fails |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a hub and node setup with each running a android simulator.
Both node and hub can access the dashboard, device farm.
However the test fails to create session on remote simulator while it succeeds on local simulator.
[debug] [AppiumDriver@fb34] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:app":"/Users/shubhangi/Downloads/app-google-mobile-release_4.0.8.0.167159.apk","appium:deviceName":"emulator-5554","appium:deviceOrientation":"portrait","appium:platformVersion":"14","appium:automationName":"UiAutomator2","appium:newCommandTimeout":3000,"appium:appWaitActivity":"com.ixolit.ipvanish*","appium:autoGrantPermissions":"true"}}]
[AppiumDriver@fb34] Plugins which can handle cmd 'createSession': device-farm,appium-dashboard
[AppiumDriver@fb34] Plugin appium-dashboard is now handling cmd 'createSession'
[AppiumDriver@fb34] Plugin device-farm is now handling cmd 'createSession'
{
platformName: 'Android',
'appium:app': '/Users/shubhangi/Downloads/app-google-mobile-release_4.0.8.0.167159.apk',
'appium:deviceName': 'emulator-5554',
'appium:deviceOrientation': 'portrait',
'appium:platformVersion': '14',
'appium:automationName': 'UiAutomator2',
'appium:newCommandTimeout': 3000,
'appium:appWaitActivity': 'com.ixolit.ipvanish*',
'appium:autoGrantPermissions': 'true',
'appium:clearDeviceLogsOnStart': true,
'appium:nativeWebScreenshot': true,
'appium:mjpegServerPort': 56296
}
[device-farm] {"platform":"android","platformVersion":"14","name":"","busy":false,"userBlocked":false}
[device-farm] Waiting for free device
[device-farm] 📱 Device found: {"adbPort":5037,"systemPort":50963,"sdk":"14","realDevice":false,"name":"sdk_gphone64_x86_64\n name: \nnufacturer_name: 0,","busy":false,"state":"offline","udid":"emulator-5554","platform":"android","deviceType":"emulator","host":"http://192.168.1.120:4723","totalUtilizationTimeMilliSec":0,"sessionStartTime":0,"offline":false,"userBlocked":false,"meta":{"revision":2,"created":1688982088944,"version":0,"updated":1688982302731},"$loki":1,"dashboard_link":"http://10.120.75.2:31337/dashboard?device_udid=emulator-5554&start_time=2023-07-10T09:39:12.376Z","total_session_count":0,"newCommandTimeout":3000}
[device-farm] 📱 Blocking device emulator-5554 for new session
[device-farm] Remote Host URL - http://192.168.1.120:4723/wd/hub/session
[device-farm] Creating cloud session
[HTTP] --> GET /device-farm/api/devices
[HTTP] {}
[HTTP] --> GET /dashboard/api/sessions?start_time=2023-07-10T09:39:12.376Z
[HTTP] {}
[HTTP] <-- GET /dashboard/api/sessions?start_time=2023-07-10T09:39:12.376Z 200 3 ms - 47
[HTTP]
[HTTP] <-- GET /device-farm/api/devices 200 50 ms - 1160
[HTTP]
[HTTP] --> GET /device-farm/api/queue
[HTTP] {}
[HTTP] <-- GET /device-farm/api/queue 200 1 ms - 1
...
....
...
[device-farm] 📱 Device UDID emulator-5554 unblocked. Reason: Remote Session failed to create
[AppiumDriver@fb34] Command 'createSession' was not handled by the following behaviours or plugins, even though they were registered to handle it: ["default"]. The command was handled by these: ["device-farm","appium-dashboard"].
[debug] [AppiumDriver@fb34] Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'data')
[debug] [AppiumDriver@fb34] at /Users/shubhangi/.appium/node_modules/appium-device-farm/lib/plugin.js:174:59
[debug] [AppiumDriver@fb34] at Generator.next ()
[debug] [AppiumDriver@fb34] at fulfilled (/Users/shubhangi/.appium/node_modules/appium-device-farm/lib/plugin.js:5:58)
[debug] [AppiumDriver@fb34] at runMicrotasks ()
[debug] [AppiumDriver@fb34] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[HTTP] <-- POST /wd/hub/session 500 60008 ms - 715
Has anyone encountered this before, if so how did you fix it ?
Thanks,
Shubhangi
Beta Was this translation helpful? Give feedback.
All reactions