Cannot sign jar with .jnilib file inside it
See original GitHub issueEvery time I run electron-osx-sign (through electron-forge) and then the notarization process I get the following errors:
{
"logFormatVersion": 1,
"jobId": "****",
"status": "Invalid",
"statusSummary": "Archive contains critical validation errors",
"statusCode": 4000,
"archiveFilename": "myapp.zip",
"uploadDate": "****",
"sha256": "****",
"ticketContents": null,
"issues": [
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "myapp.zip/myapp.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64h"
}
]
}
What’s basically happening is that the .jar has this .jnilib
file that’s not being signed for some reason, but everything else is.
I would really appreciate some help with this issue.
The .jar can be found here (I had to zip it to upload it to github) jna-4.5.1.zip
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Cannot sign jar with .jnilib file inside it · Issue #229 - GitHub
jar has this .jnilib file that's not being signed for some reason, but everything else is. I would really appreciate some help with...
Read more >Loading jnilib from inside a jar - Flexera Community
Hi , I am having a simple question that when we add a jar file containing custom code in the installer then what...
Read more >572876 – macOS native libraries (jnilib) are not signed - Bugs
I don't think the macos signing service support signing jnilib just yet. So this will be a requirement first to have it. Will...
Read more >How to load native JOGL .jnilib extensions on Mac OSX by ...
There is nothing special to do. At first, jogl.jar no longer exists, it comes from JOGL 1 which isn't maintained, he should use...
Read more >The jarsigner Command
jarsigner - sign and verify Java Archive (JAR) files ... Case doesn't matter in keystore type designations. For example, JKS is the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@b-zurg Thanks for coming up with the automated script! ❤️ This is great! I played around with the code today and integrated your procedure with the existing signing workflow.
The latest changes are available here: https://github.com/electron/electron-osx-sign/tree/traverse-archives
This should handle almost all zip-like archives (including jar files) and nested archives. All files in archives are treated mostly the same way as if they are not inside of an archive by
electron-osx-sign
, so the binary-like files should be picked up automatically (including dynamic libraries and shared objects). We can get nice logs with file paths likemy.app/Contents/Resources/app.asar.unpacked/node_modules/elasticsearch/lib/jna-4.5.1.jar/com/sun/jna/darwin/libjnidispatch.jnilib
(even though herelibjnidispatch.jnilib
doesn’t technically exist this way).Currently it’s disabled by default but one can opt-in the automation with the added flag
--traverse-archives
. I haven’t tested it by uploading any app to the notarization service. It will be great if you can help test it out 🙌Ok I came across something very interesting:
I tried out this file
public_suffix_list.dat
just running unzip on it and it’s not a zip file. I think this procedure should only try out zip files that theunzip
utility can verify as being valid zip files.The best way to do this seems to be to run
unzip -t FILE
whereFILE
is the path to the file to test.An example run:
In this we can see that the first file exits with code 9 and the valid zip-like
.jar
file validates with exit code 0.What do you think?