0

I am trying to run the sample 'my_first.feature' but i am facing a problem. I am following this tutorial: codingtricky - calabash-ing-ios-applications.

And I also tried different tutorial but unable to figure out why I am getting this error. I am new in iOS-Application automation.

I have also tried this sample project on other projects, there is is working fine but it is not working in my live project. For me application launch and disappears.

$ APP_BUNDLE_PATH=<snip>/Build/Products/De‌​bug-iphonesimulator/My-cal.app \
DEVICE_TARGET='iPhone 5s - Simulator - iOS 9.0' \
cucumber
Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version
      Calabash::Cucumber::Launcher::StartError: 

      "Timed out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.

      Logfile: /var/folders/l1/2s2v4t051fxggjhtc4v66jwr0000gn/T/run_loop20150921-15728-1m5g7xc/run_loop.out

      2015-09-21 14:40:58.923 instruments[16900:141832] Attempting to change eventInstruments Trace Complete (Duration : 1.140556s; Output : /var/folders/l1/2s2v4t051fxggjhtc4v66jwr0000gn/T/run_loop20150921-15728-1m5g7xc/trace.trace)


       (Calabash::Cucumber::Launcher::StartError)
      /Users/People/.rvm/gems/ruby-2.2.1/gems/calabash-cucumber-0.16.3/lib/calabash-cucumber/launcher.rb:778:in `new_run_loop'
      /Users/People/.rvm/gems/ruby-2.2.1/gems/calabash-cucumber-0.16.3/lib/calabash-cucumber/launcher.rb:635:in `relaunch'
          /Users/People/Desktop/SVNProject/Emirates_UniversalApp/MyTrips_Redesign/iPHONE/EKiPhone/features/support/01_launch.rb:27:in `Before'

I also tried setting DEVICE_UDID

jmoody
  • 2,480
  • 1
  • 16
  • 22
Muhammad Saqib
  • 993
  • 2
  • 15
  • 37
  • 1
    Have you tried setting the `APP_BUNDLE_PATH`? http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html – jmoody Sep 22 '15 at 08:51
  • Yes i have tried this but no luck. I have also tried APP_BUNDLE_PATH=/Users/******/Library/Developer/Xcode/DerivedData/*********/Build/Products/Debug-iphonesimulator/*****-cal.app DEVICE_TARGET='iPhone 5s - Simulator - iOS 9.0' cucumber and APP_BUNDLE_PATH=/Users/******/Library/Developer/Xcode/DerivedData/*********/Build/Products/Debug-iphonesimulator/*****-cal.app DEVICE_UDID='*************************' cucumber – Muhammad Saqib Oct 08 '15 at 06:28

1 Answers1

1

UPDATED

The problem, based on the comments, is that calabash setup is broken for app with watch extensions; the watch extension is linked with calabash instead of the app.

Tracking this issue here: Calabash builds/runs Apple Watch app instead of iPhone app #832

calabash setup itself has been broken since Xcode 6 for various reasons.

You'll have to link the calabash.framework to your app target. There are several ways to do this:

I also tried setting DEVICE_UDID

DEVICE_UDID is not variable that Calabash responds to. ENVIRONMENT_VARIABLES

DEVICE_TARGET='iPhone 5s - Simulator - iOS 9.0'

That is not a valid simulator name for Xcode 7. You can find valid simulator names using:

$ xcrun instruments -s devices
<snip>
iPhone 6 (9.0) [3247EF9D-069D-4233-966F-2B1D4A9042D0]

Given that output, there are 2 valid simulator DEVICE_TARGET values for the iPhone 6 iOS 9 simulator:

  1. "iPhone 6 (9.0)"
  2. 3247EF9D-069D-4233-966F-2B1D4A9042D0

Timed out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.

My best guess is that you need to restart your computer; I believe your CoreSimulator environment may be in a bad shape. If you have recently:

  • installed Xcode,
  • installed a new version of Xcode,
  • changed the location of Xcode on your hard drive (including renaming Xcode.app),
  • installed an iOS Simulator

you need to restart your computer.

calabash-cucumber-0.16.3

Can you update to 0.16.4 and run-loop 1.5.5?

If you are still unable to run, please run with DEBUG=1 and update your answer with the results.

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • I have updated to calabash-cucumber 0.16.4 and run_loop 1.5.5 and tried after restarting the mac, still facing the same issue Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version Calabash::Cucumber::Launcher::StartError: "Timed out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError. We have more than one target in our source, its taking watch app by default while running the calabash setup even though we selected the target for iPhone app. – Muhammad Saqib Oct 08 '15 at 12:03
  • 1
    RE: _it's taking watch app by default while running the calabash setup even though we selected the target for iPhone app._ Please update your question. We have found the problem. – jmoody Oct 08 '15 at 12:46
  • thank you for your reply I have watch app and also some swift code with in my iPhone project. I have tried to remove the watch app and comment all the swift code than try to run cucumber command. It start working. but when i uncomment the swift code, i start facing the same problem again. Can you please help me out in figuring out the problem I have also downloaded one code from git which contain both swift and Objective-c and tried to run cucumber command, it is also working for me – Muhammad Saqib Oct 11 '15 at 08:07
  • There are no known issues using Swift code or apps built with Swift and Calabash. – jmoody Oct 13 '15 at 05:28
  • I have solved the issue. the problem was that my project has too many frame work and i was setting Build Active architecture only in -cal frame work once i set build Active Architecture in all my frame work my script starts working. Thank you for your response Jmoody – Muhammad Saqib Oct 13 '15 at 06:23