Muhammad Saqib
Muhammad Saqib

Reputation: 991

Unable to run automation script using Calabash Xcode 7

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

Upvotes: 0

Views: 499

Answers (1)

jmoody
jmoody

Reputation: 2480

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.

Upvotes: 1

Related Questions