I have an app written in Go that is properly code-signed and notarized.

When I download it and launch it for the first time, Gatekeeper will show the usual dialog telling that this application has been downloaded from the web and asking for confirmation to launch it.

I press the Open button, nothing happens.

If I double click on the app a second time, it launches successfully.

The same problem happen when authorizing from the Security & Privacy panel, the app has to be launched a second time in order to show.

I would like to understand what causes this issue and fix it.

My code is there: https://github.com/libretro/ludo

The codesigning and notarization is automated here: https://github.com/libretro/ludo/blob/master/.travis.yml#L76-L88 (and I've double checked that it is working)

The build log is here: https://travis-ci.org/libretro/ludo/jobs/606966338?utm_medium=notification&utm_source=github_status

And the binary is here https://github.com/libretro/ludo/releases/download/v0.9.10/Ludo-OSX-x86_64-0.9.10.dmg

  • For what it's worth, I don't see that behavior on my go binaries. But I'm also compiling and running as straight binaries, and not app bundles.
    – seph
    Jan 2, 2020 at 14:32
  • It only happens with bundles, and when notarization happens on another machine than mine (like a travis VM).
    – Kivutar
    Apr 23, 2020 at 10:59
  • I'm seeing something similar with a C++ app, see apple.stackexchange.com/questions/392036/… May 24, 2020 at 17:43
  • 1
    My problem turned out to be, that when Gatekeeper runs the app, it passes a NULL argument (not an empty string, but an actual NULL pointer) for no apparent reason. May 29, 2020 at 15:41

1 Answer 1


As explained by James Turner, Gatekeeper adds some weird arguments that cause, in my case, the argument parsing lib to exit with error.

Here is a possible fix for your Go programs:

flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .