Frank icon indicating copy to clipboard operation
Frank copied to clipboard

frank could not launch simulator after update xcode to 5.1

Open roy-tang-hs opened this issue 11 years ago • 25 comments

Just update xcode to 5.1, after that unable to launch the simulator.

Details:

Frank Launch.

LAUNCHING APP... sh: line 1: 44406 Trace/BPT trap: 5 /Library/Ruby/Gems/1.8/gems/sim_launcher-0.4.6/lib/sim_launcher/../../native/ios-sim "showsdks" 2>&1 sh: line 1: 44409 Trace/BPT trap: 5 /Library/Ruby/Gems/1.8/gems/sim_launcher-0.4.6/lib/sim_launcher/../../native/ios-sim "launch" "/Users/royt/practice/temp/Frank/frankified_build/Frankified.app" "--sdk" "" "--family" "iphone" "--exit" 2>&1

I believe this was caused by xcode 5.1, any change I could make on the Frank side to solve this problem? Thanks

roy-tang-hs avatar Mar 13 '14 00:03 roy-tang-hs

+1

forrestgrant avatar Mar 13 '14 13:03 forrestgrant

I just released a new version of the sim_launcher gem. Can you update to the latest of that gem (0.4.9) and then try again?

moredip avatar Mar 14 '14 05:03 moredip

I updated, but same result. I just get: PING FAILED

I'm using RubyMotion, if that helps.

Gem Versions:

frank-cucumber (1.2.2)
motion-frank (1.2.2.0)
sim_launcher (0.4.9)

forrestgrant avatar Mar 14 '14 11:03 forrestgrant

We have tried 0.4.9 locally to and it gives me following:

361:404: execution error: System Events got an error: Can’t get window 1 of process "iPhone Simulator". Invalid index. (-1719)

I have following setup

frank-cucumber (1.2.2)
sim_launcher (0.4.9)

Basically you can see Simulator window for a second and than it's crashing.

RayAnd avatar Mar 14 '14 11:03 RayAnd

thanks @moredip, after upgrading gem_launcher to 0.4.9, I am able to launch the simulator and my tests start to run. There is an error msg: xcode-select: Error: unknown command option '-p'.

Besides this, the simulator was launched at 3.5 inch screen every time and I am unable to switch to 4 inch. Any idea I could solve this on my side? My test requires 4 inch screen.

roy-tang-hs avatar Mar 14 '14 17:03 roy-tang-hs

Since @zijunt mentioned the screen size, I'm trying to run on the iPad simulator. Not sure if that makes a difference.

forrestgrant avatar Mar 14 '14 17:03 forrestgrant

Any updates, @moredip?

forrestgrant avatar Mar 18 '14 22:03 forrestgrant

I finally got it to work. After a lot of digging, I discovered that I had a few versions of ios-sim installed via npm, and nvm. If anyone else is still having issues, try which ios-sim, if you get anything except ios-sim not found, chances are there is another version overriding sim_launcher.

Thanks for the great stuff, @moredip, I love testing with frank!

forrestgrant avatar Mar 19 '14 00:03 forrestgrant

Contrary to the comment above, the problem for me is that I actually needed to get ios-sim into my bundle in order to get the simulator to launch. For multiple tests, I quit and restart the simulator every time. However, I cannot seem to get it running on a 4 inch simulator (7.1). Anyone else faced this problem?

atirodkar3 avatar Mar 21 '14 05:03 atirodkar3

Just FYI, I had the same thing happen to me today after a fresh install of Frank and the sample app. A

gem install sim_launcher

