Search code examples
iosxcodefirebasefacebook-ios-sdkswift-package-manager

Xcode build error from commandline, works fine from IDE


i keep getting below errors when i try creating build using Fastlane. Build from Xcode works fine, I keep getting below errors not all together but randomly.

I am using SPM and below are versions Facebook SDK - 17.0.0 firebase - 10.25.0

Tried deleing clean build, deleted Derived data folder, reset SPM cache, resolve packaged, upgrade to latets, delete SPM cache from finder, reinstalled Xcode. Nothing is working. Xcode version is Version 15.3 (15E204a)

 $ xcodebuild -resolvePackageDependencies -workspace ./myapp.xcworkspace -scheme Test -configuration Test
INFO [2024-05-01 12:56:49.87]: ▸ Command line invocation:
INFO [2024-05-01 12:56:49.87]: ▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./myapp.xcworkspace -scheme Test -configuration Test
INFO [2024-05-01 12:56:49.87]: ▸ User defaults from command line:
INFO [2024-05-01 12:56:49.87]: ▸     IDEPackageSupportUseBuiltinSCM = YES
INFO [2024-05-01 12:56:52.76]: ▸ Resolve Package Graph
INFO [2024-05-01 12:57:11.32]: ▸ file not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurement/GoogleAppMeasurement.zipdownloaded archive of binary target 'grpcpp' from 'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/grpcpp.zip' does not contain a binary artifact.fatalError

 file not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurementOnDeviceConversion/GoogleAppMeasurementOnDeviceConversion.zipfile not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurementIdentitySupport/GoogleAppMeasurementIdentitySupport.zipfatalError

 failed downloading 'https://github.com/facebook/facebook-ios-sdk/releases/download/v17.0.0/FBSDKCoreKit_Basics-Dynamic_XCFramework.zip' which is required by binary target 'FBSDKCoreKit_Basics': /Users/ashishn/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_facebook_facebook_ios_sdk_releases_download_v17_0_0_FBSDKCoreKit_Basics_Dynamic_XCFramework_zip already exists in file systemfatalError

 file not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/firebase-ios-sdk/FirebaseAnalytics/FirebaseAnalytics.zipdownloaded archive of binary target 'absl' from 'https://dl.google.com/firebase/ios/bin/abseil/1.2024011601.1/rc0/absl.zip' does not contain a binary artifact.fatalError

file not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurement/GoogleAppMeasurement.zipfile not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurementIdentitySupport/GoogleAppMeasurementIdentitySupport.zipfatalError

file not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurementOnDeviceConversion/GoogleAppMeasurementOnDeviceConversion.zipfile not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurementIdentitySupport/GoogleAppMeasurementIdentitySupport.zipfile not found at path: /Users/ashishn/Library/Developer/Xcode/DerivedData/myapp-czdezuacbcsdupcakjbpxibcrpbj/SourcePackages/artifacts/googleappmeasurement/GoogleAppMeasurement/GoogleAppMeasurement.zipdownloaded archive of binary target 'grpcpp' from 'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/grpcpp.zip' does not contain a binary artifact.fatalError

Solution

  • I selected a new location for DerivedData folder and this issue went away.

    If someone faces similar/same issue then this could be one solution.