AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Apache License 2.0
292 stars 90 forks source link

I can't use appium inspector with android device-farm #1181

Closed nskcashHH closed 2 weeks ago

nskcashHH commented 2 weeks ago

Describe the bug

The farm has an android device connected. I connect the screen image to it through the appium inspector, the xml tree element is loaded at the same time.

Screenshot 2024-06-17 at 13 43 20

The old version also had this problem. Previously, I used appium device-farm and dashboard on different ports so that I could use the inspector. At the same time, I passed "dashboard:enableLiveVideo": false and then the image was transmitted.

How can this be fixed?

Link to Appium logs

https://gist.github.com/nskcashHH/252bb93554c2309d7d8c2a50a4808a42

Environment Mac OS 14.4.1 Appium inspector 2024.6.1 DF - 8.4.7-rc.41.

outi5 commented 2 weeks ago

I think I'm having this same issue, but I'm using DF: 8.4.6 Dashboard: 2.0.3

I've tired passing dashboard:enableLiveVideo": false but get the same result.

broetchenrackete36 commented 2 weeks ago

Its working for me when the Inspector is running on the same device as adf. Using the Inspector on another device produces the same issue for me. Not sure if this has something to do with mjpegServerPort?

JonathanOrtegon-L commented 2 weeks ago

I solved it by setting up another appium server with a different port than the farm and connecting to that new port in the inspector

nskcashHH commented 2 weeks ago

@JonathanOrtegon-L I did that too, but then the device on the farm is not defined as busy, this is a temporary solution, I would like to do something about it =)

outi5 commented 2 weeks ago

With the latest release of uiautmator2 (3.5.6), and running appium-device-farm 8.4.6 with appium-dashboard 2.0.3. I was able to get this working locally on macOS, but it is still not working on Windows, nor was I able to get connected to device running on a remote ADF server (which I have been able to do in the past).

In both of the failure instances (local on Windows, and remote on macOS), I am able to connect if I launch appium without the ADF plugin.

saikrishna321 commented 2 weeks ago

@outi5 Can you remove appium-dashboard and try. In the latest version dashboard is merged with device-farm.

broetchenrackete36 commented 2 weeks ago

I removed the dashboard-plugin but it didn't help (wasn't activated anyway). I did a little bit of debugging and the Inspector tries to contact the server on the mjpegServerPort. That port is always different, so there is no way to open it (tunnel/firewall etc)...

sudharsan-selvaraj commented 2 weeks ago

@broetchenrackete36 Try with latest version 8.4.7-rc.43 by passing df:liveVideo : false in the capability.

broetchenrackete36 commented 2 weeks ago

Unfortunatly it still tries to connect to the mjpegServerPort with "device-farm@8.4.7-rc.43 [installed (npm)]" and "df:liveVideo": "false" ...

sudharsan-selvaraj commented 2 weeks ago

Got it. Let me take a look again.

outi5 commented 1 week ago

Thanks for looking into this @saikrishna321 and @sudharsan-selvaraj! Just to confirm my experience after updating to rc.43 and removing appium-dashboard is the same as @broetchenrackete36.

sudharsan-selvaraj commented 1 week ago

@broetchenrackete36 @outi5 Its now fixed in 8.4.7-rc.44 and pass df:liveVideo : false in the capability.

nskcashHH commented 1 week ago

@sudharsan-selvaraj Hi! Thank you very much! I tried version 8.4.7-rc.44 and the inspector works if you pass exactly "df:liveVideo": false.

nskcashHH commented 1 week ago

now for iOS, too, you need to df:liveVideo : false that the inspector worked