Skip to content
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

Closed
4 tasks done
fjcaetano opened this issue Oct 28, 2021 · 11 comments
Closed
4 tasks done

Comments

@fjcaetano
Copy link
Contributor

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:

PRODUCT_BUNDLE_IDENTIFIER

// Signing
DEVELOPMENT_TEAM
CODE_SIGN_IDENTITY
PROVISIONING_PROFILE_SPECIFIER
WATCH_PROVISIONING_PROFILE_SPECIFIER
WATCH_EXT_PROVISIONING_PROFILE_SPECIFIER

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.

⚠️ The error being thrown when exporting the archived build is:

+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_config20211028-33798-1blgcct.plist -archivePath '/Users/flaviocaetano2/Library/Developer/Xcode/Archives/2021-10-28/[REDACTED] 2021-10-28 18.21.53.xcarchive' -exportPath /var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_output20211028-33798-17lghxy
2021-10-28 18:31:34.585 xcodebuild[34010:479422] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/[REDACTED]_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)

/Users/flaviocaetano2/github/[REDACTED]/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
Command executed

The Fastfile is calling the build_ios_app action with the following attributes:

    bundle_id = getXcconfig('PRODUCT_BUNDLE_IDENTIFIER')

    build_ios_app(
      workspace: WORKSPACE_PATH,
      configuration: "Release",
      scheme: SCHEME_NAME,
      output_directory: OUT_DIR,
      clean: true,
      export_method: "enterprise",
      export_options: {
        provisioningProfiles: { 
          "#{bundle_id}" => getXcconfig("PROVISIONING_PROFILE_SPECIFIER"),
          "#{bundle_id}.watchkitapp" => getXcconfig("WATCH_PROVISIONING_PROFILE_SPECIFIER"),
          "#{bundle_id}.watchkitapp.watchkitextension" => getXcconfig("WATCH_EXT_PROVISIONING_PROFILE_SPECIFIER"),
        }
      }
    )

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
 
[✔] 🚀 
+---------------------------+---------+---------------------------------------------------------------------------+
|                                                  Used plugins                                                   |
+---------------------------+---------+---------------------------------------------------------------------------+
| Plugin                    | Version | Action                                                                    |
+---------------------------+---------+---------------------------------------------------------------------------+
| fastlane-plugin-appcenter | 1.11.1  | appcenter_fetch_version_number, appcenter_fetch_devices, appcenter_upload |
+---------------------------+---------+---------------------------------------------------------------------------+

18:31:08: --- Step: default_platform ---
18:31:08: ------------------------------
18:31:08: Driving the lane 'ios build_qa' 🚀
18:31:08: ------------------------------------
18:31:08: --- Step: increment_build_number ---
18:31:08: ------------------------------------
Current version of project [APP_NAME] is:
1

[REDACTED PATH]
18:31:08: $ cd [REDACTED PATH] && agvtool new-version 1 && cd -
18:31:08: ▸ Setting version of project [APP_NAME] to:
18:31:08: ▸ 1.
18:31:08: ▸ [REDACTED PATH]
[18:31:09]: ---------------------------
[18:31:09]: --- Step: build_ios_app ---
[18:31:09]: ---------------------------
[18:31:10]: Resolving Swift Package Manager dependencies...
[18:31:10]: $ xcodebuild -resolvePackageDependencies -workspace [APP_NAME].xcworkspace -scheme [APP_NAME] -configuration Release
[18:31:10]: ▸ Command line invocation:
[18:31:10]: ▸ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace [APP_NAME].xcworkspace -scheme [APP_NAME] -configuration Release
[18:31:10]: ▸ User defaults from command line:
[18:31:10]: ▸ IDEPackageSupportUseBuiltinSCM = YES
[18:31:11]: ▸ Resolve Package Graph
[18:31:15]: ▸ found 6 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/Particles/Fragment.png
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/Info.plist
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/tvOS-Info.plist
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/Particles/Sparkle.png
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/Particles/Fire.png
[18:31:15]: ▸ /Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/LTMorphingLabel/LTMorphingLabel/Particles/Smoke.png
[18:31:16]: ▸ Invalid Resource 'Particles/*.png': File not found.Invalid Exclude '/Users/flaviocaetano2/Library/Developer/Xcode/DerivedData/[APP_NAME]-ajpwkojncmsoumcizbqqgucmtkcw/SourcePackages/checkouts/Spectre/Sources/Spectre/XCTest@4.swift': File not found.ignoring declared target(s) 'swift-nio-zlib-support' in the system package
[18:31:16]: ▸ Resolved source packages:
[18:31:16]: ▸ SDWebImageSwiftUI: https://github.com/SDWebImage/SDWebImageSwiftUI.git @ 1.5.0
[18:31:16]: ▸ [REDACTED]GraphQL: [REDACTED PATH]/LocalPackages/[REDACTED]GraphQL
[18:31:16]: ▸ leveldb: https://github.com/firebase/leveldb.git @ 1.22.2
[18:31:16]: ▸ Spectre: https://github.com/kylef/Spectre.git @ 0.9.2
[18:31:16]: ▸ Reachability: https://github.com/ashleymills/Reachability.swift @ 5.1.0
[18:31:16]: ▸ RxSwift: https://github.com/ReactiveX/RxSwift.git @ 5.1.3
[18:31:16]: ▸ Parma: https://github.com/dasautoooo/Parma @ 0.3.0
[18:31:16]: ▸ Apptimize: https://github.com/urbanairship/apptimize-ios-kit @ 3.4.20
[18:31:16]: ▸ Starscream: https://github.com/daltoniam/Starscream @ 3.1.1
[18:31:16]: ▸ SDWebImageWebPCoder: https://github.com/SDWebImage/SDWebImageWebPCoder.git @ 0.8.4
[18:31:16]: ▸ SQLite.swift: https://github.com/stephencelis/SQLite.swift.git @ 0.12.2
[18:31:16]: ▸ SwizzleSwift: https://github.com/Amzd/SwizzleSwift @ 1.0.0
[18:31:16]: ▸ GoogleDataTransport: https://github.com/google/GoogleDataTransport.git @ 9.1.2
[18:31:16]: ▸ SwiftProtobuf: https://github.com/apple/swift-protobuf.git @ 1.18.0
[18:31:16]: ▸ Down: https://github.com/iwasrobbed/Down @ 0.11.0
[18:31:16]: ▸ TealiumSwift: https://github.com/tealium/tealium-swift @ 2.4.6
[18:31:16]: ▸ TagListView: https://github.com/ElaWorkshop/TagListView @ 1.4.1
[18:31:16]: ▸ libwebp: https://github.com/SDWebImage/libwebp-Xcode.git @ 1.2.1
[18:31:16]: ▸ R.swift.Library: https://github.com/mac-cain13/R.swift.Library @ 5.4.0
[18:31:16]: ▸ GoogleAppMeasurement: https://github.com/google/GoogleAppMeasurement.git @ 8.9.0
[18:31:16]: ▸ SwiftKeychainWrapper: https://github.com/jrendel/SwiftKeychainWrapper @ 4.0.1
[18:31:16]: ▸ WSTagsField: https://github.com/whitesmith/WSTagsField @ 5.4.0
[18:31:16]: ▸ Apollo: https://github.com/apollographql/apollo-ios.git @ 0.33.0
[18:31:16]: ▸ IQKeyboardManagerSwift: https://github.com/hackiftekhar/IQKeyboardManager.git @ 6.5.6
[18:31:16]: ▸ [REDACTED]Networking: git@gitlab.com:[REDACTED]/mobile-applications/ios/[REDACTED]-rest-ios.git @ 0.1.2
[18:31:16]: ▸ Stencil: https://github.com/stencilproject/Stencil.git @ 0.13.1
[18:31:16]: ▸ GTMSessionFetcher: https://github.com/google/gtm-session-fetcher.git @ 1.7.0
[18:31:16]: ▸ SwiftMessages: https://github.com/SwiftKickMobile/SwiftMessages.git @ work/9.0.4
[18:31:16]: ▸ [REDACTED]UI: git@gitlab.com:[REDACTED]/mobile-applications/ios/[REDACTED]UI.git @ 0.2.27
[18:31:16]: ▸ nanopb: https://github.com/firebase/nanopb.git @ 2.30908.0
[18:31:16]: ▸ BoringSSL-GRPC: https://github.com/firebase/boringssl-SwiftPM.git @ 0.7.2
[18:31:16]: ▸ swift-nio-zlib-support: https://github.com/apple/swift-nio-zlib-support.git @ 1.0.0
[18:31:16]: ▸ Veil: https://github.com/DanielCardonaRojas/Veil.git @ 0.2.0
[18:31:16]: ▸ SwiftyGif: https://github.com/kirualex/SwiftyGif.git @ 5.4.0
[18:31:16]: ▸ Firebase: https://github.com/firebase/firebase-ios-sdk.git @ 8.9.0
[18:31:16]: ▸ MorphingLabel: https://github.com/lexrus/LTMorphingLabel @ 0.9.3
[18:31:16]: ▸ gRPC: https://github.com/firebase/grpc-SwiftPM.git @ 1.28.4
[18:31:16]: ▸ GoogleUtilities: https://github.com/google/GoogleUtilities.git @ 7.6.0
[18:31:16]: ▸ [REDACTED]BrokerController: git@gitlab.com:[REDACTED]/mobile-applications/ios/[REDACTED]-mqtt-ios.git @ 0.1.18
[18:31:16]: ▸ abseil: https://github.com/firebase/abseil-cpp-SwiftPM.git @ 0.20200225.4
[18:31:16]: ▸ PathKit: https://github.com/kylef/PathKit.git @ 0.9.2
[18:31:16]: ▸ [REDACTED]Logger: git@gitlab.com:[REDACTED]/mobile-applications/ios/[REDACTED]-logger-ios.git @ 0.1.2
[18:31:16]: ▸ Promises: https://github.com/google/promises.git @ 2.0.0
[18:31:16]: ▸ ResponderChain: https://github.com/Amzd/ResponderChain.git @ 1.1.2
[18:31:16]: ▸ Introspect: https://github.com/siteline/SwiftUI-Introspect.git @ 0.1.3
[18:31:16]: ▸ SDWebImage: https://github.com/SDWebImage/SDWebImage.git @ 5.12.1
[18:31:16]: ▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[18:31:16]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
[18:31:16]: ▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
[18:31:16]: ▸ { platform:iOS Simulator, id:A911C41B-ADEB-4133-B549-641F0A39B4BA, OS:15.0, name:iPhone 8 }
[18:31:16]: ▸ { platform:iOS Simulator, id:A4DB518A-E1B5-4E8E-8242-F8526350AC32, OS:15.0, name:iPhone 8 Plus }
[18:31:16]: ▸ { platform:iOS Simulator, id:81E47E6B-D6C3-47A5-9468-6A4ACD9F0E00, OS:15.0, name:iPhone 11 }
[18:31:16]: ▸ { platform:iOS Simulator, id:2A11CFD8-BFED-4E5E-91EF-4E39B9E4CA9A, OS:15.0, name:iPhone 11 Pro }
[18:31:16]: ▸ { platform:iOS Simulator, id:1B5045D5-777D-472C-9C29-84C00854072D, OS:15.0, name:iPhone 11 Pro Max }
[18:31:16]: ▸ { platform:iOS Simulator, id:A6C014FB-C218-49CB-9AEE-6D6F8C77D458, OS:15.0, name:iPhone 12 }
[18:31:16]: ▸ { platform:iOS Simulator, id:0403A72A-8CBF-4829-A104-6FB29C2CD444, OS:15.0, name:iPhone 12 Pro }
[18:31:16]: ▸ { platform:iOS Simulator, id:0F77315C-D507-4869-B9E4-CD838F79F116, OS:15.0, name:iPhone 12 Pro Max }
[18:31:16]: ▸ { platform:iOS Simulator, id:106EDB2B-7427-4B5B-9E52-422AD7936ED0, OS:15.0, name:iPhone 12 mini }
[18:31:16]: ▸ { platform:iOS Simulator, id:F272BC52-7A32-4022-AF13-CC4AB39F8270, OS:15.0, name:iPhone 13 }
[18:31:16]: ▸ { platform:iOS Simulator, id:89575697-9ACB-4595-A8A5-AFD76624A2C9, OS:15.0, name:iPhone 13 Pro }
[18:31:16]: ▸ { platform:iOS Simulator, id:46C32C34-62BB-41F0-84F8-12A21DB637A5, OS:15.0, name:iPhone 13 Pro Max }
[18:31:16]: ▸ { platform:iOS Simulator, id:EBB38C10-B35C-4BC6-8407-B4591BD33323, OS:15.0, name:iPhone 13 mini }
[18:31:16]: ▸ { platform:iOS Simulator, id:F9191D0E-A6C1-415E-A757-DB02AE917333, OS:15.0, name:iPhone SE (2nd generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:02B5EE9E-928D-457F-B4D9-80C07BF4F781, OS:15.0, name:iPod touch (7th generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:426A31BF-DFEC-4DFF-983C-992B8EA6B3DF, OS:15.0, name:iPad (9th generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:B1C6C799-67BF-4594-93FD-F8F4AFA69BF0, OS:15.0, name:iPad Air (4th generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:1834C85D-2ECE-4A3D-BC56-AE494BDCC704, OS:15.0, name:iPad Pro (9.7-inch) }
[18:31:16]: ▸ { platform:iOS Simulator, id:D6B2F586-BF75-43BB-88AB-06FABA039795, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:EE696BD4-85EC-454D-938F-DCC80ABCA49D, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
[18:31:16]: ▸ { platform:iOS Simulator, id:8270BF16-1063-4023-8159-6C981911FDE9, OS:15.0, name:iPad mini (6th generation) }
[18:31:16]: ▸ resolved source packages: SDWebImageSwiftUI, [REDACTED]GraphQL, leveldb, Spectre, Reachability, RxSwift, Parma, Apptimize, Starscream, SDWebImageWebPCoder, SQLite.swift, SwizzleSwift, GoogleDataTransport, SwiftProtobuf, Down, TealiumSwift, TagListView, libwebp, R.swift.Library, GoogleAppMeasurement, SwiftKeychainWrapper, WSTagsField, Apollo, IQKeyboardManagerSwift, [REDACTED]Networking, Stencil, GTMSessionFetcher, SwiftMessages, [REDACTED]UI, nanopb, BoringSSL-GRPC, swift-nio-zlib-support, Veil, SwiftyGif, Firebase, MorphingLabel, gRPC, GoogleUtilities, [REDACTED]BrokerController, abseil, PathKit, [REDACTED]Logger, Promises, ResponderChain, Introspect, SDWebImage
[18:31:16]: $ xcodebuild -showBuildSettings -workspace [APP_NAME].xcworkspace -scheme [APP_NAME] -configuration Release
[18:31:19]: Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
[18:31:25]: Command timed out after 6 seconds on try 2 of 4, trying again with a 12 second timeout...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:A911C41B-ADEB-4133-B549-641F0A39B4BA, OS:15.0, name:iPhone 8 }
{ platform:iOS Simulator, id:A4DB518A-E1B5-4E8E-8242-F8526350AC32, OS:15.0, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:81E47E6B-D6C3-47A5-9468-6A4ACD9F0E00, OS:15.0, name:iPhone 11 }
{ platform:iOS Simulator, id:2A11CFD8-BFED-4E5E-91EF-4E39B9E4CA9A, OS:15.0, name:iPhone 11 Pro }
{ platform:iOS Simulator, id:1B5045D5-777D-472C-9C29-84C00854072D, OS:15.0, name:iPhone 11 Pro Max }
{ platform:iOS Simulator, id:A6C014FB-C218-49CB-9AEE-6D6F8C77D458, OS:15.0, name:iPhone 12 }
{ platform:iOS Simulator, id:0403A72A-8CBF-4829-A104-6FB29C2CD444, OS:15.0, name:iPhone 12 Pro }
{ platform:iOS Simulator, id:0F77315C-D507-4869-B9E4-CD838F79F116, OS:15.0, name:iPhone 12 Pro Max }
{ platform:iOS Simulator, id:106EDB2B-7427-4B5B-9E52-422AD7936ED0, OS:15.0, name:iPhone 12 mini }
{ platform:iOS Simulator, id:F272BC52-7A32-4022-AF13-CC4AB39F8270, OS:15.0, name:iPhone 13 }
{ platform:iOS Simulator, id:89575697-9ACB-4595-A8A5-AFD76624A2C9, OS:15.0, name:iPhone 13 Pro }
{ platform:iOS Simulator, id:46C32C34-62BB-41F0-84F8-12A21DB637A5, OS:15.0, name:iPhone 13 Pro Max }
{ platform:iOS Simulator, id:EBB38C10-B35C-4BC6-8407-B4591BD33323, OS:15.0, name:iPhone 13 mini }
{ platform:iOS Simulator, id:F9191D0E-A6C1-415E-A757-DB02AE917333, OS:15.0, name:iPhone SE (2nd generation) }
{ platform:iOS Simulator, id:02B5EE9E-928D-457F-B4D9-80C07BF4F781, OS:15.0, name:iPod touch (7th generation) }
{ platform:iOS Simulator, id:426A31BF-DFEC-4DFF-983C-992B8EA6B3DF, OS:15.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:B1C6C799-67BF-4594-93FD-F8F4AFA69BF0, OS:15.0, name:iPad Air (4th generation) }
{ platform:iOS Simulator, id:1834C85D-2ECE-4A3D-BC56-AE494BDCC704, OS:15.0, name:iPad Pro (9.7-inch) }
{ platform:iOS Simulator, id:D6B2F586-BF75-43BB-88AB-06FABA039795, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:EE696BD4-85EC-454D-938F-DCC80ABCA49D, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:8270BF16-1063-4023-8159-6C981911FDE9, OS:15.0, name:iPad mini (6th generation) }
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:A911C41B-ADEB-4133-B549-641F0A39B4BA, OS:15.0, name:iPhone 8 }
{ platform:iOS Simulator, id:A4DB518A-E1B5-4E8E-8242-F8526350AC32, OS:15.0, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:81E47E6B-D6C3-47A5-9468-6A4ACD9F0E00, OS:15.0, name:iPhone 11 }
{ platform:iOS Simulator, id:2A11CFD8-BFED-4E5E-91EF-4E39B9E4CA9A, OS:15.0, name:iPhone 11 Pro }
{ platform:iOS Simulator, id:1B5045D5-777D-472C-9C29-84C00854072D, OS:15.0, name:iPhone 11 Pro Max }
{ platform:iOS Simulator, id:A6C014FB-C218-49CB-9AEE-6D6F8C77D458, OS:15.0, name:iPhone 12 }
{ platform:iOS Simulator, id:0403A72A-8CBF-4829-A104-6FB29C2CD444, OS:15.0, name:iPhone 12 Pro }
{ platform:iOS Simulator, id:0F77315C-D507-4869-B9E4-CD838F79F116, OS:15.0, name:iPhone 12 Pro Max }
{ platform:iOS Simulator, id:106EDB2B-7427-4B5B-9E52-422AD7936ED0, OS:15.0, name:iPhone 12 mini }
{ platform:iOS Simulator, id:F272BC52-7A32-4022-AF13-CC4AB39F8270, OS:15.0, name:iPhone 13 }
{ platform:iOS Simulator, id:89575697-9ACB-4595-A8A5-AFD76624A2C9, OS:15.0, name:iPhone 13 Pro }
{ platform:iOS Simulator, id:46C32C34-62BB-41F0-84F8-12A21DB637A5, OS:15.0, name:iPhone 13 Pro Max }
{ platform:iOS Simulator, id:EBB38C10-B35C-4BC6-8407-B4591BD33323, OS:15.0, name:iPhone 13 mini }
{ platform:iOS Simulator, id:F9191D0E-A6C1-415E-A757-DB02AE917333, OS:15.0, name:iPhone SE (2nd generation) }
{ platform:iOS Simulator, id:02B5EE9E-928D-457F-B4D9-80C07BF4F781, OS:15.0, name:iPod touch (7th generation) }
{ platform:iOS Simulator, id:426A31BF-DFEC-4DFF-983C-992B8EA6B3DF, OS:15.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:B1C6C799-67BF-4594-93FD-F8F4AFA69BF0, OS:15.0, name:iPad Air (4th generation) }
{ platform:iOS Simulator, id:1834C85D-2ECE-4A3D-BC56-AE494BDCC704, OS:15.0, name:iPad Pro (9.7-inch) }
{ platform:iOS Simulator, id:D6B2F586-BF75-43BB-88AB-06FABA039795, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:EE696BD4-85EC-454D-938F-DCC80ABCA49D, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:8270BF16-1063-4023-8159-6C981911FDE9, OS:15.0, name:iPad mini (6th generation) }
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:A911C41B-ADEB-4133-B549-641F0A39B4BA, OS:15.0, name:iPhone 8 }
{ platform:iOS Simulator, id:A4DB518A-E1B5-4E8E-8242-F8526350AC32, OS:15.0, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:81E47E6B-D6C3-47A5-9468-6A4ACD9F0E00, OS:15.0, name:iPhone 11 }
{ platform:iOS Simulator, id:2A11CFD8-BFED-4E5E-91EF-4E39B9E4CA9A, OS:15.0, name:iPhone 11 Pro }
{ platform:iOS Simulator, id:1B5045D5-777D-472C-9C29-84C00854072D, OS:15.0, name:iPhone 11 Pro Max }
{ platform:iOS Simulator, id:A6C014FB-C218-49CB-9AEE-6D6F8C77D458, OS:15.0, name:iPhone 12 }
{ platform:iOS Simulator, id:0403A72A-8CBF-4829-A104-6FB29C2CD444, OS:15.0, name:iPhone 12 Pro }
{ platform:iOS Simulator, id:0F77315C-D507-4869-B9E4-CD838F79F116, OS:15.0, name:iPhone 12 Pro Max }
{ platform:iOS Simulator, id:106EDB2B-7427-4B5B-9E52-422AD7936ED0, OS:15.0, name:iPhone 12 mini }
{ platform:iOS Simulator, id:F272BC52-7A32-4022-AF13-CC4AB39F8270, OS:15.0, name:iPhone 13 }
{ platform:iOS Simulator, id:89575697-9ACB-4595-A8A5-AFD76624A2C9, OS:15.0, name:iPhone 13 Pro }
{ platform:iOS Simulator, id:46C32C34-62BB-41F0-84F8-12A21DB637A5, OS:15.0, name:iPhone 13 Pro Max }
{ platform:iOS Simulator, id:EBB38C10-B35C-4BC6-8407-B4591BD33323, OS:15.0, name:iPhone 13 mini }
{ platform:iOS Simulator, id:F9191D0E-A6C1-415E-A757-DB02AE917333, OS:15.0, name:iPhone SE (2nd generation) }
{ platform:iOS Simulator, id:02B5EE9E-928D-457F-B4D9-80C07BF4F781, OS:15.0, name:iPod touch (7th generation) }
{ platform:iOS Simulator, id:426A31BF-DFEC-4DFF-983C-992B8EA6B3DF, OS:15.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:B1C6C799-67BF-4594-93FD-F8F4AFA69BF0, OS:15.0, name:iPad Air (4th generation) }
{ platform:iOS Simulator, id:1834C85D-2ECE-4A3D-BC56-AE494BDCC704, OS:15.0, name:iPad Pro (9.7-inch) }
{ platform:iOS Simulator, id:D6B2F586-BF75-43BB-88AB-06FABA039795, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:EE696BD4-85EC-454D-938F-DCC80ABCA49D, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:8270BF16-1063-4023-8159-6C981911FDE9, OS:15.0, name:iPad mini (6th generation) }
[18:31:33]: Couldn't automatically detect the provisioning profile mapping
[18:31:33]: There were multiple profiles for bundle identifier(s): co.work.[REDACTED]
[18:31:33]: You need to provide an explicit mapping of what provisioning
[18:31:33]: profile to use for each bundle identifier of your app
[18:31:33]: Couldn't automatically detect the provisioning profile mapping
[18:31:33]: There were multiple profiles for bundle identifier(s): co.work.[REDACTED]
[18:31:33]: You need to provide an explicit mapping of what provisioning
[18:31:33]: profile to use for each bundle identifier of your app
[18:31:33]: Couldn't automatically detect the provisioning profile mapping
[18:31:33]: There were multiple profiles for bundle identifier(s): co.work.[REDACTED]
[18:31:33]: You need to provide an explicit mapping of what provisioning
[18:31:33]: profile to use for each bundle identifier of your app
[18:31:33]: Couldn't automatically detect the provisioning profile mapping
[18:31:33]: There were multiple profiles for bundle identifier(s): co.work.[REDACTED]
[18:31:33]: You need to provide an explicit mapping of what provisioning
[18:31:33]: profile to use for each bundle identifier of your app
[18:31:33]: Detected provisioning profile mapping: {:"co.work.[REDACTED]"=>"match InHouse co.work.[REDACTED]", :"co.work.[REDACTED].watchkitapp"=>"match InHouse co.work.[REDACTED].watchkitapp", :"co.work.[REDACTED].watchkitapp.watchkitextension"=>"match InHouse co.work.[REDACTED].watchkitapp.watchkitextension"}

+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Summary for gym 2.197.0 |
+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| workspace | [APP_NAME].xcworkspace |
| configuration | Release |
| scheme | [APP_NAME] |
| output_directory | ./build/ |
| skip_build_archive | true |
| archive_path | /Users/flaviocaetano2/Library/Developer/Xcode/Archives/2021-10-28/[REDACTED] 2021-10-28 18.21.53.xcarchive |
| export_method | enterprise |
| export_options.provisioningProfiles.co.work.[REDACTED] | match InHouse co.work.[REDACTED] |
| export_options.provisioningProfiles.co.work.[REDACTED].watchkitapp | match InHouse co.work.[REDACTED].watchkitapp |
| export_options.provisioningProfiles.co.work.[REDACTED].watchkitapp.watchkitextension | match InHouse co.work.[REDACTED].watchkitapp.watchkitextension |
| catalyst_platform | ios |
| clean | false |
| output_name | [REDACTED] |
| silent | false |
| skip_package_ipa | false |
| build_path | /Users/flaviocaetano2/Library/Developer/Xcode/Archives/2021-10-28 |
| result_bundle | false |
| buildlog_path | ~/Library/Logs/gym |
| destination | generic/platform=iOS |
| skip_profile_detection | false |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| skip_package_pkg | false |
| xcode_path | /Applications/Xcode.app |
+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+

[18:31:33]: Generated plist file with the following values:
[18:31:33]: ▸ -----------------------------------------
[18:31:33]: ▸ {
[18:31:33]: ▸ "provisioningProfiles": {
[18:31:33]: ▸ "co.work.[REDACTED]": "match InHouse co.work.[REDACTED]",
[18:31:33]: ▸ "co.work.[REDACTED].watchkitapp": "match InHouse co.work.[REDACTED].watchkitapp",
[18:31:33]: ▸ "co.work.[REDACTED].watchkitapp.watchkitextension": "match InHouse co.work.[REDACTED].watchkitapp.watchkitextension"
[18:31:33]: ▸ },
[18:31:33]: ▸ "method": "enterprise",
[18:31:33]: ▸ "signingStyle": "manual"
[18:31:33]: ▸ }
[18:31:33]: ▸ -----------------------------------------
[18:31:33]: $ /usr/bin/xcrun [REDACTED PATH]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.197.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_config20211028-33798-1blgcct.plist' -archivePath /Users/flaviocaetano2/Library/Developer/Xcode/Archives/2021-10-28/[REDACTED]\ 2021-10-28\ 18.21.53.xcarchive -exportPath '/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_output20211028-33798-17lghxy'

  • xcodebuild -exportArchive -exportOptionsPlist /var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_config20211028-33798-1blgcct.plist -archivePath '/Users/flaviocaetano2/Library/Developer/Xcode/Archives/2021-10-28/[REDACTED] 2021-10-28 18.21.53.xcarchive' -exportPath /var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/gym_output20211028-33798-17lghxy
    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

 
✅ fastlane environment ✅

Stack

Key Value
OS 11.6
Ruby 2.6.3
Bundler? true
Git git version 2.30.1 (Apple Git-130)
Installation Source [REDACTED]
Host macOS 11.6 (20G165)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
OpenSSL Version LibreSSL 2.8.3
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.1
Swift Version 5.5.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
OUT_DIR = ENV['BITRISE_DEPLOY_DIR'] || './build/'
BUILD_NUMBER = ENV["BITRISE_BUILD_NUMBER"] || '1'
APP_CENTER_ACCESS_TOKEN = ENV['APP_CENTER_ACCESS_TOKEN']

default_platform(:ios)

platform :ios do
  desc "Runs all the tests including unit and screenshot tests"
  lane :test do
    install_pods

    run_tests(
      workspace: "[REDACTED].xcworkspace",
      configuration: "Debug",
      scheme: "[REDACTED]",
      cloned_source_packages_path: Helper.is_ci? ? './SourcePackages' : nil,
      disable_package_automatic_updates: true,
      device: "iPhone 12 Pro (14.5)",
    )
  end

  desc '''
  Builds iOS app for enterprise distribution.

  Increases the build number by setting either `$BITRISE_BUILD_NUMBER` or 1 if unset.
  '''
  lane :build_qa do
    install_pods
    
    increment_build_number(
      build_number: BUILD_NUMBER,
      skip_info_plist: true,
    )

    bundle_id = getXcconfig('PRODUCT_BUNDLE_IDENTIFIER')

    build_ios_app(
      workspace: "[REDACTED].xcworkspace",
      configuration: "Release",
      scheme: "[REDACTED]",
      output_directory: OUT_DIR,
      clean: true,
      export_method: "enterprise",
      export_options: {
        provisioningProfiles: { 
          "#{bundle_id}" => getXcconfig("PROVISIONING_PROFILE_SPECIFIER"),
          "#{bundle_id}.watchkitapp" => getXcconfig("WATCH_PROVISIONING_PROFILE_SPECIFIER"),
          "#{bundle_id}.watchkitapp.watchkitextension" => getXcconfig("WATCH_EXT_PROVISIONING_PROFILE_SPECIFIER"),
        }
      }
    )
  end

  desc '''
  Builds iOS app using the `build_qa` lane and distributes to AppCenter.

  The app is distributed with a release note created from the changelog down to the last deployment.
  '''
  lane :deploy_qa do
    build_qa

    changelog = build_changelog()

    appcenter_upload(
      api_token: APP_CENTER_ACCESS_TOKEN,
      app_name: "[REDACTED]",
      owner_name: 'Work-Co',
      owner_type: 'organization',
      destinations: 'Work & Co, [REDACTED]',
      file: lane_context[SharedValues::IPA_OUTPUT_PATH],
      dsym: lane_context[SharedValues::DSYM_OUTPUT_PATH],
      notify_testers: true,
      release_notes: changelog,
    )
  end

  desc '''
  Builds and distributes the iOS app using the `deploy_qa` lane.

  This lane is called by the automated scheduled job and it creates a git tag with the current date and CI build number.

  See [ci/README.md](../ci/README.md) for more details
  '''
  lane :deploy_scheduled_qa do
    deploy_qa

    date = Time.now.strftime('%Y%m%d')
    tag_name = "build/#{date}.0.#{BUILD_NUMBER}"
    
    add_git_tag(
      tag: tag_name,
    )

    push_git_tags(
      tag: tag_name,
    )
  end
end

def install_pods()
  if Helper.is_ci?
    cocoapods(
      try_repo_update_on_error: true,
    )
  end
end

def build_changelog()
  git_pull(only_tags: true)

  Dir.chdir('../ci/') do
    sh('npm i')
    sh('npm run changelog')
    sh('cat CHANGELOG.md')
  end
end

def getXcconfig(key, xcconfig = "Shared.xcconfig")
  fastlane_require 'Xcodeproj'

  # Compose .xcconfig file path
  configuration_file = "../[REDACTED]/Resources/#{xcconfig}"

  # Read values from the .xcconfig file
  configuration = Xcodeproj::Config.new(configuration_file)
  configuration.attributes[key]
end
`./fastlane/Appfile`
app_identifier "[REDACTED]"
apple_id "[REDACTED]"

fastlane gems

Gem Version Update-Status
fastlane 2.197.0 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-appcenter 1.11.1 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.3.0
bundler 2.2.30
rake 13.0.6
rexml 3.2.5
CFPropertyList 3.0.4
concurrent-ruby 1.1.9
i18n 1.8.10
minitest 5.14.4
tzinfo 2.0.4
zeitwerk 2.4.2
activesupport 6.1.4.1
public_suffix 4.0.6
addressable 2.8.0
httpclient 2.8.3
json 2.6.1
algoliasearch 1.27.5
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.2.0
aws-partitions 1.520.1
aws-sigv4 1.4.0
jmespath 1.4.0
aws-sdk-core 3.121.3
aws-sdk-kms 1.50.0
aws-sdk-s3 1.104.0
babosa 1.0.4
claide 1.0.3
fuzzy_match 2.0.4
nap 1.1.0
netrc 0.11.0
ffi 1.15.4
ethon 0.15.0
typhoeus 1.4.0
cocoapods-core 1.11.2
cocoapods-deintegrate 1.0.5
cocoapods-downloader 1.5.1
cocoapods-plugins 1.0.0
cocoapods-search 1.0.1
cocoapods-trunk 1.6.0
cocoapods-try 1.2.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.3.1
gh_inspector 1.1.3
molinillo 0.8.0
ruby-macho 2.5.1
nanaimo 0.3.0
xcodeproj 1.21.0
cocoapods 1.11.2
colored 1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.4
unf_ext 0.0.8
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.3
excon 0.88.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
multipart-post 2.0.0
ruby2_keywords 0.0.5
faraday 1.8.0
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.2.5
jwt 2.3.0
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.16.0
googleauth 1.1.0
mini_mime 1.1.2
trailblazer-option 0.1.1
uber 0.1.0
representable 3.1.1
retriable 3.1.2
webrick 1.7.0
google-apis-core 0.4.1
google-apis-androidpublisher_v3 0.13.0
google-apis-playcustomapp_v1 0.6.0
google-apis-iamcredentials_v1 0.8.0
google-apis-storage_v1 0.9.0
google-cloud-env 1.5.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-cloud-storage 1.34.1
mini_magick 4.11.0
naturally 2.2.1
optparse 0.1.1
plist 3.6.0
rubyzip 2.3.2
security 0.1.3
simctl 1.6.8
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
fastlane-plugin-appcenter 1.11.1

generated on: 2021-10-28

@fjcaetano
Copy link
Contributor Author

After further investigation, it turns out the issue happens even when running xcodebuild directly. Let me know if I should close this since it doesn't seem to be caused by Fastlane:

$ 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  

@zac
Copy link

zac commented Nov 2, 2021

@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?

@zac
Copy link

zac commented Nov 2, 2021

@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.

@fjcaetano
Copy link
Contributor Author

@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 .xcconfig files since that's what introduced the issue on my end.

@zac
Copy link

zac commented Nov 2, 2021

@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 .xcconfig files since that's what introduced the issue on my end.

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.

@ispiropoulos
Copy link

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.

@NachoSoto
Copy link
Contributor

NachoSoto commented Nov 4, 2021

I filed a Radar about the Xcode crash, and it's already fixed in Xcode 13.2 beta.
That's just Xcode failing to parse the build error. If you see this line:

2021-10-28 18:31:34.585 xcodebuild[34010:479422] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/y0/9yktphk14bj_rfljxbhbd40c0000gn/T/[REDACTED]_2021-10-28_18-31-34.584.xcdistributionlogs".

You can open that folder and find the actual build error in there.

@1ucas
Copy link

1ucas commented Nov 11, 2021

Hello @NachoSoto , thanks! We're facing the same issue here.
But this folder has several log files in it. And none of them actually give any useful information.

Edit:
I finally found it at IDEDistributionPipeline.log.
<unknown>:0: error: error opening '.o' for output: No space left on device

I can't believe it couldn't just print this message.
Like you said, It's an issue with xcodebuild, not fastlane.
Thanks again!

@fjcaetano
Copy link
Contributor Author

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 fastlane/exportPlist.plist I tried using was generated by Fastlane, which is why the issue was happening even when calling xcodebuild directly.

Issue description

Fastlane is not adding compileBitcode: false to the export options plist, even when explicitly sending the include_bitcode: false argument to gym/build_ios_app.

Steps to Reproduce

This 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 exportOptions.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>method</key>
        <string>enterprise</string>
        <key>provisioningProfiles</key>
        <dict>
            [REDACTED]
        </dict>
        <key>signingStyle</key>
        <string>manual</string>
</dict>
</plist>

Workaround

To get around this issue, bitcode can be explicitly disabled using the export_options argument instead of include_bitcode:

    build_ios_app(
      ...
      export_method: "enterprise",
      export_options: {
        compileBitcode: false,
      } 
    )

This has the desired effect, which can be observed in the generated exportOptions.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>compileBitcode</key>
        <false/>
        <key>method</key>
        <string>enterprise</string>
        <key>provisioningProfiles</key>
        <dict>
            [REDACTED]
        </dict>
        <key>signingStyle</key>
        <string>manual</string>
</dict>
</plist>

@fastlane-bot
Copy link

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 fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@fastlane-bot
Copy link

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 👍

@fastlane fastlane locked and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants