Failure on Notarization of PKG installer for Mac Application

We have a Mac App build with Pyinstaller. We can successfully sign and notarize the .app file itself with no issue.

However, when building a PKG as an installer around this .app file, we get a notarization error that the signature of the binary is invalid. The binary that it complains about is the main exe of the .app file. This is confusing, because this was not happening when signing the .app file by itself.

Our Release Team uses PackagesBuild to build the pkg.

Any suggestions on what the problem could be?

Here is the notarization log from the PKG:

Code Block
{
"logFormatVersion": 1,
"jobId": "c029134f-c0be-49ea-9e72-c297eb76f20c",
"status": "Invalid",
"statusSummary": "Archive contains critical validation errors",
"statusCode": 4000,
"archiveFilename": "pkg.zip",
"uploadDate": "2020-10-26T22:26:51Z",
"sha256": "b38799231a4cacf88fe835f167616a16aee2df1ecd7010dcf82165b97082e619",
"ticketContents": null,
"issues": [
{
"severity": "error",
"code": null,
"path": "pkg.zip/Release/installer.pkg/installer.pkg Contents/Payload/Applications/iManage/mainApp.app/Contents/MacOS/main_exe",
"message": "The signature of the binary is invalid.",
"docUrl": null,
"architecture": "x86_64"
}
]
}


Answered by ForumsContributor in
Accepted Answer
I suggest you install the package and then check the code signature of the app using:

Code Block
% codesign -v -vvv --deep /path/to/installed.app


That should give you some clue as to what’s gone wrong.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks! It pointed me towards a zip file named base_library.zip that Pyinstaller was putting in the MacOS sub-directory. It should be in Resources.
Failure on Notarization of PKG installer for Mac Application
 
 
Q