Could not find 'adb' in PATH.
See original GitHub issueThe problem
i have already set ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the correct Android SDK root directory path.But still then im getting same error when im trying to run
### java.lang.Exception: FAIL : Failed to launch WEBANDROID browser. Exception Details: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path. Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’ System info: host: ‘USCHAMNMOG0JK78’, ip: ‘2606:a000:1215:c3b2:64b0:d9c7:5b5c:43fb’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.14.5’, java.version: ‘1.8.0_91’ Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb’ in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path. at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’ System info: host: ‘USCHAMNMOG0JK78’, ip: ‘2606:a000:1215:c3b2:64b0:d9c7:5b5c:43fb’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.14.5’, java.version: ‘1.8.0_91’ Driver info: driver.version: AndroidDriver
Environment
appium-doctor info AppiumDoctor Appium Doctor v.1.11.1 info AppiumDoctor ### Diagnostic for necessary dependencies starting ### info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node info AppiumDoctor ✔ Node version is 12.6.0 info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer info AppiumDoctor ✔ Xcode Command Line Tools are installed in: /Applications/Xcode.app/Contents/Developer info AppiumDoctor ✔ DevToolsSecurity is enabled. info AppiumDoctor ✔ The Authorization DB is set up properly. info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage. Installed version is: 0.33.0 info AppiumDoctor ✔ HOME is set to: /Users/vz8zw5 info AppiumDoctor ✔ ANDROID_HOME is set to: /Users/vz8zw5/Library/Android/sdk info AppiumDoctor ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home info AppiumDoctor ✔ adb exists at: /Users/vz8zw5/Library/Android/sdk/platform-tools/adb info AppiumDoctor ✔ android exists at: /Users/vz8zw5/Library/Android/sdk/tools/android info AppiumDoctor ✔ emulator exists at: /Users/vz8zw5/Library/Android/sdk/tools/emulator info AppiumDoctor ✔ Bin directory of $JAVA_HOME is set info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ### info AppiumDoctor info AppiumDoctor ### Diagnostic for optional dependencies starting ### WARN AppiumDoctor ✖ opencv4nodejs cannot be found. WARN AppiumDoctor ✖ ffmpeg cannot be found WARN AppiumDoctor ✖ mjpeg-consumer cannot be found. WARN AppiumDoctor ✖ idb and idb_companion are not installed WARN AppiumDoctor ✖ applesimutils cannot be found WARN AppiumDoctor ✖ idevicelocation cannot be found WARN AppiumDoctor ✖ ios-deploy cannot be found WARN AppiumDoctor ✖ ios_webkit_debug_proxy cannot be found WARN AppiumDoctor ✖ ifuse cannot be found WARN AppiumDoctor ✖ bundletool.jar cannot be found info AppiumDoctor ### Diagnostic for optional dependencies completed, 10 fixes possible. ### info AppiumDoctor info AppiumDoctor ### Optional Manual Fixes ### info AppiumDoctor The configuration can install optionally. Please do the following manually: WARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md WARN AppiumDoctor ➜ ffmpeg is needed to record screen features. Please read https://www.ffmpeg.org/ to install it WARN AppiumDoctor ➜ mjpeg-consumer module is required to use MJPEG-over-HTTP features. Please install it with ‘npm i -g mjpeg-consumer’. WARN AppiumDoctor ➜ Why idb is needed and how to install it: https://github.com/appium/appium-idb WARN AppiumDoctor ➜ Why applesimutils is needed and how to install it: http://appium.io/docs/en/drivers/ios-xcuitest/ WARN AppiumDoctor ➜ idevicelocation is used to set geolocation for real device. Please read https://github.com/JonGabilondoAngulo/idevicelocation to install it WARN AppiumDoctor ➜ ios-deploy is used to install iOS applications to real device. Please read http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/ to install it WARN AppiumDoctor ➜ ios_webkit_debug_proxy is used to proxy requests from Appium to MobileSafari running on real device. Please read https://github.com/google/ios-webkit-debug-proxy to install it WARN AppiumDoctor ➜ ifuse is used to manage files/folders against a real device. Please read https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios/ios-xctest-file-movement.md to install it WARN AppiumDoctor ➜ bundletool.jar is used to handle Android App Bundle. Please read http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ to install it info AppiumDoctor info AppiumDoctor ### info AppiumDoctor info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have been applied!
Details
Bash_Profile export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home export M2_HOME=/Users/vz8zw5/apache-maven-3.6.1 export PATH=$PATH:$M2_HOME/bin export PATH=$PATH:$JAVA_HOME/bin export ANDROID_HOME=/Users/vz8zw5/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools export PATH=$PATH:/usr/local/bin/carthage export PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin export PATH=/usr/local/bin:$PATH
export NVM_DIR=“$HOME/.nvm” [ -s “/usr/local/opt/nvm/nvm.sh” ] && . “/usr/local/opt/nvm/nvm.sh” # This loads nvm [ -s “/usr/local/opt/nvm/etc/bash_completion” ] && . “/usr/local/opt/nvm/etc/bash_completion” # This loads nvm bash_completion
echo $PATH /usr/local/bin:./node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vz8zw5/.rvm/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/vz8zw5/apache-maven-3.6.1/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin:/Users/vz8zw5/Library/Android/sdk/tools:/Users/vz8zw5/Library/Android/sdk/platform-tools:/usr/local/bin/carthage:/usr/bin:/bin:/usr/sbin:/sbin
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
I just spent an hour having the same problem, my solution was that in version 1.15.1, after fresh install,in the end, I had to manually set up ANDROID_HOME and JAVA_HOME in “Edit configurations” in Appium Desktop for it to work. Hope it helps someone
It works for me. thanks