fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

Command execution failed (due to spaces in path) #219

Closed kerner1000 closed 2 years ago

kerner1000 commented 2 years ago

I'm submitting a…

Short description of the issue/suggestion:

Command execution failed: codesign --force --options runtime --deep --entitlements /Volumes/Case-sensitive Volume/sources/myapp/target/assets/entitlements.plist --sign <my-developer-id> /Volumes/Case-sensitive Volume/sources/myapp/target/MyApp/MyApp.app

If I manually make the call and enquote the path, I can execute codesign successfully.

Steps to reproduce the issue/enhancement:

  1. Configure developer-id and app-id in the mac-specific config
  2. Run mvn clean package

What is the expected behavior?

Build should succeed

What is the current behavior?

Build failes

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

fvarrui commented 2 years ago

Thanks for the PR!!!

I'm glad to see that you were able to find and fix the problem ... I hope the way the JavaPackager code is organized helped you 😃

fvarrui commented 2 years ago

Hi @kerner1000! Adding single quotes is not working for me 😢

image

image

A picture (or two) is worth a thousand words.

I've also tried with devel branch and it worked fine!!

image

Please, can you share Maven output? At least at least the part where the error message appears. Maybe the problem is other than spaces in path.

Thanks!!!

kerner1000 commented 2 years ago

Hi @fvarrui, thanks for your time! And thanks for the screenshot, it indeed is very clarifying. I double checked and it seems arguments are per default double-quoted. Only in the error message they are not, strangely. The codesign is failing for some other reason..

Screenshot 2022-07-13 at 08 50 12


Screenshot 2022-07-13 at 08 54 51

fvarrui commented 2 years ago

Hi @kerner1000! I really don't know what the problem is, but it seems that your certificate is not valid. Maybe this article could be helpful. It says that a Mac OS update may cause problems with duplicate certificates. I'm not sure if this is the case, but maybe you can try it. Likewise, the article also proposes other solutions to the problem of errSecInternalcomponent.

kerner1000 commented 2 years ago

Hi @fvarrui , thanks so much for support! I got the signing issue somehow resolved (it seems), the build succeeds. Now I have trouble to upload the binary to the app store.

Screenshot 2022-07-13 at 15 13 35

Was trying all IDs ("Bundle ID", "SKU", "Apple ID") for "appId", but somehow it still seems to be wrong. :(

Screenshot 2022-07-13 at 15 15 20

Packaging and deploying to the App store really is an adventure. It took me already more time than to write the app itself :D

fvarrui commented 2 years ago

There's no victory without pain! 😅

I'm sorry, but I've never released an app to the AppStore ... I don't even have an Apple Developer ID 😥.

Maybe you should notarize the app before uploading to the AppStore.