Builder stopped working in Mac OS High Sierra. Tried with different versions got process hang, the newest version gives me this error.
Builder Log:
Packaging for darwin x64 using electron 1.4.16 to electron_dist/mac
Signing app (identity: xxxxx Developer ID Application: Company (xxxx))
Error: Command failed: codesign --sign XXXXXXXXXXXX --force /Users/user/electron_dist/mac/appname.app/Contents/MacOS/appname
/Users/user/electron_dist/mac/appname.app/Contents/MacOS/appname: resource fork, Finder information, or similar detritus not allowed
19.27.3 and Mac OS 10.12 was working.
Hello,
The problem is because the zip generated by electron-builder is converting UTF-8 NFD charset to UTF-8 NFC. The new APFS filesystem supports both encodings unlike HFS+ where UTF-8 was always converted to UTF-8 NFD.
The workaround is to re-zip the .app with something else, like the zipper provided by OSX.
@Skywalker13 What do you mean? When .app is produced, it is signed directly, zip is not involved.
The problem is not the .app, of course the .app is fine. The problem is when the zip is generated for Squirrel.Mac. This zip uses UTF-8 NFC encoding for filenames.
I'm fixing this problem just now for our customers because the updates are broken with High Sierra and this f** change with APFS.
"mac": {
"target": "zip"
}
So, your comment is not related to this issue... but about some more critical error. Could you please provide full error that your customers have?
Mmmh yes sorry.. now that I re-read the issue. It seems not related even if it's a High Sierra problem too.
@Skywalker13 Your app has file with name includes some non-ASCII symbols?
Yes like this: "Crésus"
I pollute this issue (sorry) but the problem when unpacking a zip generated via electron-builder:
$ codesign -vvvv ../_synchro1.7.3/Crésus\ Synchro.app
--prepared:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--validated:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--prepared:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--validated:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--prepared:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
--validated:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
--prepared:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
--validated:/Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
../_synchro1.7.3/Crésus Synchro.app: a sealed resource is missing or invalid
file added: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/MacOS/Crésus Synchro
file added: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Resources/Crésus Synchro.icns
file added: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper NP.app
file added: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper.app
file added: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper EH.app
file missing: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper EH.app
file missing: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Resources/Crésus Synchro.icns
file missing: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper NP.app
file missing: /Users/epsitec/Desktop/_synchro1.7.3/Crésus Synchro.app/Contents/Frameworks/Crésus Synchro Helper.app
I think that it's just because the zipper used by electron-builder is JS then the file index in the zip is using JS UTF-8 (NFC).
If I set Crésus and build zip:
macOS: 10.13.1 Beta (17B25c)
fs: APFS (in-memory disk, but doesn't matter)
p7zip doesn't support APFS correctly, it seems.Because of [2], I am confused. If native tool has this bug, what electron-builder can do for you...
Problem 3 — p7zip produces small ZIP compared to zip. So, not easy just replace it.
So, @Skywalker13 please clarify where did you build zip and where did you verify it (macOS version and FS). When it will be clear what to fix, I can do fixes. Until that, this issue is not considered as critical, because é and other such symbols are not widely used :) (sorry, sorry, just a fact, I don't live in the USA ;)).
Back to @wenxin3262 original question (which I also have).
The problem is listed here
I ran xattr -cr * at the root of my source code to remove all the crud and rebuilt and it worked.
(Actually, I was afraid to run it on everything so I did a xargs -lr *, took the results, turned it into a file, cleaned it up, removed files I didn't want to change, and then made a script to change each one. But same outcome - removing hidden attributes.
@develar I have the same issue as your [2] but can't find any solution.
My app also have a special char ê in its name, but the issue is the exact same on the signature of Helper EH.
It appeared after the High Sierra update... I wish I didn't do it. Now I can't sign my app, and it's really problematic.
I used the commands suggested here...
https://stackoverflow.com/questions/39652867/code-sign-error-in-macos-high-sierra-xcode-resource-fork-finder-information
specifically, this ended up working for my project
find . -type f -name '*.png' -exec xattr -c {} \;
Most helpful comment
Back to @wenxin3262 original question (which I also have).
The problem is listed here
I ran
xattr -cr *at the root of my source code to remove all the crud and rebuilt and it worked.(Actually, I was afraid to run it on everything so I did a
xargs -lr *, took the results, turned it into a file, cleaned it up, removed files I didn't want to change, and then made a script to change each one. But same outcome - removing hidden attributes.