1

General description of a problem:

Because of project specific (iDevice has to be connected to the external hardware via Lightning port) we have to execute our pack of tests over Wi-fi.

There is dedicated Macbook Pro(early 2011) with Yosemite 10.10.2 working as a client for tests execution. Both Mac and iDevice are connected to the same isolated (1 Mac and 1 iDevice only) Wi-Fi access point (without access to the internet).

Each time I'm trying to execute all the suite of existing tests (~150 tests) I'm facing the fact that at some random point (i.e. some tests have already been executed by that time) the application with Calabash server is launched visually on iDevice-side but from command line perspective the server seem to not respond to the Mac-client that it has launched successfully (just my assumption) and the whole execution just gets stuck at this point. If I drop tests execution via "Ctrl+C" and try to start the execution again or execute start_test_server_in_background via console I'll see that the application server is started and closed immediately for number of times without any luck to establish new stable application server.

The only workaround here is to reboot the iDevice and to launch the App server after reboot with iDevice connected via USB and only then I'll be able to run Calabash tests over Wi-fi again.

I've tried to play with many different iDevices and different Wi-Fi access points, and several Mac's as well, but with no luck to have a single solid unbroken run for all tests.

Would be veeeerry glad if someone helps me resolve this incredibly annoying issue.

Some details:

  • iOS version: 8.1.3, 8.2
  • XCode version: 6.2
  • Mac OS version: 10.10.2
  • Xcode path: /Applications/Xcode.app/Contents/Developer
  • Calabash version: 0.13.0 (and 0.14.0)
  • calabash.framework version: 0.13.0 (and 0.14.0)
  • Here's the console output (with DEBUG=1) when the 'hang' occurs:
@test
Scenario: [12657] Scenario Name # features/2_feature_name.feature:87

INFO: Using uia strategy: 'host'
Preparation took 0.099263 seconds
{
                        :app => "com.xxx.one",
                       :args => [],
    :bundle_dir_or_bundle_id => "com.xxx.one",
                  :bundle_id => "com.xxx.one",
                     :device => "com.xxx.one",
              :device_target => "00fea94be88909c74aa7b68a2b7f3f339407163b",
              :launch_method => :instruments,
             :launch_retries => 5,
                   :log_file => "/var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/run_loop.out",
                  :no_launch => false,
                    :no_stop => false,
                      :reset => false,
                :results_dir => "/var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1",
          :results_dir_trace => "/var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/trace",
                     :script => "/var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/_run_loop.js",
                :sdk_version => nil,
                       :udid => "00fea94be88909c74aa7b68a2b7f3f339407163b",
               :uia_strategy => :host,
                      :xcode => "6.2",
                 :xcode_path => "/Applications/Xcode.app/Contents/Developer"
}

### Starting on 00fea94be88909c74aa7b68a2b7f3f339407163b App: com.xxx.one ###
2015-04-08 12:38:22 +0300 xcrun instruments -w 00fea94be88909c74aa7b68a2b7f3f339407163b -D /var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/trace -t Automation com.dxo.one -e UIARESULTSPATH /var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1 -e UIASCRIPT /var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/_run_loop.js >& /var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150408-59711-1rjd4d1/run_loop.out 

UPDATE: Here's what the Calabash prints out to the terminal when it's impossible for it to relaunch the application after it gets stuck:

    Calabash::Cucumber::Launcher::StartError: Time out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError. 
      Logfile /var/folders/4w/tw3_yvd54sq9brl1kxf9cy8c0000gp/T/run_loop20150422-35789-1mgrom1/run_loop.out 

      2015-04-22 11:03:41.649 instruments[35913:114217] WebKit Threading Violation - initial use of WebKit from a secondary thread.
     Instruments Trace Error : Target failed to run: Failed looking up pid of launched process

      (Calabash::Cucumber::Launcher::StartError)
     /Users/wrathttodd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/calabash-cucumber-0.14.0/lib/calabash-cucumber/launcher.rb:772:in `new_run_loop'
     /Users/wrathttodd/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/calabash-cucumber-0.14.0/lib/calabash-cucumber/launcher.rb:630:in `relaunch'
     /Users/wrathttodd/APP NAME/PATH/AAT/features/support/01_launch.rb:27:in `Before'
  • I am running calabash-ios tests using wifi only, I have not faced this issue!..... When do you face this issue? Repeatability? – Aravin Sep 21 '15 at 12:03

0 Answers0