-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enterprise export fails with "-[NSNull path]: unrecognized selector sent to instance" #19550
Comments
After further investigation, it turns out the issue happens even when running $ xcodebuild -exportArchive -exportOptionsPlist fastlane/exportPlist.plist -archivePath [REDACTED] -exportPath build/
2021-11-01 11:52:03.141 xcodebuild[2234:1268877] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/[REDACTED]".
2021-11-01 11:52:34.646 xcodebuild[2234:1268877] -[NSNull path]: unrecognized selector sent to instance 0x7fff80701eb0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[NSNull path]: unrecognized selector sent to instance 0x7fff80701eb0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) __retain_OA] (in CoreFoundation)
3 ___forwarding___ (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 -[IDEDistributionProcessingPipeline process:] (in IDEFoundation)
6 -[IDEDistributionPackagingStep loadFromExportOptions:error:] (in IDEFoundation)
7 -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
8 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
9 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
10 main (in xcodebuild)
11 start (in libdyld.dylib)
[1] 2234 abort xcodebuild -exportArchive -exportOptionsPlist fastlane/exportPlist.plist |
@fjcaetano I am also experiencing this with fastlane, although it does sound like it's unrelated to fastlane specifically. You don't happen to have a solution / workaround do you? |
@fjcaetano Actually, based on this comment, it seems like maybe the crash is just hiding some deeper build issue. So there's probably no one size fits all workaround / fix. |
@zac I'm not sure how that issue you linked relates to this one. The workaround for me is to continue configuring the project manually on Xcode instead of using |
I linked to a specific comment that has been hidden. If you expand the hidden comments, you'll see someone with the exact same crash, but attributed to an underlying duplicate symbol issue. Regardless, my guess is we might all have different issues that all manifest in this xcodebuild crash. |
We started migrating some of our projects lately from Cocoapods to SwiftPM, and faced exactly the same issue. Ι initially tried to export without any xcconfig files set but this did not work. Took many hours since the stacktrace was not giving enough information, and using reductio ad absurdum I managed to locate a problematic Swift Package (in my case it was the UIColor-Hex-Swift package). Weirdly enough, this issue is occurring only when used as a Swift Package and not as a Cocoapods Dependency. |
I filed a Radar about the Xcode crash, and it's already fixed in Xcode 13.2 beta.
You can open that folder and find the actual build error in there. |
Hello @NachoSoto , thanks! We're facing the same issue here. Edit: I can't believe it couldn't just print this message. |
After further investigation, it seems there is indeed a Fastlane issue that was brought to surface because of a different, but related problem. The issue was introduced because at lease one of our dependencies is not ready to use bitcode. The Issue descriptionFastlane is not adding Steps to ReproduceThis is an example of the Fastfile that fails when trying to disable bitcode: build_ios_app(
...
export_method: "enterprise",
output_directory: OUT_DIR,
include_bitcode: false, # This has no effect
) Which can be seen in the generated
WorkaroundTo get around this issue, bitcode can be explicitly disabled using the build_ios_app(
...
export_method: "enterprise",
export_options: {
compileBitcode: false,
}
) This has the desired effect, which can be observed in the generated
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
New Issue Checklist
Issue Description
I'm updating my current project's configuration to rely on
.xcconfig
files. Before the change, archiving and exporting enterprise apps were working properly, but after the change, the app is properly archived by Fastlane (and I can export it using Xcode), but exporting the IPA using Fastlane fails with a cryptic error:-[NSNull path]: unrecognized selector sent to instance
The project is configured with an iOS app target, a watchOS target and a watch extension. The change I'm trying to apply is exporting some hardcoded configs to the
.xcconfig
file which include:One unintended consequence of this change is that I now have to explicitly set the provisioning profile mapping as described below. Previously, the mapping was done automatically.
Command executed
The Fastfile is calling the
build_ios_app
action with the following attributes:getXcconfig
is a function that reads the given argument from the.xcconfig
file.Complete output when running fastlane, including the stack trace and command used
2021-10-28 18:31:34.585 xcodebuild[34010:479422] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/[APP_NAME]_2021-10-28_18-31-34.584.xcdistributionlogs".
2021-10-28 18:32:06.780 xcodebuild[34010:479422] -[NSNull path]: unrecognized selector sent to instance 0x7fff80701eb0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[NSNull path]: unrecognized selector sent to instance 0x7fff80701eb0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) __retain_OA] (in CoreFoundation)
3 forwarding (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 -[IDEDistributionProcessingPipeline process:] (in IDEFoundation)
6 -[IDEDistributionPackagingStep loadFromExportOptions:error:] (in IDEFoundation)
7 -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
8 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
9 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
10 main (in xcodebuild)
11 start (in libdyld.dylib)
[REDACTED PATH]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.197.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh: line 61: 34010 Abort trap: 6 xcodebuild "$@"
[18:32:06]: Exit status: 134
+---------------+-------------------------+
| Build environment |
+---------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.197.0 |
| export_method | enterprise |
| sdk | iPhoneOS15.0.sdk |
+---------------+-------------------------+
[18:32:06]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/RxSwift/Package.swift: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'RxSwift' from project 'RxSwift')
[18:32:06]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/TagListView/Package.swift: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'TagListView' from project 'TagListView')
[18:32:06]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/TagListView/Package.swift: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'TagListView' from project 'TagListView')
[18:32:06]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/RxSwift/Package.swift: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'RxSwift' from project 'RxSwift')
[18:32:06]: ▸ ** ARCHIVE SUCCEEDED **
[18:32:06]:
[18:32:06]: ⬆️ Check out the few lines of raw
xcodebuild
output above for potential hints on how to solve this error[18:32:06]: 📋 For the complete and more detailed error log, check the full log at:
[18:32:06]: 📋 /Users/flaviocaetano2/Library/Logs/gym/[REDACTED]-[APP_NAME].log
[18:32:06]:
[18:32:06]: Looks like fastlane ran into a build/archive error with your project
[18:32:06]: It's hard to tell what's causing the error, so we wrote some guides on how
[18:32:06]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[18:32:06]: Before submitting an issue on GitHub, please follow the guide above and make
[18:32:06]: sure your project is set up correctly.
[18:32:06]: fastlane uses
xcodebuild
commands to generate your binary, you can see the[18:32:06]: the full commands printed out in yellow in the above log.
[18:32:06]: Make sure to inspect the output above, as usually you'll find more error information there
[18:32:06]:
+------------------+--------------+
| Lane Context |
+------------------+--------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios build_qa |
| BUILD_NUMBER | 1 |
+------------------+--------------+
[18:32:06]: Error packaging up the application
+------+------------------------+-------------+
| fastlane summary |
+------+------------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | increment_build_number | 0 |
| 💥 | build_ios_app | 56 |
+------+------------------------+-------------+
[18:32:06]: fastlane finished with errors
[!] Error packaging up the application
Environment
The text was updated successfully, but these errors were encountered: