jonathanpenn / ui-screen-shooter

Using UI Automation to automatically generate all screenshots of your iOS app, on different device types, in different locales by running a single command. Hands free.

Home Page:http://cocoamanifest.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with incremental version 7.0.3

jharker opened this issue · comments

Hi, Jonathan,

Thanks for a really nifty tool!

When trying out the run_screenshooter.sh demo, I ran into a problem. The script failed with the following results:

** BUILD SUCCEEDED **

Localizing for en_US
2013-11-09 14:06:24.434 ScriptAgent[4248:2f07] CFPreferences: user home directory at file:///Users/[username]/Library/Application%20Support/iPhone%20Simulator/7.0/ is unavailable. User domains will be volatile.
2013-11-09 14:06:24.546 ScriptAgent[4248:2f07] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2013-11-09 14:06:24.546 ScriptAgent[4248:2f07] CLTilesManagerClient: init
2013-11-09 14:06:24.546 ScriptAgent[4248:2f07] CLTilesManagerClient: reconnecting, 0x9600000
2013-11-09 14:06:54.691 ScriptAgent[4248:2f07] +[UIAXElement initializeAccessibility]: UIAutomation never received kAXAccessibilityLoaded.  Waited 30.03 seconds.
2013-11-09 14:06:54.692 ScriptAgent[4248:2f07] AXError: Could not auto-register for pid status change
2013-11-09 14:06:54.693 ScriptAgent[4248:2f07] Failed to enable accessiblity, kAXErrorServerNotFound
2013-11-09 14:06:55.223 instruments[4211:6007] Automation Instrument ran into an exception while trying to run the script.  UIAScriptAgentSignaledException
2013-11-09 19:06:55 +0000 Fail: An error occurred while trying to run the script.
Instruments Trace Complete (Duration : 39.346142s; Output : /tmp/screen_shooter/traces/trace.trace)

The first error gives a clue to the solution. In my case, in the user directory there was no folder:

... iPhone%20Simulator/7.0/

Instead there was only the newest version folder, i.e.:

... iPhone%20Simulator/7.0.3/

To solve the problem, I just added a symlink:

$ cd /Users/[username]/Library/Application%20Support/iPhone%20Simulator/
$ ln -s 7.0.3 7.0

Pretty simple, and it worked fine. This was mentioned in a slightly different context here: https://groups.google.com/d/msg/zucchini-discuss/fQNrfOTaIuU/NLM5-Hk45tYJ

Just thought you (or other users) might find it helpful.

Or, y'know, I could have changed the line in run_screenshooter.sh from:

ios_version="7.0"

to

ios_version="7.0.3"

Gah. Can't believe I didn't notice that until now.

No worries. :) If you send me a pull request with that version number change I'll merge it in.

I'm going to go ahead and close this. For some reason I'm not able to reproduce the problem. I'm able to use the "7.0" version just fine even with the latest Xcode beta.

Just to add to this, my issue with this exact problem was using XCode 5.0.2. I reverted to 5.0 and it started working. iOS version doesn't seem to make a difference.

:( Well, with the emminent release of iOS 7.1 and Xcode 5.1, let's just sit
on this to see if things get fixed.

On Wed, Mar 5, 2014 at 9:42 AM, Christoph Koehler
notifications@github.comwrote:

Just to add to this, my issue with this exact problem was using XCode
5.0.2. I reverted to 5.0 and it started working. iOS version doesn't seem
to make a difference.

Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-36748212
.

I'm running into the same issue on iOS 7.1 Xcode 5.1 b5

@ryanwmarsh what happens if you change the line like @jharker suggested in #13 (comment) ?

@jonathanpenn Nope it still breaks.

Localizing for en-US
2014-03-07 15:27:20.661 sim[2656:303] Multiple instances of launchd_sim detected, using com.apple.iphonesimulator.launchd.5690d94 instead of com.apple.iphonesimulator.launchd.2d79c643.
2014-03-07 15:27:21.365 ScriptAgent[2656:3107] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2014-03-07 15:27:21.366 ScriptAgent[2656:3107] CLTilesManagerClient: init
2014-03-07 15:27:21.366 ScriptAgent[2656:3107] CLTilesManagerClient: reconnecting, 0x10ab003e0
2014-03-07 15:27:51.435 ScriptAgent[2656:3107] +[UIAXElement initializeAccessibility]: UIAutomation never received kAXAccessibilityLoaded.  Waited 30.03 seconds.
2014-03-07 15:27:51.436 ScriptAgent[2656:3107] AXError: Could not auto-register for pid status change
2014-03-07 15:27:51.445 ScriptAgent[2656:3107] Failed to enable accessiblity, kAXErrorServerNotFound
2014-03-07 15:27:51.833 instruments[2607:5f07] Automation Instrument ran into an exception while trying to run the script.  UIAScriptAgentSignaledException
2014-03-07 21:27:51 +0000 Fail: An error occurred while trying to run the script.
Instruments Trace Complete (Duration : 34.147938s; Output : /tmp/screen_shooter/traces/trace.trace)

Hmm. The first line of what you pasted @ryanwmarsh says to me that it's a different error than @jharker got when he opened this issue. His issue was related to a bad directory name because of the 7.0.3 simulator. Your error message refers to multiple instances of launchd_sim which leads me to suspect that you already have the simulator running which is why Instruments couldn't launch it manually from the command line. Are you trying to run multiple instances of tests at the same time?

@jonathanpenn At that moment I guess I did have multiple instances of launchd_sim running. That might have been because I've been trying UIAutomation scripts of different types over and over trying to find a config that works. I re ran it from a clean boot and got:

Localizing for en-US
2014-03-07 17:15:04.786 ScriptAgent[3635:2f07] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2014-03-07 17:15:04.786 ScriptAgent[3635:2f07] CLTilesManagerClient: init
2014-03-07 17:15:04.786 ScriptAgent[3635:2f07] CLTilesManagerClient: reconnecting, 0x10bf05420
2014-03-07 17:15:34.851 ScriptAgent[3635:2f07] +[UIAXElement initializeAccessibility]: UIAutomation never received kAXAccessibilityLoaded.  Waited 30.02 seconds.
2014-03-07 17:15:34.851 ScriptAgent[3635:2f07] AXError: Could not auto-register for pid status change
2014-03-07 17:15:34.859 ScriptAgent[3635:2f07] Failed to enable accessiblity, kAXErrorServerNotFound
2014-03-07 17:15:35.265 instruments[3595:5827] Automation Instrument ran into an exception while trying to run the script.  UIAScriptAgentSignaledException
2014-03-07 23:15:35 +0000 Fail: An error occurred while trying to run the script.
Instruments Trace Complete (Duration : 35.117023s; Output : /tmp/screen_shooter/traces/trace.trace)

Hmm. Alas, I have no idea what that means. Sounds like an Instruments error. I'd recommend filing a bug with Apple. I hope this is fixed by the time Xcode 5.1 comes out of beta.

Yes, I filed an issue on this. I really hope they fix it too.

I just installed Xcode 5.1 (final) and everything works fine!

Apple. Never ceases to amaze.