question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnsatisfiedLinkError when running UberJar with isSystemInDarkTheme method

See original GitHub issue

Bug Description

In my application, packaging an UberJar and then running it will result in a java.lang.UnsatisfiedLinkError, pointing to Skiko’s getCurrentSystemTheme method. In my code, I have this the associated isSystemInDarkTheme method here. I have been unsuccessful so far in trying to reproduce this in smaller environments than my app. Running the app normally through any other distribution works just fine.

Exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int org.jetbrains.skiko.SystemTheme_awtKt.getCurrentSystemTheme()'
        at org.jetbrains.skiko.SystemTheme_awtKt.getCurrentSystemTheme(Native Method)
        at org.jetbrains.skiko.SystemTheme_awtKt.getCurrentSystemTheme(SystemTheme.awt.kt:4)
        at androidx.compose.foundation.DarkTheme_skikoKt._isSystemInDarkTheme(DarkTheme.skiko.kt:48)
        at androidx.compose.foundation.DarkThemeKt.isSystemInDarkTheme(DarkTheme.kt:41)
        at ComposableSingletons$MainKt$lambda-1$1.invoke(Main.kt:117)
        at ComposableSingletons$MainKt$lambda-1$1.invoke(Main.kt:76)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at org.pushingpixels.aurora.window.AuroraWindowKt$auroraApplication$1$1.invoke(AuroraWindow.kt:543)
        at org.pushingpixels.aurora.window.AuroraWindowKt$auroraApplication$1$1.invoke(AuroraWindow.kt:542)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
        at org.pushingpixels.aurora.window.AuroraWindowKt$auroraApplication$1.invoke(AuroraWindow.kt:538)
        at org.pushingpixels.aurora.window.AuroraWindowKt$auroraApplication$1.invoke(AuroraWindow.kt:536)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at androidx.compose.ui.window.Application_desktopKt$application$1$1.invoke(Application.desktop.kt:115)
        at androidx.compose.ui.window.Application_desktopKt$application$1$1.invoke(Application.desktop.kt:114)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1$1.invoke(Application.desktop.kt:226)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1$1.invoke(Application.desktop.kt:225)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1.invoke(Application.desktop.kt:221)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1.invoke(Application.desktop.kt:219)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
        at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:71)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3152)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3142)
        at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:252)
        at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source)
        at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3142)
        at androidx.compose.runtime.ComposerImpl.composeContent$runtime(Composer.kt:3079)
        at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:570)
        at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:814)
        at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:505)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Platform Info

Compose Version: 1.2.0-alpha01-dev686

Operating System: Windows 11

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
Cryolitiacommented, Jun 4, 2022

I have the same problem in compose 1.1.1

1reaction
kxmpxtxntcommented, Aug 23, 2022

Same here with “1.2.0-alpha01-dev764”

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnsatisfiedLinkError when running JAR from outside directory
I have a JavaFX application which I deploy as a JAR. The application loads and uses native library (a JNI interface). The DLL...
Read more >
Error java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW T ...
I have DataLoader running on 64bit Windows 8. The best way to do this is. create a shortcut to the jar file (right...
Read more >
Uber-JAR - ImageJ Wiki
An uber-JAR—also known as a fat JAR or JAR with dependencies—is a JAR file that contains not only a Java program, but embeds...
Read more >
FAQ: What are the most common errors for java.lang ... - Search
Therefore, bypass the all-in-one JAR extraction process so that the ... LBM with a 64-bit JVM and vice-versa if you are running 32-bit....
Read more >
vaadin , JSNI and java.lang.UnsatisfiedLinkError
Method.invoke(Method.java:601) at com.vaadin.event. ... UnsatisfiedLinkError from vaadin 7, but GWT project works and JSNI is ... run on the server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found