Launching app using fruitstrap

1,812 views
Skip to first unread message

Maggie Yu

unread,
Apr 1, 2013, 1:52:00 PM4/1/13
to frank-...@googlegroups.com
Hi,

I am trying to launch my app using fruitstrap with the -d debug flag. But after the app is installed on my device, I got an error "Segmentation fault: 11" in the Debug phase. Has anyone seen this problem before? How do I fix it? Thanks!

Levi Wilson

unread,
Apr 17, 2013, 8:06:01 PM4/17/13
to frank-...@googlegroups.com
I'm seeing the exact same thing.  I know that the fruitstrap project has diverged from the original author, but when I do the following:
I am able then to have my application launched via ./fruitstrap -d -b <path to my app>.app

I'm not sure how to fix this, however.  If I do the above steps to at least get my application to launch, frank is unable to communicate with my app :(  I'd be happy to try anything if anyone can offer any suggestions.  I'm on OSX 10.8.3.  I tried poking around with the differences in the above repos, and can only note the following differences:

  • the one that worked for me used clang vs. gcc to build fruitstrap.c
  • the GDB_SHELL used --arch armv7f rather than --arch armv7 (and did not have -q)
I'm not sure what else to do as I have very little knowledge as to what fruitstrap is doing.  Any help would be greatly appreciated.

Levi

Levi Wilson

unread,
May 13, 2013, 10:58:10 AM5/13/13
to frank-...@googlegroups.com
Anyone have any luck with getting fruitstrap to work on mountain lion?

Stewart Gleadow

unread,
May 14, 2013, 5:21:40 AM5/14/13
to frank-...@googlegroups.com
I think the last time I used fruitstrap was just before I upgraded my dev and CI machines to Mountain Lion, so can't confirm. Since it uses a private API, I would expect a few little niggles when the OS updates.

Maybe there are some differences in the MobileDevice.h (from memory) that it wraps?

- Stew


--
You received this message because you are subscribed to the Google Groups "Frank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frank-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kyle Kendall

unread,
May 14, 2013, 12:18:20 PM5/14/13
to frank-...@googlegroups.com
Maggie, what path are you specifying?  I get your same error, but when I run the .app from /Debug-iphoneos, instead of /frankified_build.

I am working on the same thing.  I have gone through all the steps posted on the website.  I can run my builds on my device from this path:

~/Library/Developer/Xcode/DerivedData/NameOfApp-blahblahblahblahblah/Build/Products/Debug-iphoneos/NameOfApp.app

and I do get the "Segmentation fault: 11" under "------- Debug Phase -------".  That isn't exactly my problem (not yet at least).  I cannot run my Frankified.app build which is stored here:

~/NameOfRepo/Frank/frankified_build/Frankified.app

This is what I get when I try to run that:

[ 70%] VerifyingApplication
AMDeviceInstallApplication failed: -402620388

After some Googling I found that that number means this:  Could not copy validate signature:

I would appreciate any suggestions on what I might be able to do.  I've been trying to get this to work for 3 full days now.  Thank you!

Taylor, Martin

unread,
May 14, 2013, 1:12:03 PM5/14/13
to frank-...@googlegroups.com

If I do the following:

 

$ cd ~ /Library/Developer/Xcode/DerivedData/TI-Nspire-<FOO>/Build/Products/Debug-iphoneos

$ fruitstrap -v install --bundle=<MyAppName>.app

 

Then I get:

… lots of detail …

[ 50%] TakingInstallLock

[ 52%] CreatingStagingDirectory

[ 57%] ExtractingPackage

[ 60%] InspectingPackage

[ 65%] PreflightingApplication

[ 70%] VerifyingApplication

[ 70%] InstallingEmbeddedProfile

[ 75%] CreatingContainer

[ 80%] InstallingApplication

[ 85%] PostflightingApplication

[ 90%] SandboxingApplication

[ 95%] GeneratingApplicationMap

[100%] Installed package <MyAppName>.app

 

The attached iPad has my company’s provisioning profiles on it that permits me to install developer builds.

 

Can you build your Frankified app directly in Xcode and have Xcode install and run it correctly on your attached iPad?  If so, then fruitstrap should be able to install the same Frankified app from the .app file.

 

Cheers,

Martin

Taylor, Martin

unread,
May 14, 2013, 1:31:13 PM5/14/13
to frank-...@googlegroups.com

BTW: I’m not sure what numeric version “Mountain Lion” is, but I run OS X 10.7.5 and Xcode 4.5.2.

Kyle Kendall

unread,
May 14, 2013, 2:03:59 PM5/14/13
to frank-...@googlegroups.com
Thank you Martin,

Is that where you store fruitstrap as well?  I've been doing the following:

$ cd /Documents/Workspace/fruitstrap
$ ./fruitstrap -d -b <path to .app>/<AppName>.app

and I am able to run the app on the device if I use builds using this path

$ ~/Library/Developer/Xcode/DerivedData/<AppName>-<foo>/Build/Products/Debug-iphoneos/<AppName>.app

If I use the Frankified.app build in the following directory I get an error at %70 VerifyingApplication:

$ ~/<XcodeProjectRepo>/Frank/frankified_build/Frankified.app

If I do what you suggested, it doesn't recognize the fruitstrap command.
I might be storing my files incorrectly.  Here is where I am storing things:

$ ~/<XcodeProjectRepo>/Frank/... (Where Frank builds the Frankified.app build)

$ /Library/Developer/Xcode/DerivedData/<AppName>-<foo>/Build/Products/Debug-iphoneos/<AppName>.app (Where Xcode puts its builds if I press play.  These builds run on the device with no problems)

$ ~/Documents/Workspace/fruitstrap/... (Where I store fruitstrap and where I run ./fruitstrap -d -b <path to .app>/<AppName>.app)

Thank you so much for your help Martin!

Taylor, Martin

unread,
May 14, 2013, 2:31:08 PM5/14/13
to frank-...@googlegroups.com

My fruitstrap in in /usr/local/bin/fruitstrap, and /usr/local/bin is in my path.  Wherever you put it, fruitstrap should be in a folder that is in your path, that way you don’t have to be in ITS folder when you run it.  It’s much simpler to be in the folder where the .app file is, so you don’t have to specify such a long path as an arg to fruitstrap.

 

I have an Xcode target configured to build a specific target app for my “Frankified app”.  It has “Frank” appended at the end of its name, before the .app suffix.  That way I know for sure that I’m installing the “Frankified app” via fruitstrap.

 

Hope all this helps!

Cheers,

Martin

 

From: frank-...@googlegroups.com [mailto:frank-...@googlegroups.com] On Behalf Of Kyle Kendall
Sent: Tuesday, May 14, 2013 1:04 PM
To: frank-...@googlegroups.com
Subject: Re: [Frank] Launching app using fruitstrap

 

Thank you Martin,

--

Kyle Kendall

unread,
May 14, 2013, 3:56:44 PM5/14/13
to frank-...@googlegroups.com
Okay, I think if I am able to run my Frankified.app build through Xcode that that will solve my problems.  I am confused on how you made that possible.  Would you be able to help me on that?  I am not very familiar with how to make targets.

Thanks!

Taylor, Martin

unread,
May 14, 2013, 4:58:23 PM5/14/13
to frank-...@googlegroups.com

How do you create and run it at all, if not via Xcode?  What do you do now?

 

From: frank-...@googlegroups.com [mailto:frank-...@googlegroups.com] On Behalf Of Kyle Kendall
Sent: Tuesday, May 14, 2013 2:57 PM
To: frank-...@googlegroups.com
Subject: Re: [Frank] Launching app using fruitstrap

 

Okay, I think if I am able to run my Frankified.app build through Xcode that that will solve my problems.  I am confused on how you made that possible.  Would you be able to help me on that?  I am not very familiar with how to make targets.

 

Thanks!

--

Kyle Kendall

unread,
May 14, 2013, 5:14:45 PM5/14/13
to frank-...@googlegroups.com
While in the folder Frank inside of my Xcode project, I do the following

$ frank build
$ frank launch
$ cd Frank
$ cucumber

I thought that was what was normally used because of this article by Pete.  I don't need to have Xcode open even.  Is this not the norm?

Taylor, Martin

unread,
May 14, 2013, 5:25:22 PM5/14/13
to frank-...@googlegroups.com

It may be the norm, but I don’t do “the norm” ‘cause I don’t use Cucumber or Ruby.

 

