Xcode 9 GM - Export and Upload to App Store crashing - ios

I'm trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xcode -> Organizer I see crash on "Stripping extended attributes for APPNAME.app".
I checked all configuration of bitcode and symbols on/off, signing automatically, manually. Deployment target of my project is iOS 10, as 11 cannot be set.
I also tried following steps from simillar thread (https://forums.developer.apple.com/thread/83219) and added App Store 1024 icon to Images.xcassets.
Any ideas why Xcode is crashing?
Screenshot from just before the crash:
Crash report:
Process: Xcode [10862]
Path: /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0 (13238.4)
Build Info: IDEFrameworks-13238004000000000~11
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [10862]
User ID: 501
Date/Time: 2017-09-10 14:56:10.196 +0100
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: FD8390BC-9E7B-969D-15A2-22A8DBBD050D
Time Awake Since Boot: 16000 seconds
System Integrity Protection: enabled
Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x20:
-->
__TEXT 0000000103625000-0000000103627000 [ 8K] r-x/rwx SM=COW /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 9M214v
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffbb90634a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fffbb905797 mach_msg + 55
2 com.apple.CoreFoundation 0x00007fffa6037434 __CFRunLoopServiceMachPort + 212
3 com.apple.CoreFoundation 0x00007fffa60368c1 __CFRunLoopRun + 1361
4 com.apple.CoreFoundation 0x00007fffa6036114 CFRunLoopRunSpecific + 420
5 com.apple.HIToolbox 0x00007fffa5596ebc RunCurrentEventLoopInMode + 240
6 com.apple.HIToolbox 0x00007fffa5596cf1 ReceiveNextEventCommon + 432
7 com.apple.HIToolbox 0x00007fffa5596b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
8 com.apple.AppKit 0x00007fffa3b2fa54 _DPSNextEvent + 1120
9 com.apple.AppKit 0x00007fffa42ab7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
10 com.apple.dt.DVTKit 0x0000000103eb58be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
11 com.apple.AppKit 0x00007fffa3b243db -[NSApplication run] + 926
12 com.apple.AppKit 0x00007fffa3aeee0e NSApplicationMain + 1237
13 libdyld.dylib 0x00007fffbb7df235 start + 1
Edit
Running xcodebuild (through fastlane gym) produces the following:
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_config20170912-61009-190kutb.plist -archivePath '/Users/wert/Library/Developer/Xcode/Archives/2017-09-12/towerar 2017-09-12 22.06.54.xcarchive' -exportPath /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_output20170912-61009-42bo6w
2017-09-12 22:09:04.966 xcodebuild[62085:5372649] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/Unity-iPhone_2017-09-12_22-09-04.966.xcdistributionlogs'.
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
3 ___forwarding___ (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
7 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
8 0x0000000104d752af (in xcodebuild)
9 start (in libdyld.dylib)

I've had to uncheck all checkboxes and use manual managing signing, then it was possible to proceed in the wizard.

Does the xattr command line tool work? It's possible your python installation is damaged, or if you've replaced the installed xattr module then you may need to reinstall the system provided one.

I had been experiencing same frustating problem and it happen almost all day , Xcode 9 suddenly crashes in the middle of the archiving process, resulting in the same error report.
#dangercheng gave me insight about archive process in xcode 9, which is, it needs the xattr command , therefore I go check xattr command in my macbook and somehow xattr doesn't work. From the verbose message, it reveals that the error is related to file permission owned by folders/files inside /Library/Python/2.7 . Somehow a user other than root has no right to write (w/ 2) on those files/folders.
From above facts I concluded that I need to change file permission in this case chmod -R 775 and apply it to all folders and its content on /Library/Python/2.7. After that my xattr is running well and my Archive process in Xcode 9 is running smoothly, experiencing no crash.
Thanks for all of you guys

In my case, it was due to permissions issues with python.
When running xattr from terminal I had the following error:
IOError: [Errno 13] Permission denied: '/Users/cb/Library/Python/2.7/lib/python/site-packages/zc.buildout-1.5.2-py2.7.egg-info/namespace_packages.txt'
Taking a look inside the /Users/cb/Library folder I found that all of the folders were owned by cb:staff (my currently logged in user and group) but the /Users/cb/Library/Python folder was owned by root:wheel
Running the following will eliminate the error:
sudo chown -R $USER:$(id -g) /Users/$USER/Library/Python
After the sudo chown you can run xattr again to verify. There should be no errors or other output from the xattr command.

Probably not your fault but do file a bug with Apple. But when the Xcode uploader fails for any reason try the good ol' Application Loader:
Xcode.app/Contents/Applications/Application Loader.app

run 'xattr' command in mac terminal,if result like bellow:
python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s):
/usr/bin/xattr-2.6 (uses python 2.6)
/usr/bin/xattr-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
you should creat a new soft link to '/usr/bin/xattr-2.7'
run bellow commands:
cd /usr/bin
sudo rm xattr
sudo ln -s xattr-2.7 xattr
this solve my problem!

I solved my problem following #dangercheng's answer.
I upgraded my python to python 3.6 two days ago.And it seems that the xattr command was executed under python3.6 .
However, when I execute xattr in terminal.
File "/usr/bin/xattr", line 31
continue
^
TabError: inconsistent use of tabs and spaces in indentation
Something bad happened!
So I edit the source code of xattr.
for i in g:
vers = vpat.search(i)
if vers is None:
continue //add 4 space
sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()]))
n = 1
```
python version 3.6.3 can't run /usr/bin/xattr. Try the alternative(s):
(Error: no alternatives found)
Run "man python" for more information about multiple version support in
Mac OS X.
```
another error!
I guess the xattr command should judge the version of python and execute suitable codes and the code of python3 contains some error.
Finally I change the default version of python to python2.7 and replace softlink of xattr to xattr-2.7. It works.
Attention, when xcodebuild execute xattr command the path of python was "/usr/bin/python".
The path "/usr/bin/python" was softlink too.
So, I resolved this problem following this step.
Step1:
cd /usr/bin
Step2:
sudo rm python
sudo ln -s python2.7 python
Step3:
sudo rm xattr
sudo ln -s xattr-2.7 xattr
If you can not found python2.7 under "/usr/bin", please find another suitable python path such as "/Library/Frameworks/Python.framework/Versions/2.7" etc.

