JDK-8226542 : DMG tests failing with java.io.IOException: Exec failed with code 1 command
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-21
  • Updated: 2021-03-05
  • Resolved: 2019-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Relates :  
Relates :  
Description
When I run DMG tests locally many of them (sometime all) are failing with DMG tests failing with java.io.IOException: Exec failed with code 1 command

java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/wv/v95v04852ssgxhyxm38xp9lh0000gn/T/jdk.jpackage478306882236339740/config/JPackageCreateInstallerFileAssociationsTest-dmg-setup.scpt] in unspecified directory
	at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:234)
	at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:206)
	at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.buildDMG(MacDmgBundler.java:308)
	at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:74)
	at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:469)
	at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:673)
	at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:566)
	at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:92)
	at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:50)
Comments
webrev: http://cr.openjdk.java.net/~herrick/8226542/
23-07-2019

emptying the default script resource works fine.
23-07-2019

my original plan was just to remove code in MacDmgBundler that processed this script, but this can be customized by using --resource-dir option and providing your own script. so now I think we should just remove the default script or empty it's contents. The existing script is: tell application "Finder" tell disk "DEPLOY_ACTUAL_VOLUME_NAME" open set current view of container window to icon view set toolbar visible of container window to false set statusbar visible of container window to false set the bounds of container window to {400, 100, 917, 370} set theViewOptions to the icon view options of container window set arrangement of theViewOptions to not arranged set icon size of theViewOptions to 128 end tell end tell
19-07-2019

a previous note: ------------------------- I got these errors again on Mach5 build (still never seen them locally - my newly instrumented exception says: > java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/dw/wcsqfr2n2cj6vvxw_1r76nmc000_dc/T/jdk.jpackage14334801833696117596/config/Test-dmg-setup.scpt] in unspecified directory output: /var/folders/dw/wcsqfr2n2cj6vvxw_1r76nmc000_dc/T/jdk.jpackage14334801833696117596/config/Test-dmg-setup.scpt:49:53: execution error: Finder got an error: AppleEvent timed out. (-1712) showing it is as expected an error launching Finder from DMGsetup.scpt: > tell application "Finder" > tell disk "DEPLOY_ACTUAL_VOLUME_NAME" > open > set current view of container window to icon view > set toolbar visible of container window to false > set statusbar visible of container window to false > > set the bounds of container window to {400, 100, 917, 370} > > set theViewOptions to the icon view options of container window > set arrangement of theViewOptions to not arranged > set icon size of theViewOptions to 128 > end tell > end tell Do we need to run this script ? If I completely comment out running this script and run all the dmg tests, nothing pops up, and I can generate the dmg files. I can also run the dmg files and then run the installed app. --------------------------- I therefor propose we stop running this script.
18-07-2019

To reproduce this issue remove @ignore tag from DMG tests and run with following command: make test TEST=open/test/jdk/tools/jpackage
21-06-2019