Skip to content

Context: KMP Application installed on Windows Machine -> Crash #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bode090
Copy link

@bode090 bode090 commented May 15, 2025

When a KMP App is installed on a Windows Machine, I usually got this Exception: java.nio.file.FileSystemNotFoundException: Provider "jar" not installed
at java.base/java.nio.file.Path.of(Unknown Source)
at java.base/java.nio.file.Paths.get(Unknown Source)
at com.goterl.resourceloader.ResourceLoader.getFileFromFileSystem(ResourceLoader.java:247)
at com.goterl.resourceloader.ResourceLoader.copyToTempDirectory(ResourceLoader.java:88)
at com.goterl.resourceloader.SharedLibraryLoader.load(SharedLibraryLoader.java:53)
at com.goterl.resourceloader.SharedLibraryLoader.load(SharedLibraryLoader.java:47)
at com.ionspin.kotlin.crypto.LibsodiumInitializer.loadLibrary(LibsodiumInitializer.kt:30)
at com.ionspin.kotlin.crypto.LibsodiumInitializer.initializeWithCallback(LibsodiumInitializer.kt:58)

The Plugin was unusable for installed Versions of the Client, but was working during development

It seemed that the SharedLibrary Loader was making some trouble loading the Files / Libs correctly when the Application was installed

Here's a Native approach and with that, the installed version of the KMP app was working properly

When a KMP App is installed on a Windows Machine, I usually got this Exception:
java.nio.file.FileSystemNotFoundException: Provider "jar" not installed
	at java.base/java.nio.file.Path.of(Unknown Source)
	at java.base/java.nio.file.Paths.get(Unknown Source)
	at com.goterl.resourceloader.ResourceLoader.getFileFromFileSystem(ResourceLoader.java:247)
	at com.goterl.resourceloader.ResourceLoader.copyToTempDirectory(ResourceLoader.java:88)
	at com.goterl.resourceloader.SharedLibraryLoader.load(SharedLibraryLoader.java:53)
	at com.goterl.resourceloader.SharedLibraryLoader.load(SharedLibraryLoader.java:47)
	at com.ionspin.kotlin.crypto.LibsodiumInitializer.loadLibrary(LibsodiumInitializer.kt:30)
	at com.ionspin.kotlin.crypto.LibsodiumInitializer.initializeWithCallback(LibsodiumInitializer.kt:58)

The Plugin was unusable for installed Versions of the Client, but was working during development

It seemed that the SharedLibrary Loader was making some trouble loading the Files / Libs correctly when the Application was installed

Here's a Native approach and with that, the installed version of the KMP app was working properly
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ionspin
Copy link
Owner

ionspin commented May 15, 2025

Hi @bode090 Thanks for the contribution, I'll give it a look in the coming days. We haven't had problems with deploying to windows previously, but if this makes it so that we can have less dependencies in the library, then great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants