JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.24k stars 1.18k forks source link

DMG create distribution fails #3280

Closed ch8n closed 1 month ago

ch8n commented 1 year ago

Whenever I try to run packageDmg command either by UI gradle or integrated terminal ./gradlew packageDmg --stacktrace, it fails

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':packageDmg'.
> External tool execution failed:
  * Command: [/Users/chetangupta/Library/Java/JavaVirtualMachines/azul-19.0.2/Contents/Home/bin/jpackage, @/Users/chetangupta/Desktop/chetan/compose/desktop/DsaTrainer/build/compose/tmp/packageDmg.args.txt]
  * Working dir: []
  * Exit code: 1
  * Standard output log: /Users/chetangupta/Desktop/chetan/compose/desktop/DsaTrainer/build/compose/logs/packageDmg/jpackage-2023-06-20-20-33-05-out.txt
  * Error log: /Users/chetangupta/Desktop/chetan/compose/desktop/DsaTrainer/build/compose/logs/packageDmg/jpackage-2023-06-20-20-33-05-err.txt

Error log file content (jpackage-2023-06-20-20-33-05-err.txt)

java.io.IOException: Command [/usr/bin/hdiutil, attach, /var/folders/bt/qz_284cn3218q0rrftztswpc0000gr/T/jdk.jpackage4683290700534445689/images/DsaTrainer-tmp.dmg, -quiet, -mountroot, /var/folders/bt/qz_284cn3218q0rrftztswpc0000gr/T/jdk.jpackage4683290700534445689/images] exited with 1 code

Affected platforms Select one of the platforms below:

Versions

Walingar commented 1 year ago

Hello @ch8n thank you for sharing this issue! I tried to reproduce it with the same configuration and MacOS Ventura Version 13.2, but it works fine for me.

Could you please share what MacOS version you use?

If it is possible, can you try using 1.4.0 version of Compose Multiplatform? So the newest gradle plugin will be used.

Also, I would be glad if you can try running packageDmg with the simple project that you can take from this template, so we can understand that it doesn't depend on your particular project.

ch8n commented 1 year ago

hi @Walingar thanks for follow up, i tried same template and running gradle packageDMG command gives same error

External tool execution failed:
* Command: [/Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home/bin/jpackage, @/Users/chetangupta/Desktop/chetan/android/compose-multiplatform-desktop-template/build/compose/tmp/packageDmg.args.txt]
* Working dir: []
* Exit code: 1
* Standard output log: /Users/chetangupta/Desktop/chetan/android/compose-multiplatform-desktop-template/build/compose/logs/packageDmg/jpackage-2023-06-21-19-19-33-out.txt
* Error log: /Users/chetangupta/Desktop/chetan/android/compose-multiplatform-desktop-template/build/compose/logs/packageDmg/jpackage-2023-06-21-19-19-33-err.txt

error in file

java.io.IOException: Command [/usr/bin/hdiutil, attach, /var/folders/bt/qz_284cn3218q0rrftztswpc0000gr/T/jdk.jpackage18294761177205694952/images/KotlinJvmComposeDesktopApplication-tmp.dmg, -quiet, -mountroot, /var/folders/bt/qz_284cn3218q0rrftztswpc0000gr/T/jdk.jpackage18294761177205694952/images] exited with 1 code

My OS is

image
Walingar commented 1 year ago

@ch8n thank you for an instant response!

It seems like the issue could be with MacOS 12.5 + M1. @AlexeyTsvetkov can you please take a look?

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.