Carthage: 10.14 Beta permissions error

Created on 14 Aug 2018  ·  9Comments  ·  Source: Carthage/Carthage

  • carthage install method: .pkg
  • carthage version: 0.30.1 (also tried 0.29.0)
  • xcodebuild -version: Xcode 9.4.1 (9F2000)
  • macOS version: 10.14 Beta (18A365a)

For the carthage execution I need to use sudo and then when archiving the project to upload to the App store I get this error:

Failed to write to /Users/Mauro/Library/Developer/Xcode/DerivedData/Glovo_Customer-buuryxmfychfxhfmsawajywngdkg/Build/Intermediates.noindex/ArchiveIntermediates/Customer AS/BuildProductsPath/AppStore-iphoneos/33A5F22B-4311-3B4B-AA52-16B41CB60B1B.bcsymbolmap: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"

Does anyone know how to solve this permissions error?

Thanks,

Mauro

Most helpful comment

As the error message says, removing Carthage/Build (which was produced by sudo so can't be overwritten without sudo) with sudo rm -rf Carthage/Build then rerunning carthage bootstrap without sudo should work.

Usually you should not need to use sudo to use Carthage.

All 9 comments

Try deleting /Users/Mauro/Library/Developer/Xcode/DerivedData/Glovo_Customer-buuryxmfychfxhfmsawajywngdkg and doing everything without sudo.

Hey @mdiep sorry for the late response. I tried deleting the DerivedData several times but it didn't help (before using sudo). Do you have any other idea? I've checked the permissions of all the folders and all everything looks good.

Thanks,

Mauro

I'm not sure what's going on here. 😕

Does it work if you run the same command carthage runs in the logs?

Yes, in fact I was using sudo in the terminal carthage command to compile the libraries.

I'm using: carthage bootstrap --no-use-binaries --platform iOS

And it gives me this error trace:

Failed to write to /Users/Mauro/Glovo_iOS_Customer/Carthage/Build/iOS/CleanroomLogger.framework: Error Domain=NSCocoaErrorDomain Code=513 "“CleanroomLogger.framework” couldn’t be removed because you don’t have permission to access it." UserInfo={NSFilePath=/Users/Mauro/Glovo_iOS_Customer/Carthage/Build/iOS/CleanroomLogger.framework, NSUserStringVariant=(Remove), NSUnderlyingError=0x7fc85d440720 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}

As the error message says, removing Carthage/Build (which was produced by sudo so can't be overwritten without sudo) with sudo rm -rf Carthage/Build then rerunning carthage bootstrap without sudo should work.

Usually you should not need to use sudo to use Carthage.

That fixed it. It's weird as I used sudo because the error appeared.

Thanks!

When this error occurs, this workaround works 100% of the time for me:

  1. Remove all but the binary dependencies from you cartfile
  2. Run your Carthage operation
  3. Put the removed dependencies back to your cartfile
  4. Run the Carthage operation with the --cache-builds flag

@hlineholm This worked for me 👍

Was this page helpful?
0 / 5 - 0 ratings