Related

iOS Simulator Crash on Xcode 10

Today, I've updated my iMac to macOS Mojave from macOS High Sierra. Since then I'm not able to open simulator. Every time I tried to open the simulator that crashes immediately. Whenever I tried to run the simulator via Xcode then Xcode shows this error
Timed out waiting for the simulator application for iphonesimulator to become ready
Also, I tried to open the simulator directly and it's crash immediately. Here the gif (gif is a little bit slow) -
System CPU & Memory Status -
Here some solution that I've tried but no luck -
Clear iPhone Simulator Cache
xcrun simctl erase all
Clear DerivedData
~/Library/Developer/Xcode/DerivedData/
Clear iOS DeviceSupport
~/Library/Developer/Xcode/iOS DeviceSupport/
Delete Xcode Preferences
defaults delete com.apple.dt.Xcode
Restart Xcode & System
Update 1
macOS Logs -
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Device iPhone XS (978302BA-5255-44CB-A77C-188071B99A7C, iOS 12.0, Booted) is available but has no defaultDisplay'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff33a9543d __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5f9a6720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff33ab008e +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff35e4c55d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 Simulator 0x000000010e7510da Simulator + 106714
5 libdispatch.dylib 0x00007fff60a24d4f _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x00007fff60a25dcb _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff60a2c120 _dispatch_lane_serial_drain + <…>
)
This command should fix your issue (close sim before and open after):
sudo killall -10 com.apple.CoreSimulator.CoreSimulatorService
After this, restart Xcode and if simulator not available then we need to add them manually from Windows > Device and Simulators
This resolved my issue
Force quit simulator by:- option + command + esc choose simulator and quit.
Quit Xcode and restart then it worked!

Xcode crashes on launch

I am developing an Application for iOS and I changed nothing in the Application. But at a restart of my Mac, Xcode crashes every time.
Don't know if this is important, but my spotlight can't find any applications and also when I open the finder and using the shortcut cmd + shift + H I see a white window.
Xcode isn't starting anymore and throws this error:
Process: Xcode [1346]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2 (9548)
Build Info: IDEFrameworks-9548000000000000~7
App Item ID: 497799835
App External ID: 814662604
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1346]
Date/Time: 2015-12-24 11:01:44.753 +0100
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Time Awake Since Boot: 4000 seconds
System Integrity Protection: enabled
Crashed Thread: 4 Dispatch queue: DVTFilePathEventWatcher - event queue
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0:
-->
__TEXT 0000000108a5a000-0000000108a5e000 [ 16K] r-x/rwx SM=COW /Applications/Xcode.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 7C68
Thread 0:: Dispatch queue: DVTFilePath cache derivation lock for key DVTFilePathKey_SortedDirectoryContents
0 libobjc.A.dylib 0x00007fff8df27aa0 search_method_list(method_list_t const*, objc_selector*) + 2
1 libobjc.A.dylib 0x00007fff8df28d76 lookUpImpOrForward + 413
2 libobjc.A.dylib 0x00007fff8df22591 objc_msgSend + 209
3 com.apple.dt.DVTFoundation 0x0000000108a741f8 -[DVTFileSystemVNode addCachedEntriesFromDictionary:] + 215
4 com.apple.dt.DVTFoundation 0x0000000108bd2e2d __33-[DVTFilePath cachedValueForKey:]_block_invoke549 + 245
5 libdispatch.dylib 0x00007fff9fcbd33f _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff9fcbe926 _dispatch_barrier_sync_f_invoke + 74
7 com.apple.dt.DVTFoundation 0x0000000108cd1005 DVTDispatchBarrierSync + 62
8 com.apple.dt.DVTFoundation 0x0000000108a69627 -[DVTDispatchLock performLockedBlock:] + 116
9 com.apple.dt.DVTFoundation 0x0000000108a715b0 -[DVTFilePath cachedValueForKey:] + 1802
10 com.apple.dt.DVTFoundation 0x0000000108a70afc -[DVTToolchainRegistry scanSearchPathAndRegisterToolchains:] + 563
11 com.apple.dt.IDEFoundation 0x00000001097d1a66 IDEInitialize + 655
12 com.apple.dt.IDEKit 0x0000000109ecdf7c -[IDEApplicationController applicationWillFinishLaunching:] + 708
13 com.apple.CoreFoundation 0x00007fffa18fa70c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 com.apple.CoreFoundation 0x00007fffa18fa67f ___CFXRegistrationPost_block_invoke + 63
15 com.apple.CoreFoundation 0x00007fffa18f9d47 _CFXRegistrationPost + 407
16 com.apple.CoreFoundation 0x00007fffa18f9ab2 ___CFXNotificationPost_block_invoke + 50
17 com.apple.CoreFoundation 0x00007fffa18f3d42 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
18 com.apple.CoreFoundation 0x00007fffa17e2145 _CFXNotificationPost + 693
19 com.apple.Foundation 0x00007fff9ef36921 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
20 com.apple.dt.DVTFoundation 0x0000000108c6cf55 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 698
21 com.apple.AppKit 0x00007fff9db412c2 -[NSApplication finishLaunching] + 354
22 com.apple.dt.DVTKit 0x0000000109275f62 -[DVTApplication finishLaunching] + 149
23 com.apple.AppKit 0x00007fff9db40e05 -[NSApplication run] + 231
24 com.apple.AppKit 0x00007fff9dac3520 NSApplicationMain + 1176
25 libdyld.dylib 0x00007fff9a8605ad start + 1
Could this be an issue due to Permissions conflicts?
ANSWER:
After I changed the rights from my OSX-Drive to everyone can write&read. Everything worked. But I knew that this is a temporary solution, so I decided to reinstall my MAC and everything was fine.
Delete ~/Library/Developer/Xcode/DerivedData by running this command in terminal:
rm -r ~/Library/Developer/XCode/DerivedData
If that doesnt work, At this point and with given info, all I could recommend to delete and reinstall Xcode.
If the delete of ~/Library/Developer/Xcode/DerivedData is not working for you, try this steps to remove xcuserdata:
open a Finder window and navigate to your project
right-click on the .xcodeproj OR .xcworkspace file
select Show Package Contents
a new window appears
delete a folder called xcuserdata
I had one where i selected a file that was quite large which crashed xcode when it tried to parse it. Then when i restarted it somehow it got set to load that file on start. Only way i saw was to temporarily rename the file that it was trying to load at start so it would load empty.
I'll recommend deleting xcuserdata: folder from both of your .xcodeproj & .xcworkspace file (open with Show Package Contents) and try again.
I hope this will work.
Ensure there are no issues with your SPM packages/dependencies.
This is simply another suggestion. I just spent some time debugging this on a fairly popular open source project.
My Xcode first crashed when I updated a SPM package, so I was fairly certain it was an issue with one of the future commits in that package or a SPM bug. I subscribe to Occam's Razor, so I started going through the changes in the commits.
After some time, I found a duplicate Swift Playground page delcaration in contents.xcplayground. I removed that single line, pushed the PR, and everything worked fine after that.
To be able to reopen the project:
Open project.pbxproj in your code editor of choice (e.g. vi, nano, emacs, atom, code).
Remove the offending package or packages from the /* Begin XCRemoteSwiftPackageReference section */ and /* Begin XCSwiftPackageProductDependency section */ sections.
Save the file and Xcode should now open.
Again, if your Xcode is immediately crashing when opening a project (and you last updated/auto-updated a SPM package) go through your packages.

Xcode crashes when trying to run project due to LLDB

When I click 'Run', Xcode crashes instantly, regardless of my code.
The crash report says that the LLDB plugin can not be read correctly:
Error getting value for key 'workerClass' of extension 'Xcode.DebuggerFoundation.Debugger.LLDB' in plug-in 'com.apple.dt.dbg.DebuggerLLDB'
The crash report:
Process: Xcode [2184]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.0.2 (3335.32)
Build Info: IDEApplication-3335032000000000~4
Code Type: X86-64 (Native)
Parent Process: launchd [147]
Responsible: Xcode [2184]
User ID: 501
Date/Time: 2014-02-26 18:41:28.657 +0100
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: B5F54D76-660F-C9CE-0C9C-D0D41BA7332B
Sleep/Wake UUID: 9A19E5A2-14DE-40FF-8993-668257EF9F44
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8494673e80> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
ProductBuildVersion: 5A3005
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'workerClass' of extension 'Xcode.DebuggerFoundation.Debugger.LLDB' in plug-in 'com.apple.dt.dbg.DebuggerLLDB'
UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\" UserInfo=0x7f8496dca9a0 {DVTPlugInIdentifierErrorKey=com.apple.dt.dbg.DebuggerLLDB, DVTPlugInExecutablePathErrorKey=/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin, NSLocalizedFailureReason=The plug-in \U201ccom.apple.dt.dbg.DebuggerLLDB\U201d at path \U201c/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin\U201d could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7f8496dc98f0 \"The bundle \U201cDebuggerLLDB\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\"}";
}
Hints:
0: Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8494673e80> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
1: Sending performAction: to <DVTDelayedMenuButtonCell: 0x7f8494674490> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
Backtrace:
0 0x00007fff91211244 __exceptionPreprocess (in CoreFoundation)
1 0x00000001082ddd73 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff940a2e75 objc_exception_throw (in libobjc.A.dylib)
3 0x000000010826bcd2 -[DVTExtension valueForKey:] (in DVTFoundation)
4 0x000000010d3d1109 -[DBGLLDBDebugLocalService operationWorkerWithLaunchSession:error:] (in DebuggerLLDBService)
5 0x0000000110106e17 -[IDERuniPhoneSimulatorService operationWorkerWithLaunchSession:error:] (in IDEiOSSupportCore)
6 0x0000000108d38d49 -[IDERunDestination runWorkerForLaunchSession:error:] (in IDEFoundation)
7 0x0000000108d38a74 -[IDERunDestination runOperationForLaunchSession:error:] (in IDEFoundation)
8 0x0000000108da0fee -[IDELaunchSchemeAction runOperationForExecutionEnvironment:withBuildOperation:buildParameters:buildableProductDirectories:schemeActionRecord:outError:actionCallbackBlock:] (in IDEFoundation)
9 0x0000000108d94f5b -[IDEScheme _executionOperationForExecutionEnvironment:build:onlyBuild:buildPurpose:buildCommand:schemeCommand:title:overridingProperties:destination:buildLog:filePath:overridingBuildConfiguration:restorePersistedBuildResults:invocationRecord:overridingTestingSpecifiers:error:actionCallbackBlock:] (in IDEFoundation)
This may happen due to a broken LLDB debugger, which could only be solved by Apple.
However, I haven't found many similar problems from others on the internet yet, so this may only happen with my Xcode.
I had the same problem: was not able to run any Xcode projects. Reason was I was playing around on Python and downgraded it to 2.6.8 from 2.7.x. So, I have updated the python to 2.7.8 from older version, No problems so far, Xcode deploys everything very smoothly. Other things that I have tried was even uninstalling the X-code and install again, this didn't help. Very useful page to upgrade your python on macbook : http://wolfpaulus.com/jounal/mac/installing_python_osx/
It has nothing to do with your project. Somehow the Xcode.app that you launched has been damaged. Try downloading the latest Xcode from the App Store or ADC.
If this don't helps, try to report your problem: Apple Bug Reporter
If anyone still has the same problem, Apple told me that this happens if a wrong "custom" version of Python is installed. I installed Python 2.7.6 and it worked.

Xcode 5.0.1 iOS 7.0.3 Error with instruments command line tool

I have consistently getting the following error message when trying to launch UIAutomation test with the instruments command line tool:
2013-10-30 12:08:47.868 ScriptAgent[4687:2e07] CLTilesManagerClient:
initialize, sSharedTilesManagerClient
2013-10-30 12:08:47.869 ScriptAgent[4687:2e07] CLTilesManagerClient:
init 2013-10-30 12:08:47.869 ScriptAgent[4687:2e07]
CLTilesManagerClient: reconnecting, 0xa5b0aa0 2013-10-30 12:09:17.989
ScriptAgent[4687:2e07] +[UIAXElement initializeAccessibility]:
UIAutomation never received kAXAccessibilityLoaded. Waited 30.02
seconds. 2013-10-30 12:09:17.990 ScriptAgent[4687:2e07] AXError: Could
not auto-register for pid status change 2013-10-30 12:09:18.008
ScriptAgent[4687:2e07] Failed to enable accessiblity,
kAXErrorServerNotFound 2013-10-30 12:09:18.381
instruments[4633:240f] Automation Instrument ran into an exception
while trying to run the script. UIAScriptAgentSignaledException
2013-10-30 11:09:18 +0000 Fail: An error occurred while trying to run
the script.
Anyone else have this issue?
Thanks for your help.
Try sudo rm /tmp/instruments_sock -- this is the socket file created by instruments.js to communicate with instruments. That file is probably not deleateable for some reason.
That command will delete the file. Alternatively try to change the permission settings for the file.
I also encounter this issue on Xcode 5.0.1, instruments doesn't work even start from UI
but instruments works fine with Xcode 5.0
After some investigation, I found that when instruments is starting, the scriptAgent in iPhoneSimulator SDK crashes.
Process: ScriptAgent [4297]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/usr/bin/ScriptAgent
Identifier: ScriptAgent
Version: 270
Code Type: X86 (Native)
Parent Process: instruments [4208]
Responsible: eclipse [1017]
User ID: 110125050
Date/Time: 2013-11-11 10:52:49.044 +0800
OS Version: Mac OS X 10.9 (13A603)
Report Version: 11
Anonymous UUID: A496DC68-476F-589B-352C-303FA1CD2355
Sleep/Wake UUID: F65E37D7-0AFF-4867-9538-8736C8F0B908
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
iPhone Simulator (external launch) , iPhone OS 7.0.3 (unknown/11B508)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x02e94952 __pthread_kill + 10
1 libsystem_pthread.dylib 0x02e58167 pthread_kill + 101
2 libsystem_sim_c.dylib 0x02b6ae12 abort + 127
3 ScreenReaderCore 0x03db5853 SCRCUncaughtExceptionHandler + 111
4 CoreFoundation 0x005f7a1d __handleUncaughtException + 749
5 libobjc.A.dylib 0x0224ab5c _objc_terminate() + 100
6 libc++abi.dylib 0x02a5bf60 std::__terminate(void (*)()) + 14
7 libc++abi.dylib 0x02a5b97d __cxa_throw + 116
8 libobjc.A.dylib 0x0224a9cd objc_exception_throw + 323
9 CoreFoundation 0x005673bb +[NSException raise:format:] + 139
10 UIAutomation 0x00cbdf54 +[UIAXElement initializeAccessibility] + 668
11 UIAutomation 0x00cc1361 +[UIAXElement uiaxSystemWideElement] + 37
12 UIAutomation 0x00cd76d3 -[UIATarget init] + 317
13 UIAutomation 0x00cd758a +[UIATarget localTarget] + 65
14 ScriptAgent 0x0000ae25 0x1000 + 40485
15 ScriptAgent 0x00005e85 0x1000 + 20101
16 ScriptAgent 0x00008887 0x1000 + 30855
17 libdyld.dylib 0x02d5e70d start + 1
So I replaced iPhoneSimulator7.0.sdk with the one in Xcode 5.0, then this issue is solved.
But I am not sure whether this replacement has any side effect.

Xcode 5.0 Doesn't Symbolicate Crash Log

I have a submitted iOS app and I have the build archive with me. So, I took the crashes from iTunesConnect but when I tried to symbolicate them (dragged the .crash files to Xcode Organizer they didn't get symbolicated. I also pressed the Symbolicate button.
I am using Xcode 5.0, and I am pretty sure that the crashes that I am symbolicating came from the correct version of the build archive that I have.
Any ideas of why it doesn't work?
Thanks!
EDIT
Incident Identifier: E2A64AF6-C8A3-465D-81C3-09674CD18771
Hardware Model: iPhone4,1
Process: MyApp [9551]
Path: /var/mobile/Applications/0B0523C1-0EF9-41D8-AE91-D0C43B8DC00E/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-09-17 16:42:10.390 -0500
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xc2269d62
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3975f5b0 objc_msgSend + 16
1 MyApp 0x00215812 0x100000 + 1136658
2 MyApp 0x00216ca0 0x100000 + 1141920
3 MyApp 0x001494e2 0x100000 + 300258
4 UIKit 0x33898fb0 -[UIApplication _deactivateForReason:notify:] + 396
5 UIKit 0x338cef26 -[UIApplication _handleApplicationSuspend:eventInfo:] + 310
6 UIKit 0x338451e2 -[UIApplication handleEvent:withNewEvent:] + 2454
7 UIKit 0x338446c8 -[UIApplication sendEvent:] + 68
8 UIKit 0x33844116 _UIApplicationHandleEvent + 6150
9 GraphicsServices 0x3555c5a0 _PurpleEventCallback + 588
10 GraphicsServices 0x3555c1ce PurpleEventCallback + 30
11 CoreFoundation 0x31a11170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
12 CoreFoundation 0x31a11112 __CFRunLoopDoSource1 + 134
13 CoreFoundation 0x31a0ff94 __CFRunLoopRun + 1380
14 CoreFoundation 0x31982eb8 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x31982d44 CFRunLoopRunInMode + 100
16 GraphicsServices 0x3555b2e6 GSEventRunModal + 70
17 UIKit 0x338982fc UIApplicationMain + 1116
18 MyApp 0x00148b9a 0x100000 + 297882
19 MyApp 0x001028f4 0x100000 + 10484
Here's one of the crashes.
I had the same problem and for me it was due to the name I had given the Xcode application.
I was still working on production code in 4.6 when the GM version of 5 came out. Prior releases had DPn appended but the GM was called "Xcode" so I renamed it to "Xcode 5". That space was my problem.
Looking in the console log and expanding [symbolicatecrash] stderr: I found the following line after it started looking for my app's symbols:
sh: /Applications/Xcode: No such file or directory
Renaming the application to "Xcode5" and hitting re-symbolicate immediately symbolicated the crash log.
That may not be your exact problem but it's certainly worth expanding that stderr: section in the console log and looking for any errors related to fetching the symbol file for your app.
In my case checking the consol log for [symbolicatecrash] stderr showed nothing specific. I restarted Xcode and checked the consol for error entries generated by Xcode. There were several entries mentioning problems with the keychain. One of my certificates was missing.
I requested new certificates from Xcode by going to:
Preferences>Accounts>View Details
Xcode detected there was a missing certificate and provided the option to submit a request. After going through that process, Xcode was able to re-symbolicate from the Organizer Window as expected.
Make sure that your Xcode application name doesn't contain any spaces. This was the reason it didn't work for me. So /Applications/Xcode.app works, while /Applications/Xcode 6.1.1.app doesn't work.

Resources