Fixed my issue (the gem wasn't installed previously). May want to add that to the installation instructions.

michaelhayman avatar Mar 21 '14 15:03 michaelhayman

Any update to launch 4 inch simulator? Thx

roy-tang-hs avatar Mar 26 '14 18:03 roy-tang-hs

Updating the sim_launcher worked for me. There are a set of parameters that sim_launcher requires. Hardcoding them to your environment should get you past any problems.

atirodkar3 avatar Mar 26 '14 20:03 atirodkar3

But I still am not able to get Simulator Version 7.1 running.

atirodkar3 avatar Mar 27 '14 03:03 atirodkar3

same, still have an issue

361:404: execution error: System Events got an error: Can’t get window 1 of process "iPhone Simulator". Invalid index. (-1719)

with latest setup of Frank and Sim Launcher on completely new System install.

RayAnd avatar Mar 27 '14 09:03 RayAnd

@moredip, can you please update the frank-cucumber gem to require sim-launcher 0.4.9?

joemasilotti avatar Mar 29 '14 22:03 joemasilotti

Can someone tell me where and which are the parameters I need to change so that frank launch opens the 4 inch simulator by default?

lor555 avatar Apr 04 '14 21:04 lor555

+1 Still having this issue. Can someone please post the solution?

dnwood avatar Apr 09 '14 21:04 dnwood

+1 It will be great to drive a command like this: -device "iPhone (Retina 4-inch)".

pmor13 avatar Apr 25 '14 22:04 pmor13

I might be mistaken but I believe it will just frankify your last build, so if you want to run frank for a specific configuration build the app in that way.

Thanks Steven Solomon

Sent from my Apple Lisa.

On Apr 25, 2014, at 6:07 PM, Pavel Morozkin [email protected] wrote:

+1 It will be great to drive a command like this: -device "iPhone (Retina 4-inch)".

— Reply to this email directly or view it on GitHub.

soonernotfaster avatar Apr 25 '14 22:04 soonernotfaster

This is still an issue for me. I am unable to launch the simulator in 4-inch. It always launches in 3.5-inch. Can we get this fixed please?

athenatk avatar Apr 28 '14 16:04 athenatk

Here we are in August, is there still no way to launch the simulator with the 4 inch screen?

npahucki avatar Aug 20 '14 14:08 npahucki

In case this helps anyone else, here is a work around if you're primarily interested in running with larger devices. Open /gems/ruby-2.1.2/gems/sim_launcher-0.4.11/lib/sim_launcher/simulator.rb and find the line 'def launch_ios_app(app_path, sdk_version, device_family, app_args = nil)' (line 48 in v0.4.11). Scroll down a few lines (line 55 in v0.4.11) to find the line:

run_synchronous_command( :launch, app_path,'--sdk', sdk_version, '--family', device_family, '--exit', *args )

Change this to (insert the --tall and --retina):

run_synchronous_command( :launch, app_path, '--tall','--retina'  ,'--sdk', sdk_version, '--family', device_family, '--exit', *args )

The --tall and --retina will get you the iphone 5.0 simulator. If you want other device types, see https://github.com/phonegap/ios-sim/blob/master/README.md for other options you could use.

HTH.

npahucki avatar Aug 20 '14 14:08 npahucki

Tried couple of things, no luck. Still running into same issue.

Updated the sim_launcher (0.5.0) but later it conflicts with frank build /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'sim_launcher' (~> 0.4.6) - did find: sim_launcher-0.5.0

Updated frank to latest, thinking it will refer latest sim_launcher. But it doesn't seem to be the case. I have xcode v7.2 installed.

Would be great if someone can look at it and fix the issue at the earliest.

Regards, Vijay

veswaran avatar Mar 02 '16 12:03 veswaran

Looks like with brew install ios-sim, above issue is fixed. Able to launch the app using frank now.

brew install ios-sim

veswaran avatar Mar 02 '16 12:03 veswaran

Still seeing this issue in a fresh RubyMotion app

* CFPropertyList (2.3.4)
* activesupport (5.0.1)
* builder (3.2.3)
* bundler (1.13.6)
* claide (1.0.1)
* colored (1.2)
* concurrent-ruby (1.0.4)
* cucumber (2.4.0)
* cucumber-core (1.5.0)
* cucumber-wire (0.0.1)
* diff-lcs (1.3)
* dnssd (3.0.1)
* frank-cucumber (1.2.2)
* gherkin (4.0.0)
* i18n (0.7.0)
* json (2.0.3)
* minitest (5.10.1)
* motion-frank (1.2.2.0)
* multi_json (1.12.1)
* multi_test (0.1.2)
* nanaimo (0.2.3)
* plist (3.2.0)
* rack (1.6.5)
* rack-protection (1.5.3)
* rake (12.0.0)
* rspec (3.5.0)
* rspec-core (3.5.4)
* rspec-expectations (3.5.0)
* rspec-mocks (3.5.0)
* rspec-support (3.5.0)
* sim_launcher (0.5.0)
* sinatra (1.4.7)
* thor (0.19.4)
* thread_safe (0.3.5)
* tilt (2.0.5)
* tzinfo (1.2.2)
* xcodeproj (1.4.2)

I've updated brew install ios-sim, but still no luck.

Bodacious avatar Jan 24 '17 12:01 Bodacious