rgh rgh - 1 year ago 189
Swift Question

Xcode 7.3 archiving ends but crashes Xcode with error : bundleIdentifier should be a non-empty string, but it's an empty string

An enterprise app written in swift and having dependencies on libraries and frameworks(swift or objc) archives successfully and gives ipa successfully when archived using Xcode 7.2.1 but on Xcode 7.3 the archiving succeeds but crashes without giving an ipa with following error message,

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 7D175
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-10183.3/IDEProducts/DVTProducts/DVTProducts/DVTProducts/DVTProductVersion.m:44
Details: bundleIdentifier should be a non-empty string, but it's an empty string
Object: <DVTProductVersion: 0x7ff47b18ac40>
Method: -initWithBundleIdentifier:version:buildNumber:name:childProducts:productCategory:
Thread: <NSThread: 0x7ff471c18210>{number = 1, name = main}
Hints: None
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[DVTProductVersion initWithBundleIdentifier:version:buildNumber:name:childProducts:productCategory:] (in DVTProducts)
4 +[DVTProductVersion productVersionFromArchive:withError:] (in DVTProducts)
5 -[DVTArchiveProductSource _productsFromArchives:coordinator:] (in DVTProducts)
6 __58-[DVTArchiveProductSource updateArchivesDelayedInvocation]_block_invoke (in DVTProducts)
7 -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
8 -[DVTDelayedInvocation invokeIfNeeded] (in DVTFoundation)
9 -[DVTArchiveProductSource refreshProducts] (in DVTProducts)
10 +[IDEArchivesViewController revealArchive:] (in IDEProductsUI)
11 +[IDEArchivesViewController revealArchiveNotification:] (in IDEProductsUI)
13 ___CFXRegistrationPost_block_invoke (in CoreFoundation)
14 _CFXRegistrationPost (in CoreFoundation)
15 ___CFXNotificationPost_block_invoke (in CoreFoundation)
16 -[_CFXNotificationRegistrar find:object:observer:enumerator:] (in CoreFoundation)
17 _CFXNotificationPost (in CoreFoundation)
18 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
19 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] (in DVTFoundation)
20 __42-[IDEArchiveManager _revealArchiveAtPath:]_block_invoke (in IDEFoundation)
21 ___DVTAsyncPerformBlockOnMainRunLoop_block_invoke (in DVTFoundation)
22 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
23 __CFRunLoopDoBlocks (in CoreFoundation)
24 __CFRunLoopRun (in CoreFoundation)
25 CFRunLoopRunSpecific (in CoreFoundation)
26 RunCurrentEventLoopInMode (in HIToolbox)
27 ReceiveNextEventCommon (in HIToolbox)
28 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
29 _DPSNextEvent (in AppKit)
30 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
31 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
32 -[NSApplication run] (in AppKit)
33 NSApplicationMain (in AppKit)
34 0x000000010028b39b (in Xcode)
35 start (in libdyld.dylib)

abort() called

Any help is appreciated :)

rgh rgh
Answer Source

A workaround was given to this bug by apple(as copy pasted below), and was fixed in Xcode 7.3.1

Hi rgh,

This is a courtesy email regarding Bug ID# 25849118.

Engineering has provided the following feedback regarding this issue:

You can workaround this issue by following these steps:

  1. Close Xcode.
  2. Move ~/Library/Developer/Xcode/Products to a different location.
  3. Reopen Xcode. Attempt rearchiving.

You should then be able to put back your product directory. If the crash still occurs, please let us know.

                                             *** IMPORTANT: PLEASE DO NOT REPLY TO THIS EMAIL! ***

Bugs requiring your attention will appear in the Attention tray at the top of the left-most column on the Bug Reporter website. Please review this bug report and, if necessary, provide any additional requested information by adding the information using the Apple Bug Reporter at http://bugreport.apple.com. When you update your report via the Bug Reporter website, engineering will be alerted about the new information automatically.

Bug Reporter Link: http://bugreport.apple.com/

Thank you for your assistance in helping us discover and isolate bugs in Apple products.

Best Regards,

Developer Bug Reporting Team Apple Worldwide Developer Relations


Bug ID #: 25849118

Bug Title: Xcode 7.3 succeeds archiving but crashes before creation of ipa

Summary: Currently archiving with Xcode 7.2.1 without any issues. As the log suggests i have gone through all libraries, bundles and frameworks which are included as dependencies if any of has missed setting bundle identifier. After confirming nothing is missing it still crashes with the same issue.

Steps to Reproduce: 1. Start archiving. 2. After build succeeds and just before creation of ipa, crash.

Expected Results: IPA

Actual Results: Crash

Version: Xcode 7.3 OSX El Capitan 10.11.4 (15E65)

Notes: Tried deleting all derived data. Did try after setting missing bundle identifier for all included dependencies(frameworks, bundles, libraries).

Configuration: xcode 7.2.1 on the same machine succeeds.

Attachments: 'Xcode_2016-04-19-140323_Raghavendras-MacBook-Pro.crash' was successfully uploaded.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download