Code Signing Error
somehitDev opened this issue · comments
Describe the bug
I'm using macbook pro 13inch(M1) with sonoma.
When using QtWebEngineCore with briefcase, code signing failed.
I fixed manually line 538 of brieacase/platforms/macOS/__init__.py
like below, and worked fine.
![image](https://private-user-images.githubusercontent.com/98791104/344402213-b12c214b-650f-41c8-8c9f-23879486cb44.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4ODY5NTEsIm5iZiI6MTcxOTg4NjY1MSwicGF0aCI6Ii85ODc5MTEwNC8zNDQ0MDIyMTMtYjEyYzIxNGItNjUwZi00MWM4LThjOWYtMjM4Nzk0ODZjYjQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAyVDAyMTczMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkZDdmZTZmNWE4ODAwNWU3OWZmOTNkM2VkN2E0OTI3ZThhNzUxOWQxNDRkYzYwZGYxMjY0NmNjOTI1NjQxZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.S8zduL2h8VV5-JnYTtBeQZEIU5SuG6GFZEE32R7nR9M)
I think we need additional option for --deep or just add into process_command.
Steps to reproduce
- run build command
briefcase dev
- raise exception(copy all log into logs section)
Expected behavior
build complete and no other exceptions
Screenshots
No response
Environment
- Operating System: Mac M1(Sonoma)
- Python version: Python 3.11
- Software versions:
- Briefcase: 0.3.19
- PySide6: 6.7.2
Logs
│ /Volumes/Dev/04_study_test/01_TEST/python/pyside6_webview_svelte/env/lib/python3.11/site-packages/briefcase/platforms/macOS/__init__.py:573 in sign_file │
│ │
│ 570 │ │ │ │ ) │
│ 571 │ │ │ │ return │
│ 572 │ │ │ else: │
│ ❱ 573 │ │ │ │ raise BriefcaseCommandError(f"Unable to code sign {path}.") │
│ 574 │ │
│ 575 │ def sign_app(self, app: AppConfig, identity: SigningIdentity): │
│ 576 │ │ """Sign an entire app with a specific identity. │
│ │
│ ╭─────────────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────────────╮ │
│ │ entitlements = PosixPath('/Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-svelte-template/macos/app/Entitlements.plist') │ │
│ │ errors = '/Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-sv'+715 │ │
│ │ identity = <AdhocSigningIdentity> │ │
│ │ options = None │ │
│ │ path = PosixPath('/Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-svelte-template/macos/app/PySide6 Webview │ │
│ │ Template.app/Contents/Resources/app_packages/PySide6/Qt/lib/QtWebEngineCore.framework/Versions/A/QtWebEngineCore') │ │
│ │ process_command = [ │ │
│ │ │ 'codesign', │ │
│ │ │ PosixPath('/Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-svelte-template/macos/app/PySide6 Webview │ │
│ │ Template.app/Contents/Resources/app_packages/PySide6/Qt/lib/QtWebEngineCore.framework/Versions/A/QtWebEngineCore'), │ │
│ │ │ '--sign', │ │
│ │ │ '-', │ │
│ │ │ '--force', │ │
│ │ │ '--entitlements', │ │
│ │ │ PosixPath('/Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-svelte-template/macos/app/Entitlements.plist') │ │
│ │ ] │ │
│ │ self = <briefcase.platforms.macOS.app.macOSAppBuildCommand object at 0x106362190> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
BriefcaseCommandError: Unable to code sign /Volumes/Dev/00_ongoing/SHLEE/templates/pyside6-svelte-template/build/pyside6-svelte-template/macos/app/PySide6 Webview Template.app/Contents/Resources/app_packages/PySide6/Qt/lib/QtWebEngineCore.framework/Versions/A/QtWebEngineCore.
Additional context
No response
I was able to reproduce this error. Be sure that PySide-Addons is being packaged.
Regarding the specific suggestion: Briefcase had support for the --deep
option; however, that option is officially deprecated by macOS, so it was removed recently (see #1221).
It would be interesting to see if moving the frameworks from the Resources folder to the Frameworks folder (which is where Frameworks should live) resolves the issue. If it does, a macOS processing step that moves frameworks wouldn't be too difficult to add.
Another possibility is to explicitly not sign Frameworks (on the basis that they should already be signed by the original distributor).