What I did was to open my app’s project in Xcode, copied each of 2 targets (one for each of the 2 “flavours” of our app), then added the stuff to those targets that is necessary to “frankify” them (basically all the .a files, plus some code that I added to respond to various app_exec calls.  I also renamed the artifacts produced by those targets so that they had “Frank” as a suffix to the normal name.  I then select one of those Frank targets in Xcode and click the arrow button that does a build/install/launch.

 

You’ll have to dig into the “frank” script and find out what “frank build” does, then try to reproduce that in Xcode.

 

Cheers,

Martin

Kyle Kendall

unread,
May 14, 2013, 5:53:40 PM5/14/13
to frank-...@googlegroups.com
What does your env.rb file look like?

Kyle Kendall

unread,
May 14, 2013, 5:55:51 PM5/14/13
to frank-...@googlegroups.com
And I just curious, what language do you use to run your tests?

Taylor, Martin

unread,
May 14, 2013, 5:55:58 PM5/14/13
to frank-...@googlegroups.com

Don’t know, don’t know if I have one, don’t know where to find it if I do have one.

 

From: frank-...@googlegroups.com [mailto:frank-...@googlegroups.com] On Behalf Of Kyle Kendall
Sent: Tuesday, May 14, 2013 4:54 PM
To: frank-...@googlegroups.com
Subject: Re: [Frank] Launching app using fruitstrap

 

What does your env.rb file look like?

--

Taylor, Martin

unread,
May 14, 2013, 5:57:18 PM5/14/13
to frank-...@googlegroups.com

Python and Robot Framework.  Once I’ve finished my current re-integration of this with the latest Frank I hope to get my employer’s permission to release it as Open Source so that others can use Frank with Robot Framework.

 

Cheers,

Martin

 

From: frank-...@googlegroups.com [mailto:frank-...@googlegroups.com] On Behalf Of Kyle Kendall
Sent: Tuesday, May 14, 2013 4:56 PM
To: frank-...@googlegroups.com
Subject: Re: [Frank] Launching app using fruitstrap

 

And I just curious, what language do you use to run your tests?

--

Kyle Kendall

unread,
May 14, 2013, 5:58:22 PM5/14/13
to frank-...@googlegroups.com
Wow, impressive!


--
You received this message because you are subscribed to a topic in the Google Groups "Frank" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/frank-discuss/15AiqHonBB0/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to frank-discus...@googlegroups.com.

Stewart Gleadow

unread,
May 16, 2013, 11:38:22 PM5/16/13
to frank-...@googlegroups.com
On the fruitstrap topic, I had issues way back launching apps using fruitstrap and the solution had something to do with passing in an absolute path to the .app, for some reason it was barfing on relative paths. This was 18 months ago, so might be different with the latest fruitstrap.

- Stew

Kyle Kendall

unread,
May 20, 2013, 5:15:56 PM5/20/13
to frank-...@googlegroups.com
Thanks Stew,

I tried that and I got the same error message/code.

I checked the codesigning on my Frankified.app like this:

codesign -dvvv ./Frankified.app/

And saw that it was not signed. So I code signed the Frankified.app build like this:

codesign -v --sign "iPhone Distribution: Joe Developer" /path/to/app

But I still get this:

AMDeviceInstallApplication failed: -402620391

This is a different error code than what I've been getting, but I haven't found any info on this after some searching.

Thanks for the help.

Stewart Gleadow

unread,
May 20, 2013, 11:55:29 PM5/20/13
to frank-...@googlegroups.com
I assume the provisioning profile for the  certificate you're using to sign the app is valid for the device? If you're already building and running from Xcode using the same project settings, I'm guessing all that is already set up.

- Stew


Peter Hodgson

unread,
May 21, 2013, 12:27:10 AM5/21/13
to frank-...@googlegroups.com
Having the app bundle not initially signed seems strange to me. AFAIK it's not possible to get xcode to build an unsigned app bundle for a device build (rather than a simulator build). Are you sure that ./Frankified.app/ is a device build?


--

Ondrej Hanslik

unread,
May 21, 2013, 8:55:02 AM5/21/13
to frank-...@googlegroups.com

codesign -v --sign "iPhone Distribution: Joe Developer" /path/to/app


Are you sure this is the correct certificate? Is that enteprise or ad-hoc distribution certificate?

Kyle Kendall

unread,
May 21, 2013, 10:02:11 AM5/21/13
to frank-...@googlegroups.com
I really appreciate the replies!

@stew_gleadow - Yes I believe the provisioning profile and certificate are valid.  I can run any other app on the device.  I can also do this: 

./fruitstrap -d -b ~/Library/Developer/Xcode/DerivedData/Frank-Fruitstrap-gnvuoudakrwwnwcbawxrijpoxiab/Build/Products/Debug-iphoneos/Frank-Fruitstrap.app

and that runs successfully on my device.

@Ondrej Hanslik - Yes I'm pretty sure that that was the correct certificate, I put in this:

codesign -v --sign "iPhone Developer: Kyle Kendall" ~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/Frankified.app/

and got this message:

signed bundle with Mach-O thin (i386) [<Company>.Frank-Fruitstrap.frankified]


@Pete Hodgson - Yeah, I thought it was strange as well that it wasn't signed already.  I messed with this a litte bit this morning and I tried deleting the Frankified.app file in Frank/frankified_build/ and when I run this:

xcodebuild -target Frank-Fruitstrap -xcconfig ./Frank/frankify.xcconfig -arch arm7 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT="~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/" FRANK_LIBRARY_SEARCH_PATHS="~/Documents/Workspace/Frank-Fruitstrap/Frank" clean build CODE_SIGN_IDENTITY="iPhone Developer: Kyle Kendall"

the Frankified.app does not get re-built, but the Frank-Fruitstrap.app does get re-built and placed here: Frank/frankified_build/ .  So I am guessing that is my problem.  Is my xcodebuild command correct?

Thanks!

Kyle Kendall

unread,
May 21, 2013, 12:01:54 PM5/21/13
to frank-...@googlegroups.com
I did this:

xcodebuild -xcconfig Frank/frankify.xcconfig clean build  -arch i386 -configuration Debug -sdk iphonesimulator DEPLOYMENT_LOCATION=YES DSTROOT="/Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build" FRANK_LIBRARY_SEARCH_PATHS="\"/Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank\""

made it for the iphonesimulator, and that gives me a Frankified.app in my Frank/frankified_build/.  So that proves you right Pete.  But when I do this:

xcodebuild -xcconfig Frank/frankify.xcconfig clean build  -arch i386 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT="/Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build" FRANK_LIBRARY_SEARCH_PATHS="\"/Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank\""

made it for the iphoneos, that gives me a Frank-Fruitstrap.app in my Frank/frankified_build/.  From my /fruitstrap I run this:

./fruitstrap -d -b /Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/Frank-Fruitstrap.app/

and I get this:

[ 70%] VerifyingApplication
AMDeviceInstallApplication failed: -402620388

So I'm still at the same point, although I've found out a lot.

Stewart Gleadow

unread,
May 22, 2013, 2:18:09 AM5/22/13
to frank-...@googlegroups.com
In the second attempt, you specify -arch i386 but -sdk iphoneos. They don't seem to be compatible. Surely -arch for the device is armv7 or armv7s

Kyle Kendall

unread,
May 22, 2013, 12:01:36 PM5/22/13
to frank-...@googlegroups.com
Stewart!  You are the Man!!!!  Thank you so much!!!  That fixed it!!  Hurry and answer my question on stack and I'll give you the bounty.  Thank you so much!!

Kyle Kendall

unread,
May 22, 2013, 12:41:20 PM5/22/13
to frank-...@googlegroups.com
And thank you Pete, Ondrej and Martin as well!

K, now I'm working on my next problem...  I am stuck on running the tests on the Device.  I copied and pasted the env.rb file from the Controls Frank example in the repo and changed the path to my .app.  It looks like this:


require 'frank-cucumber'

APP_BUNDLE_PATH= ENV['APP_BUNDLE_PATH'] || "/Users/<user_name>/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/Frank-Fruitstrap.app"

Frank::Cucumber::FrankHelper.use_shelley_from_now_on

$USING_PHYSICAL_DEVICE = !!ENV['USE_PHYSICAL_DEVICE']

if $USING_PHYSICAL_DEVICE

    Frank::Cucumber::FrankHelper.test_on_physical_device_via_bonjour

    After do

        step 'I ask the app to reset to home'

    end

end

if !$USING_PHYSICAL_DEVICE && !ENV['DONT_INITIALLY_LAUNCH']

    # ensure app is initially launched

    launcher = Object.new.extend(Frank::Cucumber::FrankHelper).extend(Frank::Cucumber::Launcher)

    launcher.launch_app APP_BUNDLE_PATH

end


When I run cucumber from Frank the simulator gets launched and then the app gets launched.  It sits there for a second and then I get a whole bunch of "PING FAILED!!!.." the this:


PING FAILED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Encountered 1 timeouts while launching the app.

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


Then it repeats itself.


Do I need to adjust any other settings to have it run on the device?

Kyle Kendall

unread,
May 22, 2013, 12:59:46 PM5/22/13
to frank-...@googlegroups.com
I've got an update on where I'm at but still stuck.
When I do cucumber in Frank, it runs.  But I get this on the first step:

      *********************************************
      Oh dear. Your app fell over and can't get up.
      *********************************************

      (plus everything else)

I think I am supposed to be running a Frankified.app, but I am just running my Frank-Fruitstrap.app.  When I do the xcodebuild I only get the Frank-Fruitstrap.app, and no Frankified.app.  So I guess I am still stuck on the xcodebuild part :(  ...

Taylor, Martin

unread,
May 22, 2013, 1:00:33 PM5/22/13
to frank-...@googlegroups.com

Sorry, can’t help you with the Cucumber part.  But a good first check is: Can you talk to your running Frankified app on the physical device using Symbiote from a Web Browser?  If you’re working on a Mac, it seems that Safari does the best job of rendering Symbiote.  On a PC, Chrome is the browser of choice.

 

To use Symbiote with your iPad, you’ll need to find out the iPad’s IP address on your WiFi network and use that in the URL, like this:

http://192.168.1.42:37265/

If your iPad has a name that your DNS recognizes, then you could use that in place of the IP address in the Symbiote URL.  Here at TI we’ve worked with our IT department to allocate static IP addresses and DNS names for all our Test Automation iPads.  The resulting URL that I use for Symbiote to one of my iPads is:

http://martin-ipad-601.itg.ti.com:37265/

 

Cheers,

Martin

 

From: frank-...@googlegroups.com [mailto:frank-...@googlegroups.com] On Behalf Of Kyle Kendall
Sent: Wednesday, May 22, 2013 11:41 AM
To: frank-...@googlegroups.com
Subject: Re: [Frank] Launching app using fruitstrap

 

And thank you Pete, Ondrej and Martin as well!

--

Kyle Kendall

unread,
May 22, 2013, 1:57:34 PM5/22/13
to frank-...@googlegroups.com
When I put this in http://10.0.1.50:37265/, when the app is running, I get a blank white page with "Error 404 - Not Found".  When the app isn't running I get the "Safari cannot connect to server" screen.  So it's trying, but it's not running Symbiote.

Ondrej Hanslik

unread,
May 22, 2013, 2:35:38 PM5/22/13
to frank-...@googlegroups.com
Please paste the console log, that should show us why the app crashed.

I ask the app to reset to home

If this step uses anything from the "Frank::Cucumber::HostScripting" module, e.g. "press_home_on_simulator" or "simulator_reset_data", then it won't run on device. Unfortunately, this functionality is available only on the simulator.

Kyle Kendall

unread,
May 22, 2013, 2:52:46 PM5/22/13
to frank-...@googlegroups.com
Feature: Login to app

  Scenario: Logging in to app                                                                    # features/0000login.feature:3
    When I touch the Custom button marked "Sign In"                                                # features/step_definitions/basic_functionality.rb:35
        
      
      *********************************************
      Oh dear. Your app fell over and can't get up.
      *********************************************
      
      
      We just encountered an error while trying to talk to the Frank server embedded 
      within the app under test. This usually means that the app has just crashed, 
      either while carrying out the current step or while finishing up the previous 
      step.
      
      Here are some things you could do next:
      
      - Take a look at the app's logs to see why it crashed. You can view the logs 
        in Console.app (a search for 'Frankified' will usually find your frankified 
        app's output).
      
      - Launch your frankified app in the XCode debugger and then run this scenario 
        again. You'll get lots of helpful output from XCode. Don't forget to do 
        something to prevent cucumber from automatically re-launching your app when 
        you run the scenario by hand. If you don't prevent the relaunch then you 
        won't still be in the XCode debugger when the crash happens.
      
        
      
       (Frank::Cucumber::FrankNetworkError)
      ./features/step_definitions/basic_functionality.rb:37:in `/^I touch the Domo button marked "(.*?)"$/'
      features/0000login.feature:5:in `When I touch the Domo button marked "Sign In"'

Then it skips other steps.

Ondrej Hanslik

unread,
May 22, 2013, 2:57:58 PM5/22/13
to frank-...@googlegroups.com
I am afraid I wasn't clear enough - I am interested in the device log (the one accessible through Xcode Organizer).

From the cucumber log we can see that you can't connect to the Frank server in the app (Frank::Cucumber::FrankNetworkError)

Kyle Kendall

unread,
May 22, 2013, 3:05:14 PM5/22/13
to frank-...@googlegroups.com
Oops, my bad,

Here is the log starting when I open the app.  Then I did cucumber.

May 22 13:03:42 Kyles-iPad Domo[423] <Warning>: Shelley 1.1.11.pre1 registered with Frank as selector engine named 'shelley_compat'
May 22 13:03:42 Kyles-iPad kernel[0] <Debug>: launchd[423] Builtin profile: container (sandbox)
May 22 13:03:42 Kyles-iPad kernel[0] <Debug>: launchd[423] Container: /private/var/mobile/Applications/68D58BDC-736F-4998-83CB-5DA725DBF33B (sandbox)
May 22 13:03:42 Kyles-iPad Domo[423] <Warning>: Injecting Frank loader
May 22 13:03:42 Kyles-iPad Domo[423] <Warning>: linking UIAutomation framework...
May 22 13:03:43 Kyles-iPad Domo[423] <Warning>: Warning, could NOT find ViewAttributeMapping.plist in frank_static_resources.bundle
May 22 13:03:43 Kyles-iPad Domo[423] <Warning>: Done loading view attribute mapping, found 0 classes mapped.
Mapping definition:
{
}
May 22 13:03:43 Kyles-iPad Domo[423] <Warning>: Creating the server: <HTTPServer: 0x1fde1070>
May 22 13:03:43 Kyles-iPad Domo[423] <Warning>: Starting server Frank iOS Server 1.1.11.pre1
May 22 13:04:01 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: mdmd starting...
May 22 13:04:01 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Looking for managed app states to clean up
May 22 13:04:01 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Network reachability has changed.
May 22 13:04:01 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Network reachability has changed.
May 22 13:04:01 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Polling MDM server https://ios.meraki.com/apple_mdm/ios?org=125463 for commands
May 22 13:04:02 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Transaction completed. Status: 200
May 22 13:04:02 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Attempting to perform MDM request: Restrictions
May 22 13:04:02 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Handling request type: Restrictions
May 22 13:04:02 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Command Status: Acknowledged
May 22 13:04:03 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: Transaction completed. Status: 200
May 22 13:04:05 Kyles-iPad mdmd[424] <Notice>: (Note ) MDM: mdmd stopping...

Kyle Kendall

unread,
May 22, 2013, 3:09:11 PM5/22/13
to frank-...@googlegroups.com
Hope that's what you wanted.

Ondrej Hanslik

unread,
May 22, 2013, 3:11:53 PM5/22/13
to frank-...@googlegroups.com
Yes, it seems that your frank server is running correctly.

Could you start the app, wait a while and then try the following URI in your browser? "http://10.0.1.50:37265/dump" (provided 10.0.1.50) is the IP of your device.

Ondrej Hanslik

unread,
May 22, 2013, 3:13:48 PM5/22/13
to frank-...@googlegroups.com
Or  "http://10.0.1.50:37265/screenshot"

Kyle Kendall

unread,
May 22, 2013, 3:16:53 PM5/22/13
to frank-...@googlegroups.com
That seems to work.  When I do http://10.0.1.50:37265/dump it gives me a bunch of correct data about my app.  And http://10.0.1.50:37265/screenshot gives me an exact screenshot of what I've viewing in the app.

Ondrej Hanslik

unread,
May 22, 2013, 3:21:04 PM5/22/13
to frank-...@googlegroups.com
I am not sure why cucumber isn't working since obviously the server is running correctly. Maybe it is still trying to connect to the simulator? However, I am pretty sure your application was built without the symbiote bundle. That's why http://10.0.1.50:37265 displays 404 because symbiote html & javascript etc. can't be found in the app.

Kyle Kendall

unread,
May 22, 2013, 3:39:46 PM5/22/13
to frank-...@googlegroups.com
Do you know how I might be able to add Symbiote?  I guess you are right in your assumption that it's still trying to connect to the simulator.  It works fine if my app is open in the simulator.

Kyle Kendall

unread,
May 22, 2013, 3:59:42 PM5/22/13
to frank-...@googlegroups.com
Does it matter that my xcodebuild does not build a Frankified.app?  I am just running the other .app file in the same folder.

Kyle Kendall

unread,
May 23, 2013, 11:36:00 AM5/23/13
to frank-...@googlegroups.com
It looks like I am running into the same problem that Maggie Yu and Levi Wilson were running into at the top of this thread.  After this: 

./fruitstrap -d -b /Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/Frank-Fruitstrap.app/

I see this:

[100%] Installed package /Users/kylekendall/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/Frank-Fruitstrap.app/
------ Debug phase ------
Segmentation fault: 11

The segmentation fault can't be good.  Has anyone found a solution to this?  I'm running 10.8.3.

Thanks

Kam Dahlin

unread,
May 23, 2013, 2:28:27 PM5/23/13
to frank-...@googlegroups.com
Not sure what the problem with Fruitstrap is, but I can offer an alternate method for launching your application on the device:

Step 1:
In Terminal Run:
instruments -s

From the list of trace templates that get returned find the one for the Activity Monitor.tracetemplate (usually at the top of the list)
Copy this full path and paste it into a text file, or somewhere so you can use it again in a minute.

Step 2:
Find the UUID of your device. Usually the XCode Organizer Devices tab will show you this info. Select the your device in the devices list, and then select the text in the 'Identifier' field and copy it.

Step 3:
run the following command from terminal:

instruments -w <UUID of Device> -t <Activity Monitor.tracetemplate path> -D /tmp/ignore.trace <Application Name>

This will launch your app on your device and dump the trace output to a path that will get cleaned up on the next reboot. Without the -D flag a .trace file will get created in the current directory (which you may not want).

One thing to note: the name of the application is actually the CFBundleName, not the visible application name in the Springboard. So if the visible name is "AwesomeSauce" but your bundle name is "AwesomeSauce-iPad", you will want to use AwesomeSauce-iPad for the app name. If your app name and bundle name are the same, then it won't matter.

When you are done, either fully quit your application on the device, or CTRL + C your terminal session.

hth

kam

Kyle Kendall

unread,
May 23, 2013, 3:08:39 PM5/23/13
to frank-...@googlegroups.com
Thanks Kam,

I went through those steps and I'm getting an error:

2013-05-23 13:03:51.973 instruments[11891:2203] Failed to start Instruments daemon for 'iOS' on 'Kyle's iPad (v6.1.3)' (The service is invalid.)
Instruments Trace Error : Failed to start trace.

I've looked around for a solution.  I saw that there was someone who ran into this same problem and he had to de-frankify his app in order to run it.  Will I be able to run the Frank Tests on my device with this method?

Kam Dahlin

unread,
May 23, 2013, 3:12:01 PM5/23/13
to frank-...@googlegroups.com
Can you try running a non-frank build and see if you have the same issue? I haven't had a problem with it.

Kyle Kendall

unread,
May 23, 2013, 3:28:28 PM5/23/13
to frank-...@googlegroups.com
I tried it and I get the same message.  Here's what I put in:

instruments -w <UUID> -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/ignore NormalApp.app

I'll play with it and see if I can figure out what I'm doing wrong.
Message has been deleted

Levi Wilson

unread,
May 24, 2013, 10:50:04 AM5/24/13
to frank-...@googlegroups.com
@kyle I was not able to get past the segmentation fault unless I used the original fruitstrap branch (https://github.com/ghughes/fruitstrap) and merged in the existing pull requests (https://github.com/ghughes/fruitstrap/pulls). When I did, I was able to at least deploy and launch my app. However, I was not able to get frank to communicate with it to run my tests.

With the other branch (https://github.com/ekbiker/fruitstrap) I still receive the segmentation fault 11. I think it has something to do with Mountain Lion. I am on 10.8.3 as well.

I tried on other non-ML machines, but I get issues with what I believe is related to provisioning. The verify step fails (at about 70% IIRC), even though I am able to deploy on that same machine via XCode. But I think maybe this is a separate issue?

Kyle Kendall

unread,
May 24, 2013, 11:03:17 AM5/24/13
to frank-...@googlegroups.com
Okay,

I had the issue with what I thought was the provisioning, but the guys on this thread helped me solve this.  I had to change my xcodebuild a little bit to fix the 70% problem.  Here's what my xcodebuild looks like now, I'll leave mine as-is and you can swap the paths out:

xcodebuild -target Frank-Fruitstrap -xcconfig ./Frank/frankify.xcconfig -arch armv7 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT="~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/" binaries="armv7" FRANK_LIBRARY_SEARCH_PATHS="~/Documents/Workspace/Frank-Fruitstrap/Frank" clean build CODE_SIGN_IDENTITY="iPhone Developer: Kyle Kendall"

Hopefully that will work for you as well.

Thanks for the update Levi.

Levi Wilson

unread,
May 24, 2013, 11:05:39 AM5/24/13
to frank-...@googlegroups.com
Ahh, I didn't know about the CODE_SIGN_IDENTITY flag (and I haven't been keeping up on this thread :-o ) Thanks for the info! I will try it out and let you know. I had noticed that there were multiple provisioning files, and assumed that fruitstrap just grabbed the first, and xcode grabbed the right one. I have absolutely no data to back up that assumption though :-)

Levi

Kyle Kendall

unread,
May 24, 2013, 11:26:50 AM5/24/13
to frank-...@googlegroups.com
Let me know if it works/doesn't work.  I know how frustrating it can be!  Did you end up going with something else?  Or are you not running tests on the device?

Levi Wilson

unread,
May 24, 2013, 11:32:38 AM5/24/13
to frank-...@googlegroups.com
Been more focusing on Android lately, so haven't really returned to it. Running in the simlulator has been fine up until now, but we need tests around taking photos.  I want to look into http://appium.io/ to see if that is going to be a viable solution. I have been writing a page-object gem for testing iOS, but currently it only uses frank (https://github.com/leviwilson/furter). If appium is going to be worthwhile, I will probably update the gem to be able to use either platform and make appium the default, especially if it can seamlessly work with a physical device.

Kyle Kendall

unread,
May 30, 2013, 11:20:50 AM5/30/13
to frank-...@googlegroups.com
@Levi, if I do this:  cucumber USE_PHYSICAL_DEVICE=true (Change USE_PHYSICAL_DEVICE to whatever the env.rb's variable name is), then mine runs on the device.  Some of the methods work, like touching a textfield and typing stuff in it.  But a lot of them don't, like touching a button, or view.  I'm still working on getting all of them to work.

Kyle Kendall

unread,
Jun 6, 2013, 10:14:14 AM6/6/13
to frank-...@googlegroups.com
Hey Kam,

I went back to the method you described and it works perfect.  I am using a combination of fruitstrap and instruments.  I use fruitstrap to install the app on the device, then I use instruments to launch the app after it's installed because I'm unable to do this with fruitstrap.  And I saw on another post of yours that we can also launch the app in a different language.  That will be awesome.

I am having problems running the tests on the app after it's launched using instruments.  I launch the app using your instruments method and as long as the app is open, terminal acts as if it's still running a process (I guess it is running a process) and when i run my tests using cucumber, it doesn't respond to them.  Are you running Frank while using instruments?

Kam Dahlin

unread,
Jun 6, 2013, 2:59:28 PM6/6/13
to frank-...@googlegroups.com
Hi Kyle,

Glad the instruments command is working for you. Maybe try adding an '&' to the end of the instruments command string, this will spin the instruments process to the background. I don't have frank setup for app tests at the moment, but I haven't had problems in the past. 

Example:
instruments -w <unique identifier> -t <template path> -D /tmp/ignoretrace.trace <AppName> &

If you want to kill the instruments session, you can do:
kill `pgrep instruments`

When I get some more time, I will try it against a Frank build.

Regards,

kam

Derek Chung

unread,
Dec 30, 2013, 8:36:26 PM12/30/13
to frank-...@googlegroups.com, kkend...@gmail.com
Hello Kyle,

Thanks for all your posts. They really help a newbie like myself.

I am kinda following your path to make an app work on the device.

Although I got the segmentation fault: 11 error like you did, launching the app works. But again like you described, touching buttons don't work. Were you ever able to figure out a way to make it work?

I am on Mountain Lion 10.8.5 with Xcode 5.0.1 and the test device is iOS7.

Thanks in advance.

-Derek
Reply all
Reply to author
Forward
0 new messages