Closed ScottPierce closed 1 month ago
The actual cause of load failure here is almost certainly a signature mismatch, which can occur when shipping a JAR with a signed skiko inside. The error crops up now because Conveyor recently added support for this type of signing to help with other JVM libraries that need special configuration to load their JNI library from inside a bundle/installed app dir.
There's an explanation of the error in more depth here:
and a discussion of the overall ecosystem problems that lead to it here:
https://hydraulic.software/blog/11-in-jar-signing.html
There are many solutions, but from Compose's perspective probably the simplest is to catch a failure to load the library from ~/.skiko and delete/re-extract the dylib. That will make sure that whatever's on disk has a signature that matches the signer of the app itself at load time. It's ugly, especially if you have multiple Compose apps running at once, but it should work. The "real" solution here is always to turn on JNI library extraction at packaging time so there's no need for Compose or other libs to do this extract-to-home-dir dance at all. Compose is compatible with this out of the box, the problem is more other libraries and the general effort required to configure them all.
Related thread in Slack https://kotlinlang.slack.com/archives/C01D6HTPATV/p1679036069089779
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug It seems that sometimes the skiko cache in
~/.skiko
can become corrupted, and the user will become stuck, unable to open the app. The only fix is to get the user to delete the~/.skiko
directory. When this corruption happens, the app will not open, and nothing can be done.It's unclear how this corruption happens, but I've seen it on at least 4 developers computers.
Affected platforms Select one of the platforms below:
Versions
To Reproduce
Expected behavior In the case that the skiko cache becomes corrupted like this, skiko should catch the exception itself, and repair the cache automatically.