Error While launching Appium- Unhandled error:Error: ENOENT, no such file or directory

Hello,

I am using Appium 1.3.7. on windows .it was working properly few days back but today when i accessed it it gave me error " Unhandled error: Error: ENOENT, no such file or directory .

I googled it and came to know that this may be because of environmental variables. but i have set ANDROID_HOME and PATH correctl

I also upgrded it 1.4.0. but still the same error.

Can you guys please help me.

Logs

Starting Node Server
info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {“address”:“127.0.0.1”,“noReset”:true,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“18”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“platform”:“Android”,“deviceName”:“Android”,“platformName”:“Android”,“appActivity”:“com.android.mms.ui.ConversationComposer”,“appPackage”:“com.android.mms”,“version”:“”}}
info: Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, version
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 21b1fc22-a8bc-4ae7-8969-d0d5b101dbe0
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_40
info: [debug] Checking whether adb is present
error: Unhandled error: Error: ENOENT, no such file or directory ‘D:\android-sdks;\build-tools’
at Object.fs.readdirSync (fs.js:654:18)
at exports.getDirectories (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\helpers.js:100:18)
at ADB.checkSdkBinaryPresent (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:97:25)
at ADB.checkAdbPresent (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:134:8)
at Function.ADB.createADB (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:73:7)
at androidCommon.initAdb (C:\Program Files\Appium\node_modules\appium\lib\devices\android\android-common.js:1059:9)
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:610:21
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:249:17
at iterate (C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:149:13)
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:160:25 context: [POST /wd/hub/session {“desiredCapabilities”:{“platform”:“Android”,“deviceName”:“Android”,“platformName”:“Android”,“appActivity”:“com.android.mms.ui.ConversationComposer”,“appPackage”:“com.android.mms”,“version”:“”}}]

Doesn’t look correct, the semicolon should be there

Is your ANDROID_HOME = ‘D:\android-sdks;’ ? If yes, remove the semicolon in ANDROID_HOME and that will fix the path as well

2 Likes

Thanks Simon_k…it fixed the issue. code is running fine.