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.