We're seeing a race while bootstrapping project:
Failed to write to Carthage/Build/Mac: Error Domain=NSCocoaErrorDomain Code=516 "The file ���Mac��� couldn���t be saved in the folder ���Build��� because a file with the same name already exists." UserInfo=0x7fe07c145180 {NSFilePath=Carthage/Build/Mac, NSUnderlyingError=0x7fe07c144b90 "The operation couldn���t be completed. File exists"}
It seems like it should be fine if those directories already exist.
We see this error a lot on our build server, but nearly never on development machines: https://github.com/realm/realm-cocoa/issues/2315
During copy of the Google Firebase dependencies, there are 4 different packages which include Protobuf.framework.
We have noticed intermittent recurrences of this issue during Carthage bootstrap for the binary type used by Google Firebase.
Sample Cartfile lines:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBarcodeModelBinary.json" ~> 5.6.0
Error is almost always during Protobuf.framework copy which is included as part of Performance, RemoteConfig, MLVision, and ABTesting.
cc: @ikesyo since he wrote the original fix.
I have a same issue. (@DanEdgarTarget ) Are there any transitory measures for this error?
I have also noticed intermittent recurrences of this issue during Carthage update binary-only frameworks from Google Firebase dependencies.
Cartfile content:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 5.19.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBinary.json" == 5.19.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionTextModelBinary.json" == 5.19.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLNLLanguageIDBinary.json" == 5.19.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLNaturalLanguageBinary.json" == 5.19.0
Same, what is the solution?
Most helpful comment
During copy of the Google Firebase dependencies, there are 4 different packages which include Protobuf.framework.
We have noticed intermittent recurrences of this issue during Carthage
bootstrapfor thebinarytype used by Google Firebase.Sample Cartfile lines:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBinary.json" ~> 5.6.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBarcodeModelBinary.json" ~> 5.6.0
Error is almost always during Protobuf.framework copy which is included as part of Performance, RemoteConfig, MLVision, and ABTesting.