ruby - How to prevent calabash-android "App did not start" error? -


i work on linux pc,

ensured androidmanifest.xml has permission internet. tried command both , without proxy, observation same.

my real device has 4.1.1 android software,

avd has 4.2.2 android api level 17, problem?

i observe that, sample demo app gets launched on device, while run 'calabash-android run androiddemoproject.apk... command throws error saying "app did not start" (runtimeerror).

error details:

feature: demo feature    scenario: can start app                             # features/my_first.feature:3     wait "hello world, androiddemoproject" appear 3707 kb/s (553745 bytes in 0.145s) 3045 kb/s (36301 bytes in 0.011s)   app did not start (runtimeerror)   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:512:in `start_test_server_in_background'   /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:31:in `perform'   /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:59:in `retriable'   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:511:in `start_test_server_in_background'   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:92:in `start_test_server_in_background'   /home/vijayvk/downloads/androiddemoproject/calabash/features/support/app_life_cycle_hooks.rb:15:in `before'  failing scenarios: cucumber features/my_first.feature:3 # scenario: can start app wait "hello world, androiddemoproject" appear  1 scenario (1 failed) 0 steps 0m22.337s ===========================================================================  $calabash-android run ../androiddemoproject.apk --verbose, leads below output  013-09-04 15:42:45 - /usr/bin/ruby1.8 -s cucumber --verbose main_activity=sh.calaba.demoproject.androiddemoprojectactivity app_path="/home/vijayvk/downloads/androiddemoproject/androiddemoproject.apk" test_app_path="test_servers/d06f94e698e2dfae7d59f229087ea78f_0.4.9.apk" code:   * features/support/env.rb   * features/support/app_installation_hooks.rb   * features/support/app_life_cycle_hooks.rb   * features/support/hooks.rb   * features/step_definitions/calabash_steps.rb  features:   * features/my_first.feature parsing feature files took 0m0.002s   feature: demo feature    scenario: can start app                             # features/my_first.feature:3     wait "hello world, androiddemoproject" appear 2013-09-04 15:42:46 - first scenario in feature - reinstalling apps 2013-09-04 15:42:46 - "/home/vijayvk/development/adt-bundle-linux-x86-20130219/sdk/platform-tools/adb" -s 00000d6300009613 forward tcp:34777 tcp:7102 2013-09-04 15:42:46 - 2013-09-04 15:42:46 - uninstalling: sh.calaba.demoproject.test 2013-09-04 15:42:47 - success 2013-09-04 15:42:47 - uninstalling: sh.calaba.demoproject 2013-09-04 15:42:49 - success 2013-09-04 15:42:49 - installing: test_servers/d06f94e698e2dfae7d59f229087ea78f_0.4.9.apk 3153 kb/s (553745 bytes in 0.171s) 2013-09-04 15:42:54 -     pkg: /data/local/tmp/d06f94e698e2dfae7d59f229087ea78f_0.4.9.apk success 2013-09-04 15:42:55 - installing: /home/vijayvk/downloads/androiddemoproject/androiddemoproject.apk 4513 kb/s (36306 bytes in 0.007s) 2013-09-04 15:42:56 -     pkg: /data/local/tmp/androiddemoproject.apk success 2013-09-04 15:42:59 - waking device using: 2013-09-04 15:42:59 - "/home/vijayvk/development/adt-bundle-linux-x86-20130219/sdk/platform-tools/adb" -s 00000d6300009613 shell start -a android.intent.action.main -n sh.calaba.demoproject.test/sh.calaba.instrumentationbackend.wakeup starting: intent { act=android.intent.action.main cmp=sh.calaba.demoproject.test/sh.calaba.instrumentationbackend.wakeup } 2013-09-04 15:43:01 - starting test server using: 2013-09-04 15:43:01 - "/home/vijayvk/development/adt-bundle-linux-x86-20130219/sdk/platform-tools/adb" -s 00000d6300009613 shell instrument -e class sh.calaba.instrumentationbackend.instrumentationbackend -e target_package sh.calaba.demoproject -e test_server_port 7102 -e main_activity sh.calaba.demoproject.androiddemoprojectactivity -e debug false sh.calaba.demoproject.test/sh.calaba.instrumentationbackend.calabashinstrumentationtestrunner    app did not start (runtimeerror)   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:512:in `start_test_server_in_background'   /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:31:in `perform'   /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:59:in `retriable'   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:511:in `start_test_server_in_background'   /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:92:in `start_test_server_in_background'   /home/vijayvk/downloads/androiddemoproject/calabash/features/support/app_life_cycle_hooks.rb:15:in `before'  failing scenarios: cucumber features/my_first.feature:3 # scenario: can start app wait "hello world, androiddemoproject" appear  1 scenario (1 failed) 0 steps 0m26.737s ==========================================================================  $ calabash-android console androiddemoproject/androiddemoproject.apk  no test server found combination of app , calabash version. recreating test server. done signing test server. moved test_servers/d06f94e698e2dfae7d59f229087ea78f_0.4.9.apk  irb(main):004:0> argv << "-v" [     [0] "--readline",     [1] "--prompt-mode",     [2] "simple",     [3] "-v" ] irb(main):005:0> start_test_server_in_background 2013-09-04 16:29:06 - starting test server using: 2013-09-04 16:29:06 - "/home/vijayvk/development/adt-bundle-linux-x86-20130219/sdk//platform-tools/adb" -s 00000d6300009613 shell instrument -e test_server_port 7102 -e class sh.calaba.instrumentationbackend.instrumentationbackend -e debug false -e target_package sh.calaba.demoproject -e main_activity sh.calaba.demoproject.androiddemoprojectactivity sh.calaba.demoproject.test/sh.calaba.instrumentationbackend.calabashinstrumentationtestrunner runtimeerror: app did not start     /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:512:in `start_test_server_in_background'     /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:31:in `perform'     /usr/lib/ruby/gems/1.8/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:59:in `retriable'     /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:511:in `start_test_server_in_background'     /usr/lib/ruby/gems/1.8/gems/calabash-android-0.4.9/lib/calabash-android/operations.rb:92:in `start_test_server_in_background'     (irb):5 

please let me know if there work around problem...

i resolve when had come across error, doing this:

1) close avd , restart

2) if (1) doesnt fix issue, uninstall app, , execute reinstall_apps app again

3) if (2) doesnt fix issue, delete test servers folder , execute start_test_server_in_background again.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -