org.openqa.selenium.WebDriverException

I am using appium on Mac, I’m running it through a remote computer.
Like I have PC A which I use java to open appium on PC B and run there appium and a test .

I have done everything needed , It works with me on Windows but on MAC it isn’t

This is the exception
Message :

An unknown server-side error occurred while processing the command. Original error: Cannot read property ‘forceStop’ of undefined (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 296 milliseconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘XXXXXXXXX’, ip: ‘XXXXXXXX’, os.name: ‘Windows 7’, os.arch: ‘x86’, os.version: ‘6.1’, java.version: ‘1.8.0_73’
Driver info: RemoteDebugging.Appium.Upgraded_AndroidDriver
Stacktrace :

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot read property ‘forceStop’ of undefined (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 296 milliseconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘XXXXXXXXXX’, ip: ‘XXXXXXXXXXXXXXXXX’, os.name: ‘Windows 7’, os.arch: ‘x86’, os.version: ‘6.1’, java.version: ‘1.8.0_73’

This is how I did it :

stp.runCommandLineAsync(“appium --address “+host+” -a 0.0.0.0 --chromedriver-port 9516 --port 4723 --bootstrap-port 4725 --selendroid-port 8082 --no-reset --local-timezone”);
AppsPath=“/Users/automation/Desktop/Apps/”;
The stp command will run this on the shell on MAC (PC B ) and I checked that appium is up and running , here we dont have a problem .
capabilities.setCapability(“app”, AppsPath+apkFile);
capabilities.setCapability(“instrumentApp”, instrument);
capabilities.setCapability(“appPackage”, appPackage);
capabilities.setCapability(“appActivity”, appActivity);
capabilities.setCapability(“deviceName”, deviceID);
capabilities.setCapability(“platformName”, deviceOS);
capabilities.setCapability(“deviceLocation”, “Server”);
capabilities.setCapability(“udid”, deviceID);
capabilities.setCapability(“deviceModel”, deviceName);
capabilities.setCapability(“deviceCategory”, “PHONE”);
capabilities.setCapability(“deviceWithAudio”, false);

if(stp.getOSEnum()==OperationSystems.MAC) {
capabilities.setCapability(“chromedriverExecutable”, “/Users/automation/Desktop/chromedriver/chromedriver”);
}
driver = new Upgraded_AndroidDriver(new URL(“http://”+host+“:4723/wd/hub”),capabilities);


This is the values of the capabilities
----------- Appium Settings ------------

Appium Settings : deviceName → 07f3be86
Appium Settings : platformName → android
Appium Settings : deviceLocation → Server
Appium Settings : udid → 07f3be86
Appium Settings : deviceModel → adb:Nexus7
Appium Settings : deviceCategory → PHONE
Appium Settings : deviceWithAudio → false
Appium Settings : app → /Users/automation/Desktop/Apps/eribank.apk
Appium Settings : instrumentApp → false
Appium Settings : appPackage → com.experitest.ExperiBank
Appium Settings : appActivity → .LoginActivity

----------- End of Appium Settings ------------

I tried to use devicName=the device name, nothing changed

I’m getting this now :

Message :
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘MohmoudMahagna’, ip: ‘192.168.2.84’, os.name: ‘Windows 7’, os.arch: ‘x86’, os.version: ‘6.1’, java.version: ‘1.8.0_73’
Driver info: driver.version: Upgraded_AndroidDriver
Stacktrace :

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘MohmoudMahagna’, ip: ‘192.168.2.84’, os.name: ‘Windows 7’, os.arch: ‘x86’, os.version: ‘6.1’, java.version: ‘1.8.0_73’

This happened after installing xCode CommandLine , it was missing , but this exception that I’m getting now also was happening before.

Appium doctor says everything is fine …