get-windows
get-windows copied to clipboard
Warning message "developer cannot be verified" in Big Sur when including active-win
When I'm including active-win in our desktop Electron app, we now see a warning that Apple cannot open the app because the developer cannot be verified. Expected behavior is to allow the app to be opened. This only happens in Big Sur.
I've tried adding all entitlements (https://developer.apple.com/documentation/security/hardened_runtime), no luck. We use ToDesktop to distribute our app.
Whenever I remove active-win in the project, the error message goes away and the app opens normally as expected.
I don't think the binary can be notarized. We would have to ship it in a ZIP file which is then notarized. However, I think if you notarize your app bundle, any binaries inside it should also be notarized. https://developer.apple.com/forums/thread/118190
I am experiencing this as well! Even notarized I get the issue above. Tracked it down to a problem with the main file in the node module. (not sure where the main file comes from)
This is what GateKeeper logs in systems log:
File /Applications/Shootsta Project Timer2.app/Contents/Resources/app.asar.unpacked/node_modules/active-win/main failed on rPathCmd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftAppKit.dylib (rpath resolved to: (path not found), bundleURL: /Applications/Shootsta Project Timer2.app)
Could be because active-win is statically linking binaries? https://forums.swift.org/t/bundle-stdlib-with-swift-binary/43653. Not sure what the solution is.
I moved the active-win folder from node_modules to the app src. Basically packaged the library within my app and removed it from node dependencies.
Then you change your electron code accordingly to use the packaged library.
Next: install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/main
sambhavsharma thank you so much. The workaround you described here worked perfectly for me.
@sambhavsharma @spooneuh ,,
Next: install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/main
could not understand this part. can you please explain this part. It would be a great help.
@jmtame ,, Could you solve the issue? .. I am also having the same issue. Can you please help me out in this regard?
@sambhavsharma @spooneuh ,,
Next: install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/maincould not understand this part. can you please explain this part. It would be a great help.
You just need to run the above mentioned command. It tells xcode to use the package swift file (in this case the main file) by updating the rpath.
install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/main
^ This is one command
install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/main
@sambhavsharma thanks for the quick reply.
if I run the above command I get the error
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: active-win/main (No such file or directory)
Do I need to run this command from a specific directory or from my home directory ?.. Your help would be great. I am stuck in this issue for quite some days.
install_name_tool -rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx @executable_path/../../../swift-libs active-win/main
@sambhavsharma thanks for the quick reply.
if I run the above command I get the error
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: active-win/main (No such file or directory)Do I need to run this command from a specific directory or from my home directory ?.. Your help would be great. I am stuck in this issue for quite some days.
Find your main file. It is in active-win repository/package. Read my workaround solution once again. It is pretty straightforward.