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
15.94k stars 1.16k forks source link

Running native distribution fails #187

Open Fabian-K opened 3 years ago

Fabian-K commented 3 years ago

Hi,

I´ve written a small application and can successfully run it using the gradle run task. When using the native distributions, however, the application does not start.

On a mac, I can create the dmg but when starting the application, it instantly crashes. On windows, I can create the installer (exe/msi) and install the application. When starting the application, it however fails with a popup saying "Failed to launch JVM".

Is there any way to enable debug output/logs for the native distributions to find out what/why it is crashing?

Thanks!

voltangle commented 3 years ago

You can try to run those distros from the command line, like open YourApp.app(on a Mac)

Fabian-K commented 3 years ago

Thanks for the hint. I tried it, unfortunately, that does not seem to do anything for my application :/

voltangle commented 3 years ago

I mean, running from CLI you can get an error name

Fabian-K commented 3 years ago

Yeah, that's what I was doing and nothing happened. I now checked the system log and can see the following related entries (my app is named ui.app):

standard    20:19:57.945180+0100    ui  ui:Failed to launch JVM
fehler  20:19:57.946002+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libjli.dylib
fehler  20:19:57.946296+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/server/libjvm.dylib
fehler  20:19:57.946634+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libjimage.dylib
fehler  20:19:57.946933+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libjava.dylib
fehler  20:19:57.947273+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libzip.dylib
fehler  20:19:57.947545+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libnio.dylib
fehler  20:19:57.947822+0100    kernel  Sandbox: logd_helper(681) deny(1) file-read-data /Applications/ui.app/Contents/runtime/Contents/Home/lib/libnet.dylib
mipastgt commented 3 years ago

I have the same problem on a Mac. Trying to open the application in a terminal shows:

$ open ~/Applications/MapDemoDesktop.app
LSOpenURLsWithRole() failed with error -10810 for the file <myhome>/Applications/MapDemoDesktop.app.
RubiTree commented 3 years ago

I have the same problem on a Mac. Trying to open the application in a terminal shows:

$ open ~/Applications/MapDemoDesktop.app
LSOpenURLsWithRole() failed with error -10810 for the file <myhome>/Applications/MapDemoDesktop.app.

i have the same error code, do you resolve it?

mipastgt commented 3 years ago

Yes, I found a solution via this Slack question: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1623494614056500 A few modules where missing which I could find via the gradle task suggestRuntimeModules. I had to add modules("java.instrument", "java.prefs", "java.sql", "jdk.unsupported","jdk.crypto.ec","jdk.localedata") to my gradle file.

ltttttttttttt commented 1 year ago

Can Windows get the crash log? My computer can't reproduce the crash, but the customer's Windows will crash

okushnikov commented 3 weeks ago

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