TheInfiniteKind / appbundler

74 stars 24 forks source link

Won't launch app 1:st time after download (Catalina) #61

Open davidekholm opened 5 years ago

davidekholm commented 5 years ago

I've updated our software (jAlbum) to use this fork as it supports Java 12 and 13. However, when downloading and opening the app the 1:st time it won't launch. No error messages. All subsequent open attempts works perfectly, it's only the 1:st time.

Note: jAlbum is still not notarized, so one hast to right-click the app and select "Open" to run it. It is when confirming the open in the "this app is downloaded from the Internet" dialog that follows that nothing happens. This problem doesn't exist with the original version of "JavaAppLauncher", but that one has issues with running Java 12 and 13.

patrickangle commented 4 years ago

Do you by any chance parse command line arguments provided to your application in your public static void main(String... args) method? We had the same issue until we realized that upon first run, we were receiving a command line argument roughly in the form of -p{some-number}, and were not handling it gracefully. Improving our command line argument handling to not abort upon failure resolved this issue for us.

sreilly commented 4 years ago

In addition to Patrick's suggestion, would it be possible to show any output sent to the console logs when it fails to launch?

rschmunk commented 4 years ago

The original post was made last October. I just downloaded jAlbum and did not encounter the issue, so it looks like the app is now notarized.

I also encountered the same problem with an app of mine, and likewise resolved it by notarizing.

davidekholm commented 4 years ago

Yes. Now all works. jAlbum is being notarized now as part of our build process. (Using Java 14's "jpackage" tool.