AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
324 stars 101 forks source link

After installing the Appium server (dashboard, device farm installation, and Android virtual device installation) on the in-house cloud, when accessing the inspector from another PC, the virtual device screen is not displayed. #933

Open jun-x-nova opened 9 months ago

jun-x-nova commented 9 months ago

Describe the bug

A clear and concise description of what the bug is.

After installing the Appium server (dashboard, device farm installation, and Android virtual device installation) on the in-house cloud, when accessing the inspector from another PC, the virtual device screen is not displayed. image

locally, but a problem occurs when accessing remotely. image

Link to Appium logs image

Environment

Operating system: windows 2019 server (cloud instance) Appium server version (output of appium --version): 2.2.3 Appium driver(s) and their version(s): uiautomator2@2.34.2 Appium plugin(s) and their version(s): device-farm@8.4.3, appium-dashboard@v2.0.2 Node.js version (output of node --version): node v20.10.0 npm version (output of npm --version): npm 10.2.3 Last component(s) version which did not exhibit the problem: Platform and version under test: Real device or emulator/simulator: emulator/simulator

luprochazka-cen63872 commented 9 months ago

Yes, I also see the same behavior in Inspector and in dashboard. Could you take a look?

sudharsan-selvaraj commented 9 months ago

Can you share the session capabilities that is returned from appium server after session creation?

luprochazka-cen63872 commented 9 months ago

[AppiumDriver@26d9] Appium v2.2.2 creating new XCUITestDriver (v5.12.0) session [AppiumDriver@26d9] Checking BaseDriver versions for Appium and XCUITestDriver [AppiumDriver@26d9] Appium's BaseDriver version is 9.4.2 [AppiumDriver@26d9] XCUITestDriver's BaseDriver version is 9.4.2 [XCUITestDriver@ac06] Creating session with W3C capabilities: { [XCUITestDriver@ac06] "alwaysMatch": { [XCUITestDriver@ac06] "platformName": "IOS", [XCUITestDriver@ac06] "appium:automationName": "XCUITest", [XCUITestDriver@ac06] "appium:orientation": "PORTRAIT", [XCUITestDriver@ac06] "appium:bundleId": "XXX, [XCUITestDriver@ac06] "appium:noReset": "false", [XCUITestDriver@ac06] "appium:fullReset": "false", [XCUITestDriver@ac06] "appium:includeSafariInWebviews": true, [XCUITestDriver@ac06] "appium:newCommandTimeout": 3600, [XCUITestDriver@ac06] "appium:connectHardwareKeyboard": true, [XCUITestDriver@ac06] "appium:clearDeviceLogsOnStart": true, [XCUITestDriver@ac06] "appium:nativeWebScreenshot": true, [XCUITestDriver@ac06] "appium:udid": "XXX", [XCUITestDriver@ac06] "appium:deviceName": "iPad", [XCUITestDriver@ac06] "appium:platformVersion": "17.1.2", [XCUITestDriver@ac06] "appium:wdaLocalPort": 62431, [XCUITestDriver@ac06] "appium:mjpegServerPort": 62437, [XCUITestDriver@ac06] "appium:derivedDataPath": "/Users/coet_admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-XXX" [XCUITestDriver@ac06] }, [XCUITestDriver@ac06] "firstMatch": [ [XCUITestDriver@ac06] {} [XCUITestDriver@ac06] ] [XCUITestDriver@ac06] }

sudharsan-selvaraj commented 9 months ago

I guess the issue is with the appium:mjpegServerPort capabiltity. If the mobile is connected to the same network where appium server is running, then mjperServerPort can be accessed directly. if not the stream cannot be processed from the hub.

luprochazka-cen63872 commented 9 months ago

Thank you. What do you suggest to fix it?

sudharsan-selvaraj commented 8 months ago

I have released a new version of appium-dashboard v2.0.3 plugin where you can pass the flag to disable live video(mjpeg-streamig). Please update the dashboard plugin by running the below command

appium plugin update appium-dashboard

and then in the capabilities pass {"dashboard:enableLiveVideo": false} to make it work with inspector. Do give it a try and let me know if there are any other issues.

luprochazka-cen63872 commented 8 months ago

I tried the newest version with this config file: { "server": { "port": 4723, "base-path": "/wd/hub/", "default-capabilities": {"appium:showXcodeLog": true}, "use-plugins": ["appium-dashboard", "device-farm"], "plugin": { "device-farm": { "platform": "both" }, "appium-dashboard": { "enableLiveVideo": "false" } } } } But it didn`t work. What I am doing wrong?

luprochazka-cen63872 commented 5 months ago

@sudharsan-selvaraj please, can you help me?

saikrishna321 commented 5 months ago

@luprochazka-cen63872 In the next release we will fix this.