openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.39k stars 2.79k forks source link

Devices never connect to stf deployment in google cloud #886

Open Any2suited66 opened 6 years ago

Any2suited66 commented 6 years ago

What is the issue or idea you have? First of all, this piece of software is amazing and the support the devs provide is top notch. The issue my team and I are experiencing is our devices are recognized by STF but all of them are disconnected. Our deployment is in google cloud using kubernetes, all 3 devices are on connected to my desktop which is running on MacOS high sierra, and we followed the deployment instructions as best we could for our situation. We can see the dashboard when we enter our url and the service will often 'disconnect: socket connection lost' and the we have to reconnect. Also, I entered the adb key in the settings. Can we get a hint at where to be looking to fix out issue? Do we need to run adb connect so each device connects to the outside server? Please let me know if you need any more information and I'll be happy to provide it. Our deployment is based on this script.

What is the expected behavior? All of our devices are connected and behave gracefully.

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here. stf local works fine on my local machine. that's why we decided to deploy.

stf doctor output: 2018-06-08T23:16:18.836Z INF/cli:doctor 84472 [] OS Arch: x64 2018-06-08T23:16:18.838Z INF/cli:doctor 84472 [] OS Platform: darwin 2018-06-08T23:16:18.838Z INF/cli:doctor 84472 [] OS Platform: 17.6.0 2018-06-08T23:16:18.838Z INF/cli:doctor 84472 [] Using Node 9.4.0 2018-06-08T23:16:18.903Z INF/cli:doctor 84472 [] Using ZeroMQ 4.2.5 2018-06-08T23:16:18.920Z INF/cli:doctor 84472 [] Using ADB 1.0.39 2018-06-08T23:16:18.923Z INF/cli:doctor 84472 [] Using ProtoBuf 3.5.1 2018-06-08T23:16:18.995Z INF/cli:doctor 84472 [] Using GraphicsMagick 1.3.29 2018-06-08T23:16:19.146Z INF/cli:doctor 84472 [*] Using RethinkDB 2.3.6

Any2suited66 commented 6 years ago

Here is some output from the logs. The devices are being ignored.

2018-06-13T15:25:31.688Z INF/provider 128 [] Found device “04157df438f3b51b” (device) 2018-06-13T15:25:41.708Z INF/provider 128 [] Providing all 0 of 1 device(s); ignoring “04157df438f3b51b”

sorccu commented 6 years ago

The log message is not very good. What it means is that the provider unit was unable to connect to the processor (via triproxy) and receive instructions back. The provider then ignores the devices because it doesn’t know what to do with them. 99% of the time it’s some kind of a connectivity issue.

Any2suited66 commented 6 years ago

thank you for the quick response. i will keep looking into and post the solution when we find it.

Any2suited66 commented 6 years ago

Can you give me a suggestion on how to debug:

provider unit was unable to connect to the processor (via triproxy) and receive instructions back

thank you for your help.

habeebshk commented 6 years ago

Hey did you fix your issue, i have pretty much the same deployment as well, and i am trying it hard to connect.

Any2suited66 commented 6 years ago

yes, just fixed it today. so what we found out is deployment cannot be run on macOS by itself since it has connection issues with android just like sorccu said in many of his posts. our solution was to follow these instructions from stack overflow. Then deploy with docker using this project. Worked like a charm.

habeebshk commented 6 years ago

hi thanks, but i am good with the setup but when i try to connect using the provider command my devices are getting ignored, regardless of using docker. I have disabled all the firewalls but still they dont work. can you suggest something.