"Could not start a new session
Be sure the Appium Server is running with an application opened by using the “App Path” parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object."
Settings I have under iOS settings,
App Path:
BundleID:
Force Device [Checked]
Platform Version 7.1 (The iOS version on real device is 7.1.2)
UDID
General Settings:
[Checked] Check for Updates
[Checked] Kill Processes Using Server Port Before Launch
[Checked] New Command Timeout 7200
[Checked] Use Colors (Under Logging section)
I tried to reboot the laptop and still seeing the same error message...
Any advice is greatly appreciate !! :)
--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.
de
bug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_service_agent: Could not look up service in the map
debug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.server service agent:InvalidService
debug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_service_agent: Could not look up service in the map
debug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.remoteserver service agent:InvalidService
debug: [INST STDERR] 2014-07-15 17:01:46.171 instruments[1719:1a03] Failed to start Instruments daemon for 'iOS' on 'Husky's iPhone 5S Golden (v7.1)' (The service is invalid.)
debug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_service_agent: Could not look up service in the map
debug: [IOS_SYSLOG_ROW ] Jul 15 17:01:47 Husky-iPhone-5S-Golden lockdownd[25] <Notice>: 01c5c000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.server service agent:InvalidService
debug: [INSTSERVER] Instruments exited with code 253
debug: Killall instruments
debug: Instruments crashed on startup
debug: Appium request initiated at /wd/hub/status
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
debug: [IOS_SYSLOG_ROW ] Jul 15 17:02:34 Husky-iPhone-5S-Golden timed[37] <Notice>: (Note ) CoreTime: Received timezone "America/New_York" from "Location"
debug: [IOS_SYSLOG_ROW ] Jul 15 17:02:34 Husky-iPhone-5S-Golden timed[37] <Notice>: (Note ) CoreTime: Current mcc: '311' simulated:'0'.
debug: [IOS_SYSLOG_ROW ] Jul 15 17:02:34 Husky-iPhone-5S-Golden timed[37] <Notice>: (Note ) CoreTime: Not setting time zone to America/New_York from LocationAndNetwork
debug: Appium request initiated at /wd/hub/status
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
****
When I try to run my test case as "Java Application", it will throw an exception with "UnreachableBrowserException:"*** Error message***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.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: ‘Husky-MacBook-Air.local', ip: '10.131.32.73', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.4', java.version: '1.8.0_05'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at com.Husky.take2.Appium_take1.main(Appium_take2.java:35)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:4444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:138)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:204)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:173)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
... 4 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
... 16 more
On Tue, Jul 15, 2014 at 5:42 PM, Appium Selenium <learnin...@gmail.com> wrote:
Hi Isaac,Yes I have done that.... I used to be able to launch the inspector and open my apps, gather all the xpath of each button. Now the inspector does not work at all.. I cant even try to run my test case as Java Project...
info: <-- GET /wd/hub/status 200 1.313 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
info: --> GET /wd/hub/status {}
debug: Appium request initiated at /wd/hub/status
info: <-- GET /wd/hub/status 200 0.996 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
debug: Appium request initiated at /wd/hub/session/fb73bf0c-8de4-4b9d-b7f7-578b23deeceb/source
info: --> GET /wd/hub/session/fb73bf0c-8de4-4b9d-b7f7-578b23deeceb/source {}
debug: Request received with params: {}
debug: Pushing command to appium work queue: "au.mainApp().getTreeForXML()"
debug: Appium request initiated at /wd/hub/status
info: --> GET /wd/hub/status {}
debug: Request received with params: {}
debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"fb73bf0c-8de4-4b9d-b7f7-578b23deeceb"}
Sure I will give it a try, is the following code good enough?***
public class Appium_take1 {
public static void main(String... args){
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("device", "iPhone");
desiredCapabilities.setCapability("version", "7.1");
desiredCapabilities.setCapability("app", "/Users/Husky/Downloads/Payload2/test.app");
desiredCapabilities.setCapability("platformName", "iOS");
desiredCapabilities.setCapability("deviceName", "iPhone");
remoteWebDriver.quit();
}
}
***
Arg okay, is this better?***
public class Appium_take1 {
public static void main(String... args){
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("app", "/Users/Husky/Downloads/Payload2/Test.app");
desiredCapabilities.setCapability("PLATFORMVERSION", "iOS");
desiredCapabilities.setCapability("DEVICENAME", "iPhone");
URL url = null;
WebDriver remoteWebDriver = new RemoteWebDriver(url,desiredCapabilities);
remoteWebDriver.quit();
}
}
***
Hi Isaac,This is the actual code, I am just following an example from a book, the code is shown below:***
public class Appium_take1 {
public static void main(String... args){
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("device", "iPhone");
desiredCapabilities.setCapability("version", "7.1");
desiredCapabilities.setCapability("app", "/Users/Husky/Downloads/Payload2/Test.app");
desiredCapabilities.setCapability("platformName", "iOS");
desiredCapabilities.setCapability("deviceName", "iPhone");
URL url = null;
try {
url = new URL("http://127.0.0.1:4723/wd/hub");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
WebDriver remoteWebDriver = new RemoteWebDriver(url,desiredCapabilities);
remoteWebDriver.get("http://www.google.com");
WebElement ele = remoteWebDriver.findElement(By.name("q"));
ele.click();
ele.sendKeys("Appium Automation on iOS");
WebElement searchButton = remoteWebDriver.findElement(By.name("btnG"));
System.out.println(searchButton.getSize());
searchButton.click();
//remoteWebDriver.quit();
}
}
***
I am a newbie to programming, all I am looking to do with Appium at this point is to launch my test app under "/Users/Husky/Downloads/Payload2/test.app", find a button base on its xpath (UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[5]/UIAStaticText[1]) and click on it.
Thats all I am looking to accomplish at the moment....:)
What do you think??
Thanks alot Issac!
Arg, I am just replying to you directly. "Appium-Discuss" list is referring to the discussion group right?You are correct, I am getting an error with that on real device, it works fine with Simulator, which can launch the Safari browser to open the google page, and click on the search field, enter text and click on the search button. :)