Appium can't connect to local device on mac?

283 views
Skip to first unread message

daniel....@chloeandisabel.com

unread,
Feb 12, 2014, 11:24:54 AM2/12/14
to appium-...@googlegroups.com
Hi, I'm not sure exactly what I'm doing wrong...but it seems that Appium is having issues connecting to an android device connected via USB. First, after plugging in the device, I do not get any output when running 'adb devices' -- however, I've installed Android File Transfer and can see that the device is in fact connected. My desired capabilities hash is very simple:

capabilities = {
  'device' => 'android',
  'app' => 'chrome'
}

I do not have an app installed on the device, it is merely supposed to open chrome and navigate to our website. I was able to successfully run tests on an emulator, but it took very long, so I'm trying to get it to run on a real device in the hopes that it will speed up runtime. What am I missing here? Do I need to set up an AVD even though I'm connecting a real device? Also, it seems to timeout after trying to install this apk. Maybe its reading that the device is there and just failing on this install? Help please!

[daniel.hillman@fahim-spare-mac: ~] $  info: Welcome to Appium v0.14.2
info: Appium REST http interface listener started on 0.0.0.0:4723
   info  - socket.io started
info: Not spawning instruments force-quit watcher since it only works on 10.9 and you have 10.8.5
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"device":"android","app":"chrome"}}
info: Looks like we want chrome on android
info: Creating new appium session b68cc156-7e19-4502-a6f5-ecae8a0ace18
info: Ensuring Chromedriver exists
debug: Pushing unlock helper app to device...
debug: executing: adb install /usr/local/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk
POST /wd/hub/session 200 59997ms

Jonathan Lipps

unread,
Feb 12, 2014, 1:22:40 PM2/12/14
to daniel....@chloeandisabel.com, appium-...@googlegroups.com
run `adb kill-server && adb devices` until you get correct output

to run against a real device, add `-U <device_id>` to the appium command to make appium use it.

--
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/groups/opt_out.

daniel....@chloeandisabel.com

unread,
Feb 12, 2014, 2:42:28 PM2/12/14
to appium-...@googlegroups.com, daniel....@chloeandisabel.com
Hi,

When I run `adb kill-server && adb devices` I receive the following output:

[daniel.hillman@fahim-spare-mac: ~] $  adb kill-server && adb devices
* daemon not running. starting it now on port 5037 *
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon

What does this mean? :-(

daniel....@chloeandisabel.com

unread,
Feb 12, 2014, 3:08:46 PM2/12/14
to appium-...@googlegroups.com, daniel....@chloeandisabel.com
Alright, I think my mistake was that I didn't have dev mode enabled on the device. I have that enabled now...but when I run rspec on a simple appium test, it still hangs at the same place:

debug: executing: adb install /usr/local/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk

daniel....@chloeandisabel.com

unread,
Feb 12, 2014, 3:48:43 PM2/12/14
to appium-...@googlegroups.com, daniel....@chloeandisabel.com
Also, I seem to have an issue where (if the device is already unlocked) and chrome is launched, it continually prompts me to sign in to my google account, etc. Whether I do, or hit 'No Thanks' the test fails. Does anyone else have this issue?
Reply all
Reply to author
Forward
0 new messages