Closed ZhiPeng-1997 closed 2 months ago
Yes, you got that correct - the provider should be running at all times! But if you can load the device screen, just not interact with the device - I would assume something is wrong with Appium - maybe there is some dependency like Java or ANDROID_HOME env variable or something else missing that I haven't handled properly. There are a few things you can do to debug:
--log-level=debug
logs
folder - check the provider.log
file for informationlogs
as well - inside that folder there should be some more logs, you can also check what is there as well
Let me know if you manage to find out the root cause! :)@shamanec thanks for reply. I will try according to your suggestions, and if there are any results, I will provide timely feedback!
feedback: good news, i follow your step and then i found that my "usb debugging( security setting)" option is off, when i open it, finally it worked! should we add this tips to the set-up description file?
but i still have some questions:
↑ is that correct?
and when we add a new provider , the "host" should be the mobile device ip? (because provider use nickname to get the configuration instead of config-file), but if it is device ip, how do the backend find the provider? if it is provider ip, how do provider find a device ip? Maybe I'm wrong but I think that is a logical dead-loop.
Maybe I'm using it in a wrong way?
Do we need to add a provider ip attribute or report our own ip when the provider starts (by modifying mongodb data)?
anyway thanks!
Yeah, the drawing seems kinda correct :D So the device IPs does not matter at all - it does something like this:
http://some-providerIP:10000/device/some-udid/video-stream
- and everything else is exposed in a similar way.tap
- it will call the UI backend, it will find that the host of the device is 192.168.1.5, then it will build the proper URL and hit it - like 192.168.1.5:10000/device/some-udid/tap
.
I hope this makes it a bit clearer and why you are using the provider host machine IP and not the device IP address :)
Also this is part of the README for the provider ;) :Dohh i got it, then everything is perfect! thanks for your patience! i think this issue could be closed! thanks a lot!
sorry first, i don't know the whole project well. but i have a question . when i finished set-up, and follow the guidance, finally i got a issue: "Device is unavailable"
then a check this error: i found that GADS-ui send a request that url is "/device/{dev-uuid}/health" but got 404 error![image](https://github.com/shamanec/GADS/assets/34101883/3d79ad7d-e43e-403b-bdeb-f94524ee53ae)
then i follow the code and found that is a reverse proxy![image](https://github.com/shamanec/GADS/assets/34101883/25a4910c-5478-4e23-ad89-fdc4e33cedb8)
I think the request should be sent to the provider, but the host is "192.168.1.12:1991"(my android mobile ip) , not the provider host (127.0.0.1:1991), so i change it, and finally it worked!![image](https://github.com/shamanec/GADS/assets/34101883/3511df22-27e0-47f8-acd4-4f44f6ef5157)
but still got issue: i can not control the device , when i click the device screen, i got "You should navigate back to the devices list" message
Am I using it wrong? i think provider is must because the provider keep heartbeat to the mobile
thanks !