Closed dynobo closed 1 year ago
Seems like it is a macOS Big Sur issue. I switched to macOS-12 runner and the build went through.
Any downsides of using macOS 12 over macOS 11? Will the app more likely crash, when being installed on an older system now?
Quite the opposite - macOS 12 is preferred. The general Apple philosophy appears to be that developers will always be on the latest macOS and Xcode, and tools on that platform (such as the signing tools) will produce backwards-compatible artefacts; the same tools aren't always updated on "older" platforms.
I've seen versions of this problem myself; it is for this reason that we use macOS-12 for Briefcase's own CI. I've never been able to get a good explanation of the failure, though; all you get is a nebulous "unable to code sign", and an error code of 1 (which means... unable to code sign).
One suggestion I've seen is that the issue may be with extended attributes on files; running:
xattr -rc macOS/app/YourApp/YourApp.app
to remove the attributes before signing may address the issue (it might be interesting to run xattr -r
first to see what the extended attributes are...).
@freakboy3742 , thanks a lot for your detailed explanation, it was really helpful. I printed the xattr
like you suggested, but TBH I don't really understand the output (see below). I tried clearing the attributes before the signing, but that didn't change the outcome. I also noticed that the xattr
output only contains Qt tools bundled in PySide (Designer, Assistant, Linguist), which I anyway don't want to have in my bundle, so I removed them via Briefcase's new cleanup_paths
feature (:+1:), but that also didn't change the error.
But since you explained that building on a newer macOS version is actually the preferred way, I'm totally fine with just avoiding the error by building on the macOS 12 runner.
Again, thanks for your efforts and your awesome work!! :slightly_smiling_face:
$ xattr -r /Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Assistant.app/Contents/MacOS/Assistant.dSYM/Contents/Resources/DWARF/Assistant: com.apple.cs.CodeDirectory
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Assistant.app/Contents/MacOS/Assistant.dSYM/Contents/Resources/DWARF/Assistant: com.apple.cs.CodeEntitlements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Assistant.app/Contents/MacOS/Assistant.dSYM/Contents/Resources/DWARF/Assistant: com.apple.cs.CodeRequirements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Assistant.app/Contents/MacOS/Assistant.dSYM/Contents/Resources/DWARF/Assistant: com.apple.cs.CodeRequirements-1
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Assistant.app/Contents/MacOS/Assistant.dSYM/Contents/Resources/DWARF/Assistant: com.apple.cs.CodeSignature
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Designer.app/Contents/MacOS/Designer.dSYM/Contents/Resources/DWARF/Designer: com.apple.cs.CodeDirectory
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Designer.app/Contents/MacOS/Designer.dSYM/Contents/Resources/DWARF/Designer: com.apple.cs.CodeEntitlements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Designer.app/Contents/MacOS/Designer.dSYM/Contents/Resources/DWARF/Designer: com.apple.cs.CodeRequirements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Designer.app/Contents/MacOS/Designer.dSYM/Contents/Resources/DWARF/Designer: com.apple.cs.CodeRequirements-1
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Designer.app/Contents/MacOS/Designer.dSYM/Contents/Resources/DWARF/Designer: com.apple.cs.CodeSignature
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Linguist.app/Contents/MacOS/Linguist.dSYM/Contents/Resources/DWARF/Linguist: com.apple.cs.CodeDirectory
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Linguist.app/Contents/MacOS/Linguist.dSYM/Contents/Resources/DWARF/Linguist: com.apple.cs.CodeEntitlements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Linguist.app/Contents/MacOS/Linguist.dSYM/Contents/Resources/DWARF/Linguist: com.apple.cs.CodeRequirements
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Linguist.app/Contents/MacOS/Linguist.dSYM/Contents/Resources/DWARF/Linguist: com.apple.cs.CodeRequirements-1
/Users/runner/work/normcap/normcap/macOS/app/NormCap/NormCap.app/Contents/Resources/app_packages/PySide6/Linguist.app/Contents/MacOS/Linguist.dSYM/Contents/Resources/DWARF/Linguist: com.apple.cs.CodeSignature
Describe the bug
Hi, I'm trying to upgrade from briefcase v0.3.9 to v0.3.12, but with the new version the
briefcase build
step fails for the macOS.app
-package. It ad-hoc signs a lot of dependencies successfully, but then fails on the app itself:Note: After the
briefcase create
command went through, I copy tesseract as an external dependency into the app directory, as I couldn't find another option to include it into the package. Might this be related?Any ideas how to fix this? Thanks!
Steps to reproduce
briefcase create
andbriefcase build
on a macOS 11 gh-action runnerExpected behavior
The ad-hoc signing should complete without an error
Environment
Logs
Additional context
pyproject.toml: https://github.com/dynobo/normcap/blob/feature/update-briefcase/pyproject.toml failed gh-action job: https://github.com/dynobo/normcap/actions/runs/4091457773/jobs/7055548947 full logs: https://github.com/dynobo/normcap/commit/dd5dd080f5ac85118d0d9c2f8c06e3d95bc9d998/checks/11108274751/logs
EDIT: The exact same script works locally, in a VM with macOS Monterey. So it seems to be related to GHs action runner setup.