question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find 'adb' in PATH.

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

7reactions
mikalaikarolcommented, Feb 19, 2020

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

0reactions
Nadia-Adelcommented, Apr 18, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - adb command not found - Stack Overflow
Go to file Explorer and paste the path for Sdk you copied to view the Sdk files. You will notice that the Adb...
Read more >
Could not find adb Please set the ANDROID_HOME ...
in Eclipse go to Run > run configuration > Environment tab > tap on new > set ANDROID_HOME variable and JAVA_HOME Variable >...
Read more >
Fix "Unable to locate adb within SDK" in Android Studio
The following error occurs when the adb file is not found within the SDK system folder. A software development kit (SDK) provides the ......
Read more >
Appium could not find adb? (On Windows) - Google Groups
in the CMD window where I run "python mytestname.py", if I do "adb" on it's own, it's clearly there in my %PATH% -...
Read more >
Help, adb is not found!. So you've downloaded Android Studio ...
Then type ls (or dir on Windows). You should see adb or adb.exe depending on your operating system. From here you can type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found