--
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.
[2014-03-25 21:35:48 - DeviceMonitor] Adb connection Error:EOF
[2014-03-25 21:35:48 - DeviceMonitor] Connection attempts: 1
[2014-03-25 21:35:53 - DeviceMonitor] Adb connection Error:EOF
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "ls /data/local/tmp/89f9cbdabb031a7a98713207c182219f.apk"
debug: Getting install status for com.abc.abcapp
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "pm list packages -3 com.abc.abcapp"
info: [ADB] App is not installed
debug: Printing keystore md5: "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool" -v -list -alias "leadsapp1" -keystore "/Users/jo/appium/abcapp1.keys.abc" -storepass "Password"
debug: Keystore MD5: FC:86:91:DB:4B:18:F8:72:36:11:21:22:3B:25:8E:2E
In my eclipse log:
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.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
System info: host: 'admins-MacBook-Pro-2.local', ip: '192.168.2.34', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.6.0_65'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at com.abc.android.tests.AndroidExample.setup(AndroidExample.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
at java.net.Socket.connect(Socket.java:527)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
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:319)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:298)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 30 more
SKIPPED CONFIGURATION: @AfterMethod tearDown
SKIPPED: loginTest
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================
AndroidExample.java
public class AndroidExample {
WebDriver driver = null;
@BeforeMethod
public void setup() {
try {
File appDir = new File("/Users/jo/appium/");
File app = new File(appDir, "abcApp.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
//It will launch the App in Android Device using the configurations specified in Desired Capabilities
capabilities.setCapability("device", "Android");
capabilities.setCapability("deviceType", "tablet");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability(CapabilityType.VERSION, "4.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("app", app);
// Here we mention the app's package name, to find the package name we have to convert .apk file into java class files
capabilities.setCapability("app-package", "com.abc.abcapp");
//Here we mention the activity name, which is invoked initially as app's first page.
capabilities.setCapability("app-activity", "com.abc.abcapp.activities.MainActivity");
// This is Launcher activity of your app (you can get it from apk info app)
//Create RemoteWebDriver instance and connect to the Appium server.
// URL u = new URL("http://127.0.0.1:4723/wd/hub");
// driver = new RemoteWebDriver(u, capabilities);
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
@Test
public void loginTest() throws Exception {
driver.getWindowHandle();
Thread.sleep(1000);
driver.findElement(By.id("com.abc.abcapp:id/second_menu")).click();
driver.findElement(By.xpath("//linear[1]/window[1]/linear[1]/window[1]/linear[1]/relative[2]/text[1]")).click();
}
@AfterMethod
public void tearDown() {
driver.quit();
Hi jonathan
This was working until I upgraded to 17.6. I was also running the appium as root. Now, it won't allow me to. So I have uninstalled and reinstalled node, npm etc... and chown the node_modules and other directories by googling.
When I don't launch appium with the Prelaunch Application option, and try to run my test, I get the foll. error in eclipse:[2014-03-25 21:35:48 - DeviceMonitor] Adb connection Error:EOF
[2014-03-25 21:35:48 - DeviceMonitor] Connection attempts: 1
[2014-03-25 21:35:53 - DeviceMonitor] Adb connection Error:EOF
When I run the appium with Prelaunch Application option, in the appium window I see the foll. along below the error message I sent you previously:debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "ls /data/local/tmp/89f9cbdabb031a7a98713207c182219f.apk"
debug: Getting install status for com.abc.abcapp
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "pm list packages -3 com.abc.abcapp"
info: [ADB] App is not installed
debug: Printing keystore md5: "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool" -v -list -alias "leadsapp1" -keystore "/Users/jo/appium/abcapp1.keys.abc" -storepass "Password"
debug: Keystore MD5: FC:86:91:DB:4B:18:F8:72:36:11:21:22:3B:25:8E:2E
cache.img
userdata-qemu.img
hardware-qemu.ini
debug: App was not uninstalled, maybe it wasn't on device?
info: MD5 for app is 89f9cbdabb031a7a98713207c182219f
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "ls /data/local/tmp/89f9cbdabb031a7a98713207c182219f.apk"
debug: Getting install status for com.abc.abcapp
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "pm list packages -3 com.abc.abcapp"
info: [ADB] App is not installed
debug: Printing keystore md5: "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool" -v -list -alias "abcapp1" -keystore "/Users/jo/appium/abcapp1.keys.abc" -storepass "abc"
debug: Keystore MD5: FC:86:91:DB:4B:18:F8:72:36:21:21:22:3B:25:8E:99
What am I missing here?
Jo
This was working until I upgraded to 17.6. I was also running the appium as root. Now, it won't allow me to. So I have uninstalled and reinstalled node, npm etc... and chown the node_modules and other directories by googling.Yes, unfortunately too many people were running into issues caused by running appium under sudo, so we disallowed it.When I don't launch appium with the Prelaunch Application option, and try to run my test, I get the foll. error in eclipse:[2014-03-25 21:35:48 - DeviceMonitor] Adb connection Error:EOF
[2014-03-25 21:35:48 - DeviceMonitor] Connection attempts: 1
[2014-03-25 21:35:53 - DeviceMonitor] Adb connection Error:EOF
I don't know what this means. Are you using Eclipse to talk to ADB? That might not work while we're running a test with Appium. I dunno.
When I run the appium with Prelaunch Application option, in the appium window I see the foll. along below the error message I sent you previously:
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "ls /data/local/tmp/89f9cbdabb031a7a98713207c182219f.apk"
debug: Getting install status for com.abc.abcapp
debug: executing: "/Users/jo/android-sdks/platform-tools/adb" -s emulator-5554 shell "pm list packages -3 com.abc.abcapp"
info: [ADB] App is not installed
debug: Printing keystore md5: "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool" -v -list -alias "abcapp1" -keystore "/Users/jo/appium/abcapp1.keys.abc" -storepass "Password"
debug: Keystore MD5: FC:86:91:DB:4B:18:F8:72:36:11:21:22:3B:25:8E:2E
info: Sent shutdown command, waiting for UiAutomator to stop...
warn: UiAutomator did not shut down fast enough, calling it gone
error: Failed to start an Appium session, err was: Error: Could not find Galaxy emulator.
info: Cleaning up android objects
info: Cleaning up appium session
debug: 127.0.0.1 - - "POST /wd/hub/session HTTP/1.1" 500 212 "-" "-"
info: Error: Could not find Galaxy emulator.
at ADB.getRunningAVDWithRetry (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:710:15)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:770:10)
at ADB.checkSdkBinaryPresent (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:105:5)
at ADB.launchAVD (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:744:8)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/android-common.js:299:16)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:688:14)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:837:5)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:819:7)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/adb.js:153:5
at ChildProcess.exithandler (child_process.js:635:7)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find Galaxy emulator.)","origValue":"Could not find Galaxy emulator."},"sessionId":null}
POST /wd/hub/session 500 128195ms - 212b
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}
debug: Request received with params: {}
debug: 127.0.0.1 - - "GET /wd/hub/status HTTP/1.1" 200 144 "-" "Appium (unknown version) CFNetwork/673.2.1 Darwin/13.1.0 (x86_64) (MacBookPro11%2C3)"
GET /wd/hub/status 200 2ms - 144b