Getting error on setting-up Appium 1.6.4 with Android on MacOS

Hi Everyone,

I am facing issues while setting-up Appium 1.6.4 with Android on MacOS.

  • I have correctly setup ANDROID_HOME and JAVA_HOME environment variable
  • I have correctly set the PATH for platform-tools, tools and Android sdk folder
  • My Appium server is successfully able to find the adb and search the device
  • On writing ‘adb devices’ I am able to search for emulator
  • Using Selenium Webdriver 2.53.a, Appium 1.6.4, C#.Net as programming language
  • Emulator details : Device : Nexus6, Target - Android 6.0 API level 23,

C# code for instantiating Appium Android driver
public IWebDriver MakeAndroidDriver()
{
//Initialization of Android driver
DesiredCapabilities androidCapabilities = new DesiredCapabilities();
androidCapabilities.SetCapability(“deviceName”, “Nexus6”);
androidCapabilities.SetCapability(“platformName”, “Android”);
androidCapabilities.SetCapability(“noReset”, true);
androidCapabilities.SetCapability(“newCommandTimeout”, 120);
androidCapabilities.SetCapability(“app”, “\Users\mats\Documents\Test\builds\Android\com.abc.xyz-Signed.apk”);
androidCapabilities.SetCapability(“autoLaunch”, true);
androidCapabilities.SetCapability(“appWaitActivity”, “md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”);
androidDriver = new RemoteWebDriver(new Uri(“http://127.0.0.1:4723/wd/hub”), androidCapabilities);
androidDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));

        return androidDriver;
}

Appium server logs
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\mats\Documents\test\builds\Android\com.abc.xyz-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\mats\Documents\test\builds\Android\com.abc.xyz-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1501307358060 (11:19:18 GMT+0530 (IST))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] deviceName: ‘Nexus6’
[Appium] platformName: ‘Android’
[Appium] newCommandTimeout: 120
[Appium] app: ‘\Users\mats\Documents\test\builds\Android\com.abc.xyz-Signed.apk’
[Appium] autoLaunch: true
[Appium] appWaitActivity: ‘md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity’
[AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: 49849eae-62ad-405d-9ed0-e126b7aefa4a
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_101
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/mats/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/mats/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[ADB] Setting device id to emulator-5554
[BaseDriver] Error Unmounting :Command ‘umount /Volumes/Documents’ exited with code 1
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Called deleteSession but bootstrap wasn’t active
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[ADB] Running ‘/Users/mats/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: EACCES: permission denied, rmdir ‘Volumes’
at Error (native)
[HTTP] <-- POST /wd/hub/session 500 1780 ms - 179

Detailed npm logs

Matss-Mac-mini:~ matsbacklund$ appium -a localhost
[Appium] Welcome to Appium v1.6.5
[Appium] Non-default server args:
[Appium] address: localhost
[Appium] Appium REST http interface listener started on localhost:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1501314863411 (13:24:23 GMT+0530 (IST))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] deviceName: ‘Nexus6’
[Appium] platformName: ‘Android’
[Appium] newCommandTimeout: 120
[Appium] app: ‘\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk’
[Appium] autoLaunch: true
[Appium] appWaitActivity: ‘md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity’
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: c6a6136f-5588-4010-bcd7-42b55be7d2bd
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_101
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Error Unmounting :Command ‘umount /Volumes/Documents’ exited with code 1
[BaseDriver] Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn’t active
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at


Kindly help

Following the details npm logs

Matss-Mac-mini:~ matsbacklund$ appium -a localhost
[Appium] Welcome to Appium v1.6.5
[Appium] Non-default server args:
[Appium] address: localhost
[Appium] Appium REST http interface listener started on localhost:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1501314863411 (13:24:23 GMT+0530 (IST))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] deviceName: ‘Nexus6’
[Appium] platformName: ‘Android’
[Appium] newCommandTimeout: 120
[Appium] app: ‘\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk’
[Appium] autoLaunch: true
[Appium] appWaitActivity: ‘md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity’
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: c6a6136f-5588-4010-bcd7-42b55be7d2bd
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_101
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Error Unmounting :Command ‘umount /Volumes/Documents’ exited with code 1
[BaseDriver] Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn’t active
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at

Detailed npm logs

Matss-Mac-mini:~ matsbacklund$ appium -a localhost
[Appium] Welcome to Appium v1.6.5
[Appium] Non-default server args:
[Appium] address: localhost
[Appium] Appium REST http interface listener started on localhost:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“deviceName”:“Nexus6”,“platformName”:“Android”,“newCommandTimeout”:120,“app”:"\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk",“autoLaunch”:true,“appWaitActivity”:“md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1501314863411 (13:24:23 GMT+0530 (IST))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] deviceName: ‘Nexus6’
[Appium] platformName: ‘Android’
[Appium] newCommandTimeout: 120
[Appium] app: ‘\Users\matsbacklund\Documents\Sarabjeet\builds\Android\com.mobilizeit.meetapp3-Signed.apk’
[Appium] autoLaunch: true
[Appium] appWaitActivity: ‘md5b08c782cf9319c3de44b6835de7e19a8.BrandActivity’
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: c6a6136f-5588-4010-bcd7-42b55be7d2bd
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_101
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Error Unmounting :Command ‘umount /Volumes/Documents’ exited with code 1
[BaseDriver] Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn’t active
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/Users/matsbacklund/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error mounting: Command ‘mount -t smbfs :@matsbacklund/Documents /Volumes/Documents’ exited with code 64
at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)
at mountNetworkShare$ (…/…/…/lib/basedriver/helpers.js:239:14)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at

Looks like a permissions issue.

I have given complete read/write permissions to both /Volumes and /Volumes/Documents packages, still same issue