Comments (12)
I have one more issue, i have followed all instructions, but here in "Update Appium Config" and appium-config
i have to setup my own configuration that the container will spin up automatically or i need to install Appium on my PC start it and get host configuration? Where i find the Selenium Grid configuration?
I skipped this step and I can't see anything in the GADS log and the container didn't start :(. If I finish this step, when I plug my device in, will the container start automatically?
from gads-devices-provider.
On the first question - yes, it seems I didn't update the readme properly after doing the latest changes 😓
On the second question - you do not need Appium on the host, each container has Appium installed inside the image and spins its own Appium server automatically. The appium-config
is used only if you want to connect to Selenium Grid (which I believe might not be working at the moment) but you don't have to use it at all. Just set connect_selenium_grid
field to false
(which is the default value).
- Have you built the docker image as described in the provider setup?
- Have you created the udev rules after setting up
config.json
with the devices? If you have the device connected before you setup the udev rules you might need to reconnect it. Then go to/dev
and see if you have a symlink created which name starts withdevice_your device UDID
- Did you kill adb-server after all this is done?
- And a stupid question - did you build and run the provider?
from gads-devices-provider.
I did the process again, considering your observations, and I noticed that inside logs/provider.log
some events were being fired, one of the errors is the following:
{"event":"android_container_create","level":"error","msg":"Device with UDID:RQ8RC06TLJK.tmp-c189:11 is not registered in the 'config.json' file. will be created.","time":"2023-02-06T14:48:49-03:00"}
.
I also took a look at 90-devices.rules
and realized that for some reason it is generating the default rules when the project is cloned, even if I change config.json
, there are any workaround for these errors i am taking?
Complete log:
{"event":"android_container_create","level":"error","msg":"Device with UDID:RQ8RC06TLJK.tmp-c189:8 is not registered in the 'config.json' file. No container will be created.","time":"2023-02-06T16:08:38-03:00"}
{"event":"android_container_create","level":"info","msg":"Attempting to create a container for Android device with udid: RQ8RC06TLJK","time":"2023-02-06T16:08:38-03:00"}
{"event":"android_container_create","level":"error","msg":"Could not create a container for device with udid: RQ8RC06TLJK. Error: Error response from daemon: invalid mount config for type \"bind\": bind source path does not exist: /root/.android","time":"2023-02-06T16:08:38-03:00"}
from gads-devices-provider.
By the error you can see it tries to mount /root/.android
folder but it doesnt exist on your machine. If I remember correctly this contains the adbkeys for your devices so that the container does not ask each time for connection. If you havent done it, stop the provider and:
- Run adb server on the host.
- Enable USB debugging on the Android phone through the developer tools.
- Connect the device.
- You should see a pairing request on device - accept it.
This should create an.android
folder which contains the pairing key for the device
Kill adb server on the host, disconnect the device, run the provider and connect the device. I've worked less on Android and I may have forgotten this in readme :(
from gads-devices-provider.
I run it, but i have another error. Sorry for my stupid question, but i can't solve this error :(
Complete log:
{"event":"create_udev_rules","level":"info","msg":"Creating udev rules","time":"2023-02-07T00:32:57-03:00"}
{"event":"android_container_create","level":"info","msg":"Attempting to create a container for Android device with udid: 11df8d42.tmp-c189:9","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"error","msg":"Device with UDID:11df8d42.tmp-c189:9 is not registered in the 'config.json' file. No container will be created.","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"info","msg":"Attempting to create a container for Android device with udid: 11df8d42","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"info","msg":"Attempting to create a container for Android device with udid: 11df8d42.tmp-c189:9","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"error","msg":"Device with UDID:11df8d42.tmp-c189:9 is not registered in the 'config.json' file. No container will be created.","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"info","msg":"Attempting to create a container for Android device with udid: 11df8d42","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"error","msg":"Could not create a container for device with udid: 11df8d42. Error: Error response from daemon: Conflict. The container name \"/androidDevice_11df8d42\" is already in use by container \"a35c07ffa24c32b81ab9897d3c7b563b252a4420c5591b4d68698c4730bf28cd\". You have to remove (or rename) that container to be able to reuse that name.","time":"2023-02-07T00:34:01-03:00"}
{"event":"android_container_create","level":"info","msg":"Successfully created a container for Android device with udid: 11df8d42","time":"2023-02-07T00:34:03-03:00"}
The last log it's a message saying that container was created, but when i run sudo docker container ls
the list is empty.
from gads-devices-provider.
What OS are you running it on? These symlink names that include tmp-c189:9
are a bit weird and I've never seen them - that is not the reason though. Judging by the logs everything should be okay - Could not create a container
error appears because when you connect a device sometimes the udev rules trigger multiple times and this is part of the "handling". It creates a container, then tries to create it again but it already exists and the provider found it. Then the initially created container is successfully started and we can see the message in the logs. On the top of my mind a possible reason could be that you are using sudo
- I've never used docker with it and I assume there might be different docker instances with and without sudo
. Did you try just docker ps -a
?
from gads-devices-provider.
Also you should note that containers get destroyed if the symlink disappears from /dev
- if you disconnect the device for example or the usb connection fails for some reason. This is just a heads up, I doubt that you are having a problem with this
from gads-devices-provider.
I'm using Ubuntu 20.04
- Go version go1.19.5
- Docker version 23.0.0.
Alright, i'll try to use without sudo
.
Thanks for the quick reply :D
from gads-devices-provider.
Hey! sorry for one more issue, but i did again without sudo
and i'm having the same error :(
I've followed all steps in readme, but i don't know what's happened. When i call docker ps -a
i see my container with status "Exited" i try to see logs using the api call [/containers/{container_id}/logs]
, but this shows this message "There are no existing logs for this container.", i've tried to restart the container, but nothing happens. :(
i'd like to test this project :( this is the most complete project I've seen so far
from gads-devices-provider.
Hah, you are the only person that I know of that is trying to use it beside me so there might be some unforeseen issues that I havent thought of or something that I missed in readmes. Right now on the top of my head I can't imagine what could be the problem - you can contact me in Discord: shamanec#4281
or LinkedIn so we can chat faster when I am available. Also we can try and do a live session tomorrow evening if you want - I live in Bulgaria which is UTC+2
from gads-devices-provider.
Thank you!! i'll contact you. :)
from gads-devices-provider.
Issues resolved!
from gads-devices-provider.
Related Issues (16)
- Try to run using WSL 2 in Windows HOT 5
- Can it work on MacOS? HOT 9
- Develop on MacOS HOT 3
- Error while running ./GADS-devices-provider : Could not add /dev folder to watcher HOT 12
- Add MacOS support HOT 1
- Move to MongoDB HOT 1
- Selenium Grid HOT 1
- Improve code HOT 1
- Windows iOS device provision HOT 1
- Unable to start the GADS Server. Logs don't show anything HOT 2
- Unable to start device provider server. HOT 5
- is it possible to work with iphone simulators? HOT 4
- WebDriverAgent runner installs in a repeated loop on iOS 17.3 HOT 6
- reverse USB tethering HOT 1
- iOS Docker image error - file does not exist HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gads-devices-provider.