completely notarised application blocked by gatekeeper

I am trying to build a c++ application for Mac, I have followed all the steps for codesigning the application code, codesigning the DMG, notarising the DMG and also stapling the DMG after successful notarisation. But when I try to open the application on Mac gate keeper is blocking the application from opening and opening the popup with error message as " '<Application_Name>' cannot be opened because the developer cannot be verified." What could be the reason? Please help.

Hello everyone, Can anyone help me on the above issue?

Is this an app, that is, a program that the user double clicks in the Finder and presents a GUI? Or are you using “application” in the more general sense, and this is actually a command-line tool?

If it’s an app, the most common cause of Gatekeeper problems is a dangling load command, as discussed in Resolving Gatekeeper Problems Caused by Dangling Load Command Paths.

If it’s a command-line tool that doesn’t work when you double click it in the Finder, see the Tool Blocked by Gatekeeper section of Resolving Gatekeeper Problems.

If neither of the above help, start at the top with my Resolving Trusted Execution Problems post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi Quinn,

Thanks for the help,

I have gone through the “Resolving Trusted Execution Problems” forum link and from that I have found the issue is mainly because of Dangling Load Command Paths. But I am still not sure how to fix this issue. Below is the "Xprotectservice" error that I got in my system log when I tried to open my application for the first time. And to be specific this error comes only the first time when I try to open the application a second time and more this error didn't show up even though the application is still not opening. "File /Applications/Sendplus.app/Contents/MacOS/../Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets failed on rPathCmd /Users/development/QTWebkit_5.15.2/qtwebkit-opensource-src-5.212/release/lib/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets (rpath resolved to: (path not found), bundleURL: /Applications/Sendplus.app)"

Please help me with the next step to fix this issue.

I have one more observation regarding this, We have one more build setup for the same application , when we build our application using the other machine we do not get this error and the application is also passed by the gatekeeper without any changes. There is no difference in code or build process both are following the same scripts for build. Is there anything that could affect the building process that I don't know.

Please help me on this as I am new to this codesigning and notarazing application.

Please help me with the next step to fix this issue.

The best way to fix this issue is to make sure that library validation is enabled everywhere. It’s the option I recommend because it fixes this issue and improves the overall security of your app.

Are you able to do that? If not, why not?

There is no difference in code or build process both are following the same scripts for build.

I can see two possibilities here:

  • Either the above statement is wrong, and the two machines are building the apps differently.

  • Or there’s something wonky with your testing methodology.

I recommend that you rule out the second possibility by testing using the technique I described in Testing a Notarised Product. If the two builds behave differently when you run them on a ‘clean’ VM, there’s definitely something different in the builds.

Make sure to restore your VM to the ‘clean’ snapshot between running the two builds.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

completely notarised application blocked by gatekeeper
 
 
Q