org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session [SOLVED]

macOS Sierra version 10.12(16A323)
Appium v1.5.3
Xcode Version 8.0
Eclipse Version: Mars.2
java version “1.8.0_121”

I’m trying to automate iOS app using appium.
When I take run as JUnit it gives errors.

This is the source code I created following a tutorial,

package firsttest;

 import io.appium.java_client.AppiumDriver;
 import io.appium.java_client.MobileElement;
 import io.appium.java_client.ios.IOSDriver;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.remote.DesiredCapabilities;
 import java.util.concurrent.TimeUnit;

public class two {

private IOSDriver<MobileElement> driver;

public void setUp() throws Exception {

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium-version", "1.0");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "10.0");
capabilities.setCapability("deviceName", "iPhone 7");
capabilities.setCapability("app", "/Users/admin/...... //");
driver = new IOSDriver(new URL(""), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

public void tearDown() throws Exception {
public void EnterKID(){
 WebElement KID = driver.findElement(By.xpath("//XCUIElementTypeApplication[1]..../XCUIElementTypeImage[1]"));;       

And this is the error it shows…

When I recored from appium , it gives code with ‘‘wd’’.
But eclipce mentions ‘wd Cannot be resolved’

I added

  • java-client-5.0.0-BETA1.jar

  • selenium-server-standalone-3.0.1.jar

  • selenium-java-3.0.1files

Whats wrong with this?
Is this a effect with XCUITest in xcode 8?
Can any one provide a proper link to be followed?

macOS Sierra version 10.12(16A323)
Appium v1.5.3
Xcode Version 8.0

Appium v1.5.3 doesn’t work with Xcode 8.0

You will have to upgrade appium to 1.6.3 and start using XCUITest.

There is a explanation at the top of the forums in blue.

@dduphorn yes I made it to appium 1.6 and launched inspector to work with XCUI testing.
I want to create and run automation in eclipse. It does not work and give errors like above… :disappointed_relieved:

What displays when you type the below in the terminal?

which node

which appium

It appears that you are pointing to the wrong appium and node.

Open Terminal
Enter: brew install node
Enter: nvm install 6.0.0
Enter: which node
If the node path changes continue with 6 and 7
npm install -g appium
npm install -g appium-doctor

Now it shows like this

II’m trying to run automation in a real device.
Automation on simulator works fine. But when I changed to real device capabilities it failed.

I tried with webDriver agent , but there is a error in webDriver agent project.
Can you help to resolve it?

I added desired capabilities as,

Testing failed:
Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’

  1. Xcodebuild failed with code 65 (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 32.63 seconds
  2. read pavanbachu
  3. After you are done setting up the config file rebuild the APP.
  4. Try executing again.
1 Like

Thanks a lot

Fixed it and now running… :relieved:

I had issue with ./Scripts/

ERROR in ./js/app.js Module parse failed: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js Unexpected token (59:4) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (59:4)

And following steps worked for me…

Cd usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
brew install carthage
npm i -g webpack
./Scripts/ -d

open /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
run project


1 Like

I got error while running
nvm install 6.0.0
-bash: nvm: command not found

pct:~ tatvasoft$ which node
pct:~ tatvasoft$ which appium
pct:~ tatvasoft$ npm install -g appium
/usr/local/bin/appium → /usr/local/lib/node_modules/appium/build/lib/main.js

[email protected] install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

info Chromedriver Install Installing Chromedriver version ‘2.28’ for platform ‘mac’ and architecture ‘64’
info Chromedriver Install Opening temp file to write chromedriver_mac64 to…
info Chromedriver Install Downloading
RequestError: Error: connect ETIMEDOUT
at new RequestError (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/errors.js:11:15)
at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/rp.js:60:32)
at self.callback (/usr/local/lib/node_modules/appium/node_modules/request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (/usr/local/lib/node_modules/appium/node_modules/request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
└── (empty)

npm ERR! Darwin 16.0.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “appium”
npm ERR! node v6.10.3
npm ERR! npm v3.10.10

npm ERR! [email protected] install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script ‘node install-npm.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appium-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install-npm.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appium-chromedriver
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/tatvasoft/npm-debug.log
npm ERR! code 1
pct:~ tatvasoft$ appium -version
-bash: appium: command not found
pct:~ tatvasoft$ Appium
-bash: Appium: command not found
pct:~ tatvasoft$ appium
-bash: appium: command not found
pct:~ tatvasoft$