AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
324 stars 101 forks source link

Unable to start the device farm and got "appium-device-farm/goIOS/ios executable is not found" error #931

Closed kedl closed 9 months ago

kedl commented 9 months ago

Describe the bug

Unable to start the device farm and got "appium-device-farm/goIOS/ios executable is not found" error Terminal command: appium server -ka 800 --use-plugins=device-farm,appium-dashboard

Link to Appium logs

[Appium] Attempting to load plugin device-farm...
[Appium] Requiring plugin at /Users/***/.appium/node_modules/appium-device-farm
[Appium] Attempting to load plugin appium-dashboard...
[Appium] Requiring plugin at /Users/***/.appium/node_modules/appium-dashboard
(node:7173) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[ADB] Found 2 'build-tools' folders under '/Users/***/Library/Android/sdk' (newest first):
[ADB]     /Users/***/Library/Android/sdk/build-tools/34.0.0
[ADB]     /Users/***/Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users/***/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[Appium] Welcome to Appium v2.2.3 (REV c32bd1c7cc0c3b1b914845bddfeda53f4d877a3f)
[Appium] Non-default server args:
[Appium] {
[Appium]   keepAliveTimeout: 800,
[Appium]   usePlugins: [
[Appium]     'device-farm',
[Appium]     'appium-dashboard'
[Appium]   ]
[Appium] }
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at /Users/***/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/***/.appium/node_modules/appium-xcuitest-driver
[device-farm] proxy is not required for axios
[device-farm] Registering proxy middleware
(node:7173) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
[device-farm] 📣📣📣 Device Farm Plugin will be served at 🔗 http://localhost:4723/device-farm
[ADB] Found 2 'build-tools' folders under '/Users/***/Library/Android/sdk' (newest first):
[ADB]     /Users/***/Library/Android/sdk/build-tools/34.0.0
[ADB]     /Users/***/Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users/***/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"10AD1E2JLY00119","state":"device"},{"udid":"3415cec8","state":"device"},{"udid":"34fae92d","state":"device"}]
[device-farm] Android Device details for 10AD1E2JLY00119 not available. So querying now.
[device-farm] skipChromeDownload server arg is set; skipping Chromedriver installation.
[device-farm] Android web/hybrid testing will not be possible without Chromedriver.
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 10AD1E2JLY00119 shell getprop ro.build.version.release'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 10AD1E2JLY00119 shell getprop ro.build.characteristics'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 10AD1E2JLY00119 shell getprop ro.product.name'
[device-farm] Android Device details for 3415cec8 not available. So querying now.
[device-farm] skipChromeDownload server arg is set; skipping Chromedriver installation.
[device-farm] Android web/hybrid testing will not be possible without Chromedriver.
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 3415cec8 shell getprop ro.build.version.release'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 3415cec8 shell getprop ro.build.characteristics'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 3415cec8 shell getprop ro.product.name'
[device-farm] Android Device details for 34fae92d not available. So querying now.
[device-farm] skipChromeDownload server arg is set; skipping Chromedriver installation.
[device-farm] Android web/hybrid testing will not be possible without Chromedriver.
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 34fae92d shell getprop ro.build.version.release'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 34fae92d shell getprop ro.build.characteristics'
[ADB] Running '/Users/***/Library/Android/sdk/platform-tools/adb -P 5037 -s 34fae92d shell getprop ro.product.name'
uncaughtException: '/Users/***/.cache/appium-device-farm/goIOS/ios' executable is not found neither in the process working folder (/Users/***) nor in any folders specified in the PATH environment variable (/Users/***/Library/Android/sdk/tools:/Users/***/Library/Android/sdk/platform-tools::/opt/homebrew/opt/openjdk@11/bin:/Users/***/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/bin/chromedriver:/Users/***/.maestro/bin:/Users/***/.maestro/bin:/Users/***/.appium/node_modules/appium-dashboard/node_modules/@ffmpeg-installer/darwin-arm64/)
Error: '/Users/***/.cache/appium-device-farm/goIOS/ios' executable is not found neither in the process working folder (/Users/***) nor in any folders specified in the PATH environment variable (/Users/***/Library/Android/sdk/tools:/Users/***/Library/Android/sdk/platform-tools::/opt/homebrew/opt/openjdk@11/bin:/Users/***/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/bin/chromedriver:/Users/***/.maestro/bin:/Users/***/.maestro/bin:/Users/***/.appium/node_modules/appium-dashboard/node_modules/@ffmpeg-installer/darwin-arm64/)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[device-farm] No iOS simulators found!
[device-farm] No tvOS simulators found!
[device-farm] Checking if device 10AD1E2JLY00119 from http://10.133.232.153:4723 is a candidate to be released
[device-farm] Checking if device 3415cec8 from http://10.133.232.153:4723 is a candidate to be released
[device-farm] Checking if device 34fae92d from http://10.133.232.153:4723 is a candidate to be released
[device-farm] Checking if device 00008110-001909962E0A801E from http://10.133.232.153:4723 is a candidate to be released
[device-farm] Found 0 device candidates to be released
[appium-dashboard] Dashboard plugin is enabled and will be served at http://localhost:4723/dashboard
[appium-dashboard] If the appium server is started with different port other than 4723, then use the correct port number to access the device farm dashboard
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium]    http://127.0.0.1:4723/ (only accessible from the same host)
[Appium]    http://10.133.232.153:4723/
[Appium]    http://10.124.40.140:4723/
[Appium]    http://169.254.100.194:4723/
[Appium] Available drivers:
[Appium]   - uiautomator2@2.28.1 (automationName 'UiAutomator2')
[Appium]   - xcuitest@4.32.9 (automationName 'XCUITest')
[Appium] Available plugins:
[Appium]   - images@2.1.2
[Appium]   - execute-driver@3.0.14
[Appium]   - relaxed-caps@1.0.5
[Appium]   - universal-xml@1.0.9
[Appium]   - device-farm@8.4.3 (ACTIVE)
[Appium]   - appium-dashboard@v2.0.2 (ACTIVE)

Environment

  1. Appium version (or git revision) that exhibits the issue: 2.2.3
  2. Last Appium version that did not exhibit the issue (if applicable):
  3. Node.js version (unless using Appium.app|exe): v21.2.0
  4. Npm or Yarn package manager: npm 10.2.3
  5. Mobile platform/version under test: iOS 17.2 and Android 13/14
  6. Real device or emulator/simulator: Real device
  7. Appium CLI or Appium.app|exe: appium server -ka 800 --use-plugins=device-farm,appium-dashboard

If I add this parameter in the command line, it works well.

--plugin-device-farm-platform=android
saikrishna321 commented 9 months ago

@kedl Have you seen this section - https://appium-device-farm-eight.vercel.app/troubleshooting/

kedl commented 9 months ago

@kedl Have you seen this section - https://appium-device-farm-eight.vercel.app/troubleshooting/

Thanks a lot for your quick feedback, I have tried those 2 ways to install the go-ios, but still got error in the terminal.

command: appium plugin run device-farm install-go-ios


node:internal/modules/cjs/loader:1147
throw err;
^

Error: Cannot find module '/Users/***/.appium/node_modules/appium-device-farm/lib/scripts/install-go-ios.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v21.2.0 ✖ Encountered an error when running 'install-go-ios': Script "install-go-ios" exited with code 1


And also, I am able to see the appium-device-farm folder in the that path,
```bash
~/.appium/node_modules  ls
@appium                    appium-dashboard           appium-device-farm         appium-uiautomator2-driver appium-xcuitest-driver
saikrishna321 commented 9 months ago

@kedl Have you tried installing go-ios from the repo and set it in path ?

kedl commented 9 months ago

@kedl Have you tried installing go-ios from the repo and set it in path ?

I have tried install it from repo and set the env path in the bash file, it works now. thanks again for your support @saikrishna321