GithubHelp home page GithubHelp logo

shamanec / gads-devices-provider Goto Github PK

View Code? Open in Web Editor NEW
29.0 5.0 4.0 82.33 MB

Set up iOS/Android devices for remote control with GADS UI and Appium test execution

License: MIT License

Go 100.00%
android appium appium-android appium-ios device-farm ios remote-control linux macos windows

gads-devices-provider's People

Contributors

shamanec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gads-devices-provider's Issues

iOS Docker image error - file does not exist

I got an error while Building iOS Docker image:
docker build -f Dockerfile-iOS -t ios-appium .

Step 13/14 : COPY configs/supervision.p12 /opt
COPY failed: file not found in build context or excluded by .dockerignore: stat configs/supervision.p12: file does not exist

Add MacOS support

  • Add support for running the provider on MacOS
  • Docker containers will not be used, too much work to share devices inside containers
  • Should work for both Android/iOS devices
  • For iOS devices potentially have a fallback on Xcode instead of go-ios

Windows iOS device provision

go-ios supports up to iOS 16 on any OS, currently the provider does not provision iOS devices on Windows so I should add this

Error while running ./GADS-devices-provider : Could not add /dev folder to watcher

Steps Followed :

  1. Ran GADS repo first after updating config for rethinkDB(Also running)
  2. Updated config in ./GADS-devices-provider
  3. Setup android device setup by adding device config as array in list in config
  4. Build Android Docker image(succeeded)
  5. Now running go run main.go or ./GADS-devices-provider
    getting this error

Starting provider on port:10001
Initial device update
Starting devices healthcheck
Starting /dev watcher
panic: Could not add /dev folder to watcher when preparing to watch it: "/dev/nsmb0": resource busy
goroutine 27 [running]:
github.com/shamanec/GADS-devices-provider/device.devicesWatcher()
/Users/abhishek/Documents/GADS-devices-provider-main/device/devices.go:126 +0x165
created by github.com/shamanec/GADS-devices-provider/device.UpdateDevices
/Users/abhishek/Documents/GADS-devices-provider-main/device/devices.go:20 +0xfb
exit status 2
Screenshot 2023-04-22 at 8 24 26 PM

My guess : Setup udev rules step needs the device provider repo to be running at localhost:port , but then some /dev folder is not present or not created hence giving error so not able to execute :
curl -X POST http://localhost:{ProviderPort}/device/create-udev-rules

HELP PLEASE!!!
Let me know if any steps are in wrong order.

Unable to start device provider server.

I am planning to implement iOS device farm. Setup the GADS UI while trying to start the device provider server, getting below error,

image

I am using macOS and followed the instructions in doc for setting up. I am planning to test 1 android and 1 iOS device.

WebDriverAgent runner installs in a repeated loop on iOS 17.3

Hi, I have followed the instructions given in GADS device provider & GADS UI. When I try to launch the UI, i see that the WebDriverAgent runner is getting installed repeatedly in a loop on the device. When I look at the logs, it shows an error:
"Error waiting for WebDriverAgent(xcodebuild) command to finish.. it is errored out or device <> disconnected agent killed"

I am not sure what is wrong with the setup. Can you advise?
Env -> iOS 17.3 and mac os ventura 13.6.4

Unable to start the GADS Server. Logs don't show anything

Hi,
I have completed the setup and I am not able to keep the server running. It starts for a few seconds and then terminates itself.
Logs don't show any errors. Here are the logs:

`
➜ GADS-devices-provider git:(main) ✗ go build .
➜ GADS-devices-provider git:(main) ✗ ./GADS-devices-provider
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET /device/:udid/health --> github.com/shamanec/GADS-devices-provider/router.DeviceHealth (3 handlers)
[GIN-debug] POST /device/:udid/tap --> github.com/shamanec/GADS-devices-provider/router.DeviceTap (3 handlers)
[GIN-debug] POST /device/:udid/home --> github.com/shamanec/GADS-devices-provider/router.DeviceHome (3 handlers)
[GIN-debug] POST /device/:udid/lock --> github.com/shamanec/GADS-devices-provider/router.DeviceLock (3 handlers)
[GIN-debug] POST /device/:udid/unlock --> github.com/shamanec/GADS-devices-provider/router.DeviceUnlock (3 handlers)
[GIN-debug] POST /device/:udid/screenshot --> github.com/shamanec/GADS-devices-provider/router.DeviceScreenshot (3 handlers)
[GIN-debug] POST /device/:udid/swipe --> github.com/shamanec/GADS-devices-provider/router.DeviceSwipe (3 handlers)
[GIN-debug] GET /device/:udid/appiumSource --> github.com/shamanec/GADS-devices-provider/router.DeviceAppiumSource (3 handlers)
[GIN-debug] POST /device/:udid/typeText --> github.com/shamanec/GADS-devices-provider/router.DeviceTypeText (3 handlers)
[GIN-debug] POST /device/:udid/clearText --> github.com/shamanec/GADS-devices-provider/router.DeviceClearText (3 handlers)
[GIN-debug] GET /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] POST /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] PUT /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] PATCH /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] HEAD /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] OPTIONS /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] DELETE /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] CONNECT /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] TRACE /device/:udid/appium/*proxyPath --> github.com/shamanec/GADS-devices-provider/router.AppiumReverseProxy (3 handlers)
[GIN-debug] GET /device/:udid/android-stream --> github.com/shamanec/GADS-devices-provider/router.AndroidStreamProxy (3 handlers)
[GIN-debug] GET /device/:udid/ios-stream --> github.com/shamanec/GADS-devices-provider/router.IosStreamProxy (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :10001
➜ GADS-devices-provider git:(main) ✗

`

What could be the possible reasons for this?

Develop on MacOS

Hi Shamanec,
Thanks for public an interesting project.
I have a free mac PC, do you want to remote in and have full rights to use it for development GADS-devices-provider?

reverse USB tethering

Hey, great project!

I have a specific use case - I would need to reverse tether iOS so the device gets its network connection from USB, the main goal is to proxy that connection through socks5 or anything else while maintaining WDA control.

I'm now planning to try to use iOS -> Lightning cable -> USB -> RJ-45 connection which is reported to be working but dunno how I will be able to connect to WDA then, but that would be the least of the problems as my main goal would be to have a way to catch the traffic and route it via remote socks5 server.

In your opinion, how impossible this idea is?

Could there be a better way how to achieve socks5 on ios device without using VPN traffic apps like shadowrocket?

Selenium Grid

Integrate Selenium Grid into the project. It should be possible to define if Selenium Grid should be used or not and automatically register each device Appium server in the grid

Can it work on MacOS?

I'm trying to start GADS in macOS. Can it run on MacOS?

Thanks for reading my issue

Move to MongoDB

Move from RethinkDB to MongoDB because RethinkDB Go driver is no longer actively supported, also Go has native Mongo packages. Add logging to Mongo as well as other improvements

Improve code

Currently the devices are similarly provisioned on any OS but there is repeated code for each OS - should streamline it a bit and make it drier

Try to run using WSL 2 in Windows

I'm trying to use GADS-devices-provider in Linux subsystem with WSL, but not working, it's possible to run GADS in WSL or GADS run only in Linux OS?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.