Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure

I run at first the appium server and after i excute the code and i have this error i ignored the cause

package test1;

import java.net.MalformedURLException;
import java.net.URL;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.IOSDriver;

import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
/*

*/
public class FirsTest1 {

public static AppiumDriver dr;

public static void main(String[] args)
throws MalformedURLException{
DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(CapabilityType.BROWSER_NAME, “iPhone 5”);
capabilities.setCapability(CapabilityType.VERSION, “9.2”);
capabilities.setCapability(“platformName”,“iOS”);

capabilities.setCapability(“appPackage”,“Setting”);
dr=new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub”),capabilities);

dr.close();
}}

what i have in the console

Exception in thread “main” 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.52.0’, revision: ‘4c2593c’, time: ‘2016-02-11 19:03:33’
System info: host: ‘users-iMac.local’, ip: ‘192.168.1.21’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.7.0_80’
Driver info: driver.version: IOSDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:162)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:171)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:56)
at test1.FirsTest1.main(FirsTest1.java:37)
Caused by: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4723 [/127.0.0.1] failed: Connection refused
Build info: version: ‘2.52.0’, revision: ‘4c2593c’, time: ‘2016-02-11 19:03:33’
System info: host: ‘users-iMac.local’, ip: ‘192.168.1.21’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.7.0_80’
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
… 11 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4723 [/127.0.0.1] failed: Connection refused
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:67)
… 12 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
… 25 more

Add server logs please

ok ; Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --command-timeout “7200” --debug-log-spacing --platform-version “8.1” --platform-name “iOS” --udid “” --full-reset --show-ios-log --default-device --native-instruments-lib

info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)

info: Appium REST http interface listener started on 127.0.0.1:4723

info: [debug] Non-default server args: {“udid”:"",“address”:“127.0.0.1”,“fullReset”:true,“nativeInstrumentsLib”:true,“platformName”:“iOS”,“platformVersion”:“8.1”,“defaultDevice”:true,“showIOSLog”:true,“defaultCommandTimeout”:7200,“debugLogSpacing”:true}
info: Console LogLevel: debug

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 14.691 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“deviceName”:“iPhone 5”,“appPackage”:“Setting”,“version”:“9.2”}}

info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.7.0_80)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************

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. : version

error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.

info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.

info: [debug] Error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.
at [object Object].IOS.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:155:15)
at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:250:15)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10)
at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5)
at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/
route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.)”,“origValue”:“Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.”},“sessionId”:null}

error: Unexpected error: Error: Can’t set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
at ServerResponse.header (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:695:10)
at ServerResponse.send (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:146:12)
at ServerResponse.json (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:235:15)
at ServerResponse.send (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:134:21)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:42:21
at safely (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:306:5)
at module.exports.catchAllHandler (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:41:3)
at Layer.handle_error (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:58:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:300:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:84:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Co
info: <-- POST /wd/hub/session 500 110.222 ms - 564

ntents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) context: [POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“deviceName”:“iPhone 5”,“appPackage”:“Setting”,“version”:“9.2”}}]
TypeError: Cannot set property ‘onResetTimeout’ of null
at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:252:30)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10)
at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5)
at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Reso
urces/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/n
ode_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at logger (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/morgan/index.js:136:5)

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 4.222 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 17.522 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 2.111 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.972 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.382 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 2.809 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 2.674 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.719 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

I mean logs from appium server.
You can copy them from terminal or from UI application.

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --command-timeout “7200” --debug-log-spacing --platform-version “8.1” --platform-name “iOS” --udid “” --full-reset --show-ios-log --default-device --native-instruments-lib

info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)

info: Appium REST http interface listener started on 127.0.0.1:4723

info: [debug] Non-default server args: {“udid”:"",“address”:“127.0.0.1”,“fullReset”:true,“nativeInstrumentsLib”:true,“platformName”:“iOS”,“platformVersion”:“8.1”,“defaultDevice”:true,“showIOSLog”:true,“defaultCommandTimeout”:7200,“debugLogSpacing”:true}
info: Console LogLevel: debug

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 14.691 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“deviceName”:“iPhone 5”,“appPackage”:“Setting”,“version”:“9.2”}}

info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.7.0_80)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************

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. : version

error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.

info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.

info: [debug] Error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.
at [object Object].IOS.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:155:15)
at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:250:15)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10)
at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5)
at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/
route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.)”,“origValue”:“Please provide the ‘app’ or ‘browserName’ capability or start appium with the --app or --browser-name argument. Alternatively, you may provide the ‘bundleId’ and ‘udid’ capabilities for an app under test on a real device.”},“sessionId”:null}

error: Unexpected error: Error: Can’t set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
at ServerResponse.header (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:695:10)
at ServerResponse.send (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:146:12)
at ServerResponse.json (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:235:15)
at ServerResponse.send (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/response.js:134:21)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:42:21
at safely (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:306:5)
at module.exports.catchAllHandler (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/helpers.js:41:3)
at Layer.handle_error (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:58:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:300:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:84:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Co
info: <-- POST /wd/hub/session 500 110.222 ms - 564

ntents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) context: [POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“deviceName”:“iPhone 5”,“appPackage”:“Setting”,“version”:“9.2”}}]
TypeError: Cannot set property ‘onResetTimeout’ of null
at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:252:30)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10)
at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5)
at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Reso
urces/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14)
at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/n
ode_modules/express/lib/router/layer.js:82:5)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5)
at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7
at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10)
at logger (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/morgan/index.js:136:5)

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 4.222 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 17.522 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 2.111 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.972 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.382 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: <-- GET /wd/hub/status 200 2.809 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 2.674 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: <-- GET /wd/hub/status 200 1.719 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}

Try use address 127.0.0.1 and port 4723 for your caps
Or run appium server via command: appium --address 0.0.0.0 --p 4900 (or set this params in UI Appium application)

i have changed the address and the port in the code and in the params in UI Appium application and i still have the same problem

Server logs are the same?

yes the same log in Appium server

  1. You should set path to your app in capabilities.

capabilities.setCapability(“app”, “PATH_TO_APP”);

  1. And Try use capabilities.setCapability(“deviceName”, “iPhone 5”); instead of capabilities.setCapability(CapabilityType.BROWSER_NAME, “iPhone 5”);
1 Like

i searched on the net to download any application for test but i didn’t find can you suggest to me where can i can i download it plz ?

Check here

Thank’s a lot Degard it works :smile: :smile:

1 Like

am facing similar issue can u pls help and elobrate how did you solve this
am using device name capability as well capabilities.setCapability(“app”, “PATH_TO_APP”);

i have literally tried everything… my automation was running seamlessly before and literally it stopped working suddenly…

i checked all the discussions on appium … not able to find the issue

on my IDE … it shows…
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.

below are the appium logs…

[debug] [Instruments] Attempting to run app on real device with UDID ‘baf9f892931888b3a66e70511bc4d2d213afce46’
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: ‘/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/ws/w0skf0_j6jvcj3_vn0j_lmdh0000gn/T/appium-instruments/instrumentscli0.trace -w baf9f892931888b3a66e70511bc4d2d213afce46 com.examsoft.SofTestMV12 -e UIASCRIPT “/Users/examsofttest/Library/Application Support/appium/bootstrap/bootstrap-af584f5b6c6e42b3.js” -e UIARESULTSPATH /var/folders/ws/w0skf0_j6jvcj3_vn0j_lmdh0000gn/T/appium-instruments’
[debug] [Instruments] And launch timeouts (in ms): {“global”:90000}

[iOSLog] [IOS_SYSLOG_ROW] Sep 22 13:43:10 iPad-configured-6 com.apple.xpc.launchd[1] : assertion failed: 13G34: launchd + 116796 [9F6284CF-8A17-36CC-9DB5-85D510A21F14]: 0x3

[debug] [Instruments] [INST STDERR] 2016-09-22 13:43:11.073 instruments[987:30837] WebKit Threading Violation - initial use of WebKit from a secondary thread.

[debug] [Instruments] [INST STDERR] Instruments Usage Error: Specified target process is invalid: com.XXXX.XXXXX
instruments, version 7.3 (60133)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

[debug] [Instruments] Instruments exited with code 255

[Instruments] Error launching instruments: Instruments crashed on startup

hi i am facing same issue… any one have solution for this>?
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

sudo chmod -R 777 /var/db/lockdown/

Try this command, it is related to the ideviceinstaller.

anyone have solution for this, I am also facing this problem

Hello, Please help.
This is the code I written:-
package Testcases;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;
import io.github.bonigarcia.wdm.WebDriverManager;

public class TestWebBrowser {
static AndroidDriver driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {

DesiredCapabilities capabilities=new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
capabilities.setCapability("device", "Android");
capabilities.setCapability("deviceName", "Redmi Note 11T 5G");
capabilities.setCapability("platformVersion","11");
capabilities.setCapability("platformName", "Android");


driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

driver.get("http://www.goolge.com");
Thread.sleep(10000);
driver.quit();

}
}

This is console logs:-
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’ exited with code 255’; Command output:
Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)
at android.content.ContentProvider.call(ContentProvider.java:2471)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)
at android.content.ContentProvider.call(ContentProvider.java:2471)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

Exception occurred while executing ‘delete’:
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)
at android.content.ContentProvider.call(ContentProvider.java:2471)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

Build info: version: ‘4.1.4’, revision: ‘535d840ee2’
System info: host: ‘1VXKX33’, ip: ‘192.168.18.13’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.2’
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[{browserName=Chrome, appium:device=Android, appium:deviceName=Redmi Note 11T 5G, platformName=Android, appium:platformVersion=11}], desiredCapabilities=Capabilities {browserName: Chrome, device: Android, deviceName: Redmi Note 11T 5G, platformName: Android, platformVersion: 11}}]
Capabilities {}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:126)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:146)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:180)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:567)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:225)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:164)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:79)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:87)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:116)
at Testcases.TestWebBrowser.main(TestWebBrowser.java:27)

This is appium server logs:-

The server is running

[Appium] Welcome to Appium v1.22.3

[Appium] Non-default server args:

[Appium] relaxedSecurityEnabled: true

[Appium] allowInsecure: {

[Appium] }

[Appium] denyInsecure: {

[Appium] }

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

[HTTP] Request idempotency key: b32ac6ed-f912-4e28-a4e6-d6e40f6685c2

[HTTP] --> POST /wd/hub/session

[HTTP] {“capabilities”:{“firstMatch”:[{}],“alwaysMatch”:{“appium:device”:“Android”,“appium:deviceName”:“Redmi Note 11T 5G”,“appium:platformVersion”:“11”,“browserName”:“Chrome”,“platformName”:“android”}}}

[W3C] Calling AppiumDriver.createSession() with args: [null,null,{“firstMatch”:[{}],“alwaysMatch”:{“appium:device”:“Android”,“appium:deviceName”:“Redmi Note 11T 5G”,“appium:platformVersion”:“11”,“browserName”:“Chrome”,“platformName”:“android”}}]

[BaseDriver] Event ‘newSessionRequested’ logged at 1652445952650 (18:15:52 GMT+0530 (India Standard Time))

[Appium]

[Appium] ======================================================================

[Appium] DEPRECATION WARNING:

[Appium]

[Appium] The ‘automationName’ capability was not provided in the desired

[Appium] capabilities for this Android session

[Appium]

[Appium] Setting ‘automationName=UiAutomator2’ by default and using the

[Appium] UiAutomator2 Driver

[Appium]

[Appium] The next major version of Appium (2.x) will require the

[Appium] ‘automationName’ capability to be set for all sessions on all

[Appium] platforms

[Appium]

[Appium] In previous versions (Appium <= 1.13.x), the default was

[Appium] ‘automationName=UiAutomator1’

[Appium]

[Appium] If you wish to use that automation instead of UiAutomator2, please

[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities

[Appium]

[Appium] For more information about drivers, please visit

[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the

[Appium] ‘Drivers’ menu

[Appium]

[Appium] ======================================================================

[Appium]

[Appium] Appium v1.22.3 creating new AndroidUiautomator2Driver (v1.70.1) session

[Appium] Applying relaxed security to ‘AndroidUiautomator2Driver’ as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure

[BaseDriver] Creating session with W3C capabilities: {

[BaseDriver] “alwaysMatch”: {

[BaseDriver] “browserName”: “Chrome”,

[BaseDriver] “platformName”: “android”,

[BaseDriver] “appium:device”: “Android”,

[BaseDriver] “appium:deviceName”: “Redmi Note 11T 5G”,

[BaseDriver] “appium:platformVersion”: “11”

[BaseDriver] },

[BaseDriver] “firstMatch”: [

[BaseDriver] {}

[BaseDriver] ]

[BaseDriver] }

[BaseDriver] The following capabilities were provided, but are not recognized by Appium:

[BaseDriver] device

[BaseDriver] Session created with session id: 049ff078-262b-4469-b431-f584d7604201

[UiAutomator2] We’re going to run a Chrome-based session

[UiAutomator2] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main

[UiAutomator2] Starting ‘com.android.chrome’ directly on the device

[ADB] Found 2 ‘build-tools’ folders under ‘C:\Users\harbanslal\AppData\Local\Android\Sdk’ (newest first):

[ADB] C:/Users/harbanslal/AppData/Local/Android/Sdk/build-tools/32.1.0-rc1

[ADB] C:/Users/harbanslal/AppData/Local/Android/Sdk/build-tools/32.0.0

[ADB] Using ‘adb.exe’ from ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe’

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server’

[AndroidDriver] Retrieving device list

[ADB] Trying to find a connected android device

[ADB] Getting connected devices

[ADB] Connected devices: [{“udid”:“R8S8DAEYFA4PVOIF”,“state”:“device”}]

[AndroidDriver] Looking for a device with Android ‘11.0.0’

[ADB] Setting device id to R8S8DAEYFA4PVOIF

[ADB] Getting device platform version

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell getprop ro.build.version.release’

[ADB] Current device property ‘ro.build.version.release’: 11

[AndroidDriver] Using device: R8S8DAEYFA4PVOIF

[ADB] Using ‘adb.exe’ from ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe’

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server’

[ADB] Setting device id to R8S8DAEYFA4PVOIF

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell getprop ro.build.version.sdk’

[ADB] Current device property ‘ro.build.version.sdk’: 30

[ADB] Getting device platform version

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell getprop ro.build.version.release’

[ADB] Current device property ‘ro.build.version.release’: 11

[ADB] Device API level: 30

[UiAutomator2] Relaxing hidden api policy

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell ‘settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1’’

[UiAutomator2] Deleting UiAutomator2 session

[UiAutomator2] Restoring hidden api policy to the device default configuration

[ADB] Running ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’

[BaseDriver] Event ‘newSessionStarted’ logged at 1652445953890 (18:15:53 GMT+0530 (India Standard Time))

[W3C] Encountered internal error running command: Error executing adbExec. Original error: ‘Command ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’ exited with code 255’; Command output:

[W3C] Exception occurred while executing ‘delete’:

[W3C] java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

[W3C] at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)

[W3C] at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)

[W3C] at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)

[W3C] at android.content.ContentProvider.call(ContentProvider.java:2471)

[W3C] at android.content.ContentProvider$Transport.call(ContentProvider.java:517)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)

[W3C] at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)

[W3C] at android.os.ShellCommand.exec(ShellCommand.java:44)

[W3C] at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)

[W3C] at android.os.Binder.shellCommand(Binder.java:929)

[W3C] at android.os.Binder.onTransact(Binder.java:813)

[W3C] at android.os.Binder.execTransactInternal(Binder.java:1159)

[W3C] at android.os.Binder.execTransact(Binder.java:1123)

[W3C]

[W3C] Exception occurred while executing ‘delete’:

[W3C] java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

[W3C] at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)

[W3C] at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)

[W3C] at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)

[W3C] at android.content.ContentProvider.call(ContentProvider.java:2471)

[W3C] at android.content.ContentProvider$Transport.call(ContentProvider.java:517)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)

[W3C] at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)

[W3C] at android.os.ShellCommand.exec(ShellCommand.java:44)

[W3C] at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)

[W3C] at android.os.Binder.shellCommand(Binder.java:929)

[W3C] at android.os.Binder.onTransact(Binder.java:813)

[W3C] at android.os.Binder.execTransactInternal(Binder.java:1159)

[W3C] at android.os.Binder.execTransact(Binder.java:1123)

[W3C]

[W3C] Exception occurred while executing ‘delete’:

[W3C] java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

[W3C] at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2118)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1294)

[W3C] at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1286)

[W3C] at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1257)

[W3C] at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:461)

[W3C] at android.content.ContentProvider.call(ContentProvider.java:2471)

[W3C] at android.content.ContentProvider$Transport.call(ContentProvider.java:517)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:399)

[W3C] at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:281)

[W3C] at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)

[W3C] at android.os.ShellCommand.exec(ShellCommand.java:44)

[W3C] at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)

[W3C] at android.os.Binder.shellCommand(Binder.java:929)

[W3C] at android.os.Binder.onTransact(Binder.java:813)

[W3C] at android.os.Binder.execTransactInternal(Binder.java:1159)

[W3C] at android.os.Binder.execTransact(Binder.java:1123)

[W3C]

[W3C] Error: Command ‘C:\Users\harbanslal\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s R8S8DAEYFA4PVOIF shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’ exited with code 255

[W3C] at ChildProcess. (C:\Users\harbanslal\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\teen_process\lib\exec.js:113:19)

[W3C] at ChildProcess.emit (events.js:203:13)

[W3C] at maybeClose (internal/child_process.js:1021:16)

[W3C] at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

[HTTP] <-- POST /wd/hub/session 500 1279 ms - 10477

[HTTP]