Skip to content

[Bug]: Setup hangs at "Setting language" phase (UnsatisfiedLinkError: sunmscapi.dll on Windows XP) #124

Description

@FemBoysAreCut3

Describe the bug
When launching NTify on Windows XP, the initial setup hangs at the "Setting language" step. The underlying crash occurs because OkHttp checks security providers and attempts to initialize SunMSCAPI, which fails with an UnsatisfiedLinkError because sunmscapi.dll cannot find its required C++ runtime dependencies on Windows XP.

To Reproduce
Steps to reproduce the behavior:

  1. Install Java 8 (Build 1.8.0_251 / 32-Bit) on Windows XP.
  2. Launch NTify.exe / start the setup wizard.
  3. Proceed through the initial setup until the "Setting language" phase.
  4. Setup hangs and logs a java.lang.UnsatisfiedLinkError regarding sunmscapi.dll.
    Expected behavior
    The application should complete the initial language setup and start up properly without crashing on native security provider calls.
    Log file (Under %AppData%/NTify/logs)
Exception in thread "main" Tried to write Object! toString(): java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre1.8.0_251\bin\sunmscapi.dll: Can't find dependent libraries
Tried to write Object! toString(): 	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Tried to write Object! toString(): 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
Tried to write Object! toString(): 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
Tried to write Object! toString(): 	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
Tried to write Object! toString(): 	at java.lang.System.loadLibrary(System.java:1122)
Tried to write Object! toString(): 	at sun.security.mscapi.SunMSCAPI$1.run(SunMSCAPI.java:52)
Tried to write Object! toString(): 	at sun.security.mscapi.SunMSCAPI$1.run(SunMSCAPI.java:50)
Tried to write Object! toString(): 	at java.security.AccessController.doPrivileged(Native Method)
Tried to write Object! toString(): 	at sun.security.mscapi.SunMSCAPI.<clinit>(SunMSCAPI.java:50)
Tried to write Object! toString(): 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Tried to write Object! toString(): 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Tried to write Object! toString(): 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Tried to write Object! toString(): 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Tried to write Object! toString(): 	at java.lang.Class.newInstance(Class.java:442)
Tried to write Object! toString(): 	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221)
Tried to write Object! toString(): 	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
Tried to write Object! toString(): 	at java.security.AccessController.doPrivileged(Native Method)
Tried to write Object! toString(): 	at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
Tried to write Object! toString(): 	at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
Tried to write Object! toString(): 	at sun.security.jca.ProviderList.loadAll(ProviderList.java:282)
Tried to write Object! toString(): 	at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299)
Tried to write Object! toString(): 	at sun.security.jca.Providers.getFullProviderList(Providers.java:173)
Tried to write Object! toString(): 	at java.security.Security.getProviders(Security.java:454)
Tried to write Object! toString(): 	at okhttp3.internal.platform.Platform$Companion.isConscryptPreferred(Platform.kt:202)
Tried to write Object! toString(): 	at okhttp3.internal.platform.Platform$Companion.findJvmPlatform(Platform.kt:231)
Tried to write Object! toString(): 	at okhttp3.internal.platform.Platform$Companion.findPlatform(Platform.kt:222)
Tried to write Object! toString(): 	at okhttp3.internal.platform.Platform$Companion.access$findPlatform(Platform.kt:177)
Tried to write Object! toString(): 	at okhttp3.internal.platform.Platform.<clinit>(Platform.kt:178)
Tried to write Object! toString(): 	at okhttp3.OkHttpClient.<init>(OkHttpClient.kt:237)
Tried to write Object! toString(): 	at okhttp3.OkHttpClient$Builder.build(OkHttpClient.kt:1069)
Tried to write Object! toString(): 	at com.spotifyxp.Initiator.main(Initiator.java:100)

Desktop:

  • OS: Windows XP (32-bit / x86)
  • Java Version: JRE 8u251 (32-bit / i586)

Additional context
The crash triggers when okhttp3 initializes its default platform and queries Security.getProviders(). On Windows XP, loading the native SunMSCAPI provider fails because sunmscapi.dll is missing dependent system DLLs/VC++ runtimes on XP. Passing -Dsun.security.mscapi.disabled=true to the JVM also doesnt work around the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions