Short description of the issue/suggestion: After upgrading to MacOS Sequoia and being required to code sign and notarize my app, cannot launch app even though code sign and notarization pass
Please tell us about your environment: MacBookPro Chip Apple M2 Max 32 GB JavaPackager version: 1.7.6 OS version: macOS Sequoia 15.0.1 JDK version: jdk-1.8 Build tool: Maven
Steps to reproduce the issue: -DMG Maven Build of Spring Boot /Java (version 8) application with "fvarrui" JavaPackager plugin using default universalJavaApplicationStub. Code signing and Notarization / Stapling PASS and App installs in Application folder, however cannot launch App. Although code sign and notarization pass, it is interesting that in the build output, prior to it submitting to Apple, there is an error stating that the App code sign could not be replaced.
What is the expected behavior? -App launches when double clicking the application icon
What have you tried to resolve / workaround the issue?
-Install via package rather than DMG - same result -Can launch App by opening up the app Content/MacOS folder and clicking directly on the universalJavaApplicationStub. Note requires that you allow it to run within the Security and Privacy settings.
codesign --verify --deep --verbose force1.app force1.app: valid on disk force1.app: satisfies its Designated Requirement
spctl -a -vvv force1.app
CFBundleGetInfoString force1 1.0-SNAPSHOT CFBundleDevelopmentRegion English CFBundleExecutable universalJavaApplicationStub CFBundleIconFile Force1256x256.icns CFBundleIdentifier com.force1.app.Force1App CFBundleDisplayName force1 CFBundleInfoDictionaryVersion 6.0 CFBundleName force1 CFBundlePackageType APPL CFBundleShortVersionString 1.0-SNAPSHOT CFBundleSignature ???? CFBundleVersion 1.0-SNAPSHOT NSHumanReadableCopyright ACME NSHighResolutionCapable NSSupportsAutomaticGraphicsSwitching AdministratorRequired JavaX MainClass com.force1.app.Force1App ClassPath Java/force1-1.0-SNAPSHOT-runnable.jar WorkingDirectory $APP_PACKAGE/Contents/Resources JVMOptionsFile $APP_PACKAGE/Contents/Resources/force1.l4j.ini RelocateJar LSEnvironment NSAppleEventsUsageDescription There was an error while launching the application. Please click OK to display a dialog with more information or cancel and view the syslog for details.
............. ............. ............. ............. [DEBUG] Null reference [template 'mac/Info.plist.vtl', line 112, column 33]: $APP_PACKAGE cannot be resolved. [DEBUG] Null reference [template 'mac/Info.plist.vtl', line 115, column 33]: $APP_PACKAGE cannot be resolved. [INFO] Info.plist file created in /Users/lynnshepard/DEV/force1/target/force1/force1.app/Contents/Info.plist [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'codesign' -f -o runtime --entitlements /Users/lynnshepard/DEV/force1/src/main/resources/entitlements.plist --timestamp -s "Developer ID Application: Neal Hartmann (JPFYU53MK9)" /Users/lynnshepard/DEV/force1/target/force1/force1.app/Contents/MacOS/universalJavaApplicationStub [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'codesign' -f -o runtime --entitlements /Users/lynnshepard/DEV/force1/src/main/resources/entitlements.plist --timestamp -s "Developer ID Application: Neal Hartmann (JPFYU53MK9)" /Users/lynnshepard/DEV/force1/target/force1/force1.app [ERROR] /Users/lynnshepard/DEV/force1/target/force1/force1.app: replacing existing signature [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'xcrun' notarytool submit /Users/lynnshepard/DEV/force1/target/assets/force1.app-notarization.zip --wait --keychain-profile "Force1" [INFO] Conducting pre-submission checks for force1.app-notarization.zip and initiating connection to the Apple notary service... [INFO] Submission ID received [INFO] id: 1f4b6026-15af-4b10-8ed7-727d4478e7e7 [INFO] Successfully uploaded file [INFO] id: 1f4b6026-15af-4b10-8ed7-727d4478e7e7 [INFO] path: /Users/lynnshepard/DEV/force1/target/assets/force1.app-notarization.zip [INFO] Waiting for processing to complete. [INFO] [INFO] Current status: In Progress... [INFO] Current status: In Progress.... [INFO] Current status: In Progress..... [INFO] Current status: In Progress...... [INFO] Current status: In Progress....... [INFO] Current status: In Progress........ [INFO] Current status: In Progress......... [INFO] Current status: In Progress.......... [INFO] Current status: In Progress........... [INFO] Current status: In Progress............ [INFO] Current status: In Progress............. [INFO] Current status: Accepted..............Processing complete [INFO] id: 1f4b6026-15af-4b10-8ed7-727d4478e7e7 [INFO] status: Accepted [INFO] [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'xcrun' stapler staple /Users/lynnshepard/DEV/force1/target/force1/force1.app [INFO] Processing: /Users/lynnshepard/DEV/force1/target/force1/force1.app [INFO] Processing: /Users/lynnshepard/DEV/force1/target/force1/force1.app [INFO] The staple and validate action worked! [INFO] App created in /Users/lynnshepard/DEV/force1/target/force1! [INFO] [INFO] Generating installers ... [INFO] Initializing packager ... [INFO] PackagerSettings [outputDirectory=/Users/lynnshepard/DEV/force1/target, licenseFile=/Users/lynnshepard/DEV/force1/target/assets/LICENSE, iconFile=/Users/lynnshepard/DEV/force1/src/main/resources/Force1256x256.icns, generateInstaller=true, forceInstaller=false, mainClass=com.force1.app.Force1App, name=force1, displayName=force1, version=1.0-SNAPSHOT, description=Parent pom providing dependency and plugin management for applications built with Maven, url=https://projects.spring.io/spring-boot/#/spring-boot-starter-parent/force1, administratorRequired=false, organizationName=ACME, organizationUrl=, organizationEmail=null, bundleJre=false, customizedJre=true, jrePath=null, jdkPath=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home/jre, additionalResources=[/Users/lynnshepard/DEV/force1/target/assets/LICENSE, /Users/lynnshepard/DEV/force1/src/main/resources/Force1256x256.icns], modules=[], additionalModules=[], platform=mac, envPath=null, vmArgs=[], runnableJar=null, copyDependencies=true, jreDirectoryName=jre, winConfig=null, linuxConfig=null, macConfig=MacConfig [icnsFile=/Users/lynnshepard/DEV/force1/src/main/resources/Force1256x256.icns, backgroundImage=null, windowWidth=540, windowHeight=360, windowX=10, windowY=60, iconSize=128, textSize=16, iconX=52, iconY=116, appsLinkIconX=360, appsLinkIconY=116, volumeIcon=null, volumeName=null, generateDmg=true, generatePkg=true, relocateJar=true, appId=com.force1.app.Force1App, developerId=Developer ID Application: Neal Hartmann (JPFYU53MK9), entitlements=/Users/lynnshepard/DEV/force1/src/main/resources/entitlements.plist, provisionProfile=null, customLauncher=null, customInfoPlist=null, customRuntimeInfoPlist=null, codesignApp=true, notarizeApp=true, keyChainProfile="Force1", infoPlist=InfoPlist [additionalEntries=, bundlePackageType=APPL], hardenedCodesign=true, macStartup=SCRIPT], createTarball=false, createZipball=false, extra=null, useResourcesAsWorkingDir=true, assetsDir=/Users/lynnshepard/DEV/force1/assets, classpath=Java/force1-1.0-SNAPSHOT-runnable.jar, jreMinVersion=null, manifest=null, additionalModulePaths=[], fileAssociations=[], packagingJdk=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home/jre, scripts=Scripts [bootstrap=null, preInstall=null, postInstall=null], arch=aarch64] [INFO] Packager initialized! [INFO] [INFO] Generating DMG image... [INFO] Copying background image [INFO] Copying resource [/mac/background.png] to file [/Users/lynnshepard/DEV/force1/target/force1/.background/background.png] [INFO] Copying icon file: /Users/lynnshepard/DEV/force1/src/main/resources/Force1256x256.icns [INFO] Copying file [/Users/lynnshepard/DEV/force1/src/main/resources/Force1256x256.icns] to file [/Users/lynnshepard/DEV/force1/target/force1/.VolumeIcon.icns] [INFO] Creating image: /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg [WARNING] aarch64 architecture detected. Using APFS filesystem [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'hdiutil' create -srcfolder /Users/lynnshepard/DEV/force1/target/force1 -volname force1 -ov -fs APFS -format UDRW /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg [INFO] created: /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg [INFO] Mounting image: /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'hdiutil' attach -readwrite -noverify -noautoopen /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg [INFO] /dev/disk4 GUID_partition_scheme [INFO] /dev/disk4s1 Apple_APFS [INFO] /dev/disk5 EF57347C-0000-11AA-AA11-0030654 [INFO] /dev/disk5s1 41504653-0000-11AA-AA11-0030654 /Volumes/force1 [INFO] - Device name: /dev/disk5s1 [INFO] Creating Applications link [INFO] Creating symbolic link [/Volumes/force1/Applications] to [/Applications] [INFO] Rendering DMG customization applescript ... [DEBUG] ResourceManager: found /mac/customize-dmg.applescript.vtl with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader [INFO] Applescript rendered in /Users/lynnshepard/DEV/force1/target/assets/customize-dmg.applescript! [INFO] Running applescript [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && '/usr/bin/osascript' /Users/lynnshepard/DEV/force1/target/assets/customize-dmg.applescript force1 [ERROR] waited 1 seconds for .DS_STORE to be created. [INFO] Fixing permissions... [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'chmod' -Rf u+r,go-w /Volumes/force1 [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'SetFile' -a C /Volumes/force1 [INFO] Unmounting volume: /Volumes/force1 [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'hdiutil' detach /Volumes/force1 [INFO] "disk4" ejected. [INFO] Compressing disk image... [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'hdiutil' convert /Users/lynnshepard/DEV/force1/target/assets/force1_1.0-SNAPSHOT.dmg -ov -format UDZO -imagekey zlib-level=9 -o /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.dmg [INFO] Preparing imaging engine� [INFO] Reading Protective Master Boot Record (MBR : 0)� [INFO] (CRC32 $DB270231: Protective Master Boot Record (MBR : 0)) [INFO] Reading GPT Header (Primary GPT Header : 1)� [INFO] (CRC32 $49035C34: GPT Header (Primary GPT Header : 1)) [INFO] Reading GPT Partition Data (Primary GPT Table : 2)� [INFO] (CRC32 $2CE50032: GPT Partition Data (Primary GPT Table : 2)) [INFO] Reading (Apple_Free : 3)� [INFO] (CRC32 $00000000: (Apple_Free : 3)) [INFO] Reading disk image (Apple_APFS : 4)� [INFO] (CRC32 $BF8172B2: disk image (Apple_APFS : 4)) [INFO] Reading (Apple_Free : 5)� [INFO] (CRC32 $00000000: (Apple_Free : 5)) [INFO] Reading GPT Partition Data (Backup GPT Table : 6)� [INFO] (CRC32 $2CE50032: GPT Partition Data (Backup GPT Table : 6)) [INFO] Reading GPT Header (Backup GPT Header : 7)� [INFO] (CRC32 $9F569756: GPT Header (Backup GPT Header : 7)) [INFO] Adding resources� [INFO] Elapsed Time: 3.065s [INFO] File size: 38945582 bytes, Checksum: CRC32 $E245AE72 [INFO] Sectors processed: 112004, 84627 compressed [INFO] Speed: 13.5MB/s [INFO] Savings: 32.1% [INFO] created: /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.dmg [INFO] DMG image generated in /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.dmg! [INFO] [INFO] Generating PKG installer... [INFO] Executing command: /bin/sh -c cd '/Users/lynnshepard/DEV/force1/.' && 'pkgbuild' --install-location /Applications --component /Users/lynnshepard/DEV/force1/target/force1/force1.app /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.pkg [INFO] pkgbuild: Adding component at /Users/lynnshepard/DEV/force1/target/force1/force1.app [INFO] pkgbuild: Wrote package to /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.pkg [INFO] PKG installer generated in /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.pkg! [INFO] [INFO] Installers generated! [/Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.dmg, /Users/lynnshepard/DEV/force1/target/force1_1.0-SNAPSHOT.pkg] [INFO] [INFO] Creating bundles ... [INFO] Bundles created! [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:05 min [INFO] Finished at: 2025-01-19T13:35:16-05:00 [INFO] ------------------------------------------------------------------------ Process finished with exit code 0