2

I'm working on signing an Electron app, but the codesign command fails due to the presence of com.apple.FinderInfo and com.apple.fileprovider.fpfs#P extended attributes on files within my app bundle. I have verified my certificates and they are ok, but electron-builder is unable to sign the app because of these attributes.

Does anyone have similar issue?

Here is full electron-builder error

> electron-builder -m

  • electron-builder  version=24.6.4 os=23.0.0
  • loaded configuration  file=package.json ("build" field)
  • loaded parent configuration  preset=react-cra
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=arm64 electron=27.0.4 appOutDir=dist/mac-arm64
  • signing         file=dist/mac-arm64/Ask.app identityName= *** identityHash=*** provisioningProfile=none
  ⨯ Command failed: codesign --sign *** --force --timestamp --options runtime --entitlements entitlements.plist /Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU)
/Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU): replacing existing signature
/Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU): resource fork, Finder information, or similar detritus not allowed
  failedTask=build stackTrace=Error: Command failed: codesign --sign *** --force --timestamp --options runtime --entitlements entitlements.plist /Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU)
/Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU): replacing existing signature
/Users/mateusz/Desktop/Projects/screen-question-app/frontend/dist/mac-arm64/Ask.app/Contents/Frameworks/Ask Helper (GPU).app/Contents/MacOS/Ask Helper (GPU): resource fork, Finder information, or similar detritus not allowed

I've tried using xattr -cr to remove these attributes recursively, and also tried to remove them manually using xattr -d, but they persist. I can't determine why these attributes are being created in the first place. Here's what happens when I attempt to remove them:

xattr -cr ./dist/mac-arm64/Ask.app
xattr -l ./dist/mac-arm64/Ask.app/Contents/Frameworks/Electron Framework.framework

The output still shows the com.apple.FinderInfo and com.apple.fileprovider.fpfs#P attributes present.

1 Answer 1

8

We had the problem at the same time ^^

The problem occurred when I upgraded MacOs from Monterey to Sonoma.

This is related to "extended attributes" which are used by icloud to track synchronized files and which have apparently appeared in recent versions of MacOs, this article put me on the trail: https://discussions.apple.com/thread/254036468

And it's effectively impossible to delete them using the commands provided by Apple: https://developer.apple.com/library/archive/qa/qa1940/_index.html

Solution: The simplest solution I've found is to move my project directory away from the files synchronized with Icloud. To my User directory in my case. And in this case, no more problems when signing and the command no longer returns an "extended attributes" list for my folder:

xattr -lr <path_to_app_bundle>

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much! It worked. For a while I was suspicious of iCloud after reading that the metadata was somehow related to iCloud uploads but I never decided to move whole project to a different location.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.