3

I'm using Calabash to automate some tests with the UI but I'm having some issues.

I have a step as follows: Then I touch the "login" button.

When I run cucumber, the console throws this error:

Could not parse response ''; the app has probably crashed (RuntimeError)

Environment:

  • Calabash 0.11.0
  • Xcode 6.3.2
  • iPhone 5 (8.3 Simulator)

Steps to reproduce:

  • Build app to iPhone 5 8.3 simulator
  • Execute: DEBUG=1 calabash-ios console
  • Execute: start_test_server_in_background
  • Execute: touch("button marked:'login'")

Console trace:

RuntimeError: Could not parse response ''; the app has probably crashed from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:33:in rescue in uia' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:30:in uia' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:454:in uia_handle_command' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:201:in uia_tap_offset' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/actions/instruments_actions.rb:93:in query_action' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/actions/instruments_actions.rb:15:in touch' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/core.rb:1166:in query_action_with_options' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/core.rb:177:in touch' from (irb):2 from /Users/felipepenariveros/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in <main>'

It might be related to this issue already closed in Github: https://github.com/calabash/calabash-ios/issues/600

Does anyone know how can I solve this?

Felipe Peña
  • 2,712
  • 4
  • 22
  • 41

2 Answers2

0

I solved this issue.

In the simulator, I chose Reset Content & Settings... and it worked.

Thanks though for helping out! (@jmoody & @Lasse).

Felipe Peña
  • 2,712
  • 4
  • 22
  • 41
  • 1
    I have the same problem but it was not solved by "Reset Content & Settings..."Any other ideas? – YKa Jun 25 '15 at 06:20
  • It was a bit too much to explain here so I made another question here http://stackoverflow.com/questions/31062753/cant-update-calabash-server-version – YKa Jun 26 '15 at 00:00
0

I had a similar issue on my project (Xcode 7.0.1, iOS 9.0.2 on a physical device (iPod touch), Calabash 0.14.3).

What worked for me was changing the :uia_strategy from :shared_strategy to :host. So now my before scenario block in features/support/01_launch.rb looks like this:

Before do |scenario|
  options = {
    :uia_strategy => :host      #used to be shared_strategy - but that failed
  }
  @calabash_launcher = Calabash::Cucumber::Launcher.new
  unless @calabash_launcher.calabash_no_launch?
    @calabash_launcher.relaunch(options)
    @calabash_launcher.calabash_notify(self)
  end
end

Hopefully this helps someone else down the line who is racking their brain over a similar issue.

eyekeyknee
  • 31
  • 1
  • 1