Error while running appium test case to launch an application

I am new to Appium, I have setup everything, but it is giving me the following error.

info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: /home/dell/workspace/Theatro/apk/com.whatsapp_v2.12.438-450897_Android-2.1.apk
info: [debug] Creating new appium session 8e4c1c9c-ecd4-4e23-89ba-298c1127dfd9
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_66
info: [debug] Checking whether adb is present
error: Unhandled error: Error: ENOENT: no such file or directory, scandir ‘/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/tools:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/platform-tools:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/build-tools/23.0.2:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/tools:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/platform-tools:/home/dell/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/build-tools/23.0.2:/usr/lib/jvm/java-8-oracle/jre/bin:home/dell/.linuxbrew/bin:/home/dell/Downloads/node-v5.5.0-linux-x64/bin:/home/dell/workspace/Android/android-sdk-linux/build-tools’
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at exports.getDirectories (/home/dell/.linuxbrew/lib/node_modules/appium/node_modules/appium-adb/lib/helpers.js:100:18)
at [object Object].ADB.checkSdkBinaryPresent (/home/dell/.linuxbrew/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:97:25)
at [object Object].ADB.checkAdbPresent (/home/dell/.linuxbrew/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:134:8)
at Function.ADB.createADB (/home/dell/.linuxbrew/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:73:7)

I m struggling with this issue for the past few days, didn’t get any solution till now. Please help. Thanks in advance

is your network behind a proxy ?

@hemche: Nope, it is not

path in .bashrc is set as

export PATH=${PATH}:home/dell/.linuxbrew/bin
export MANPATH=home/dell/.linuxbrew/share/man:$MANPATH
export INFOPATH=home/dell/.linuxbrew/share/info:$INFOPATH
export PATH=${PATH}:/home/dell/Downloads/node-v5.5.0-linux-x64/bin
export ANDROID_HOME=${PATH}:/home/dell/workspace/Android/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools
export PATH=${PATH}:$ANDROID_HOME/platform-tools
export PATH=${PATH}:$ANDROID_HOME/build-tools/23.0.2
export JAVA_HOME=${PATH}:/usr/lib/jvm/java-8-oracle/jre
export PATH=${PATH}:$JAVA_HOME/bin

is this something to worry about? because, I understand adb should be present inside sdk. But path in error has some recurring paths

Where is adb installed? You should make sure it is on the path. If you are using an IDE, you may need to read the documentation on it regarding setting and using Environment Variables.

1 Like

adb is already installed and its listing my device. I have added android platform tool path as mentioned in my previous comment. As per my understanding adb is under platform-tool folder and no need to add path particularly for adb. Please correct me if I m wrong

Only if you are running from the command line. [quote=“wreed, post:5, topic:8563”]
If you are using an IDE, you may need to read the documentation on it regarding setting and using Environment Variables.
[/quote]

There is no way to tell from your post how you are running this. Because you are getting this error I believe you are using an IDE and have not set it up properly.

Here is the path that whatever you are using is looking for adb in. Is it in any of these places? If not, you need to change the settings and make sure it is.

And please don’t waste time and say, “Theoretically it should be here”. Go and find it. Make sure it’s on the path. Adjust the path if it’s not on there.