Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to stream IOS device connected to Ubuntu machine #1350

Open
Harish879 opened this issue Aug 28, 2024 · 13 comments
Open

Unable to stream IOS device connected to Ubuntu machine #1350

Harish879 opened this issue Aug 28, 2024 · 13 comments

Comments

@Harish879
Copy link

Harish879 commented Aug 28, 2024

  1. Connected two android devices and one ios device to the ubuntu machine.
  2. Resigned IPA file and uploaded it to device farm
  3. Set-up proxy by setting environment variable http_proxy=http://'devicefarmipaddress':'port'
  4. Set-up nginx as reverse proxy and set proxy_pass to http://'devicefarmipaddress':'port' and accessing device farm via domain.
  5. Able to stream android devices by accessing device farm using domain but unable to stream IOS devices. Observed the same behaviour when tried to stream devices using IP as well.
  6. When observed the logs by setting proxy it's throwing an error no route found for initiating connection. Please check the below screenshot for the same:
image 7. Without setting proxy able to stream both android and IOS devices by accessing devicefarm using IP not via domain. Please check the below screenshot which initiates connection and waits for WDA to be up and running without using proxy. image
@saikrishna321
Copy link
Member

@Harish879 The issue you are seeing is not able to access when domainname is set? or when behind proxy ?

@Harish879
Copy link
Author

When trying to stream IOS device using domain..

@saikrishna321
Copy link
Member

@Harish879 Can you set bindHostOrIp in your server config with the domain and check pls

@Harish879
Copy link
Author

Can you plz send me the exact parameter that should be used in server config. I tried setting domain name to bindHost, IP parameter but it's throwing an error in both.

@sudharsan-selvaraj
Copy link
Member

@Harish879 This issue sounds intriguing, and we need additional information to assist you further.

  1. Are both the hub and node on the same network, and were they able to communicate with each other using their IP addresses?
  2. Where is the nginx proxy server hosted? Is it running on the same machine as the hub?
  3. On which machine are you setting the http_proxy, and why is it directed towards the device farm IP?
  4. From which machine are you attempting to access the device farm using the domain name? Are you encountering any console errors in the browser when trying to manually control an iOS device? If possible, could you provide a screenshot of the network tab showing the failing API calls?

@Harish879
Copy link
Author

  1. I didn't set-up the device farm in hub and node mode. I am running in standalone mode in ubuntu machine to which two android devices were connected and one IOS device is connected.
  2. Nginx proxy server is hosted in separate VM present in the same network.
  3. Iam setting the http_proxy environment variable in ubuntu machine where device farm set-up is done.
  4. Iam trying to access device farm via browser from machine present in the same network using domain name. When tried to stream IOS device, API request to start appium session starts but it's not receiving any response and it's showing as pending in network logs. Please find the screenshot for the same.
image When tried to stream Android device, API request to start appium session receives response and able to stream the device. Please find the screenshot for the same. image

@sudharsan-selvaraj
Copy link
Member

sudharsan-selvaraj commented Aug 29, 2024

@Harish879 Could you provide the URL for the appiumSession API call initiated from the browser when you start streaming for an iOS device, along with the Appium server logs captured at the same time as the API call?

@Harish879
Copy link
Author

Harish879 commented Aug 29, 2024

@sudharsan-selvaraj The API call initiated to endpoint /device-farm/api/dashboard/appiumSession. Please find the screenshot for the same.
image
Please find the below attachment for Appium logs:
appium.log

Please find the below screenshot of appium logs with proxy where the issue occurs :
image
image

@Harish879
Copy link
Author

@sudharsan-selvaraj, Is there any work around for the issue..

@sudharsan-selvaraj
Copy link
Member

@Harish879 Everything from your setup looks good except the http_proxy part. Why do we need to set the http_proxy to the same IP address as the device farm machine? I suspect this might be causing the problem.

@Harish879
Copy link
Author

@sudharsan-selvaraj, Without setting http_proxy we cannot stream devices using domain right if Iam not wrong?

@sudharsan-selvaraj
Copy link
Member

@Harish879 Streaming should work fine if all machines are connected to the same network. Have you faced any issues when running the device farm without setting http_proxy?

@Harish879
Copy link
Author

Harish879 commented Sep 10, 2024

@sudharsan-selvaraj, without setting proxy unable to stream devices using domain where nginx is used as reverse proxy and getting axios related issue. Using IP address Iam able to stream both Android, IOS devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants