Skip to content
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

Getting Platform Not Supported Error #76

Closed
Derrick-Tan-Aquametro opened this issue Jul 24, 2023 · 5 comments
Closed

Getting Platform Not Supported Error #76

Derrick-Tan-Aquametro opened this issue Jul 24, 2023 · 5 comments
Labels

Comments

@Derrick-Tan-Aquametro
Copy link

I am in windows 10.

All the libsodium.dll files is here:
image

But I am getting this error...
It is after build, does it affect by Virtual Machine?
I don't think so right...

image

@mimeister
Copy link

mimeister commented Aug 17, 2023

I seem to have the the same problem with my .NET 6 WPF applications.
When running on a physical Win10 machine, everything is fine, but if I run the applications inside of a Win10 VirtualBox VM or the Windows Sandbox a PlatformNotSupportedException is thrown as soon as any NSec functionality is used:

2023-08-17 12:59:45.6827 ERROR System.Exception System.PlatformNotSupportedException: Could not initialize platform-specific components. NSec may not be supported on this platform. See https://nsec.rocks/docs/install for more information. 
EXCEPTION: System.PlatformNotSupportedException: Could not initialize platform-specific components. NSec may not be supported on this platform. See https://nsec.rocks/docs/install for more information.
 ---> System.DllNotFoundException: Unable to load DLL 'libsodium' or one of its dependencies: Das angegebene Modul wurde nicht gefunden. (0x8007007E)
   at Interop.Libsodium.sodium_library_version_major()
   at NSec.Cryptography.Sodium.InitializeCore()
   --- End of inner exception stack trace ---
   at NSec.Cryptography.Sodium.InitializeCore()
   at NSec.Cryptography.Algorithm..ctor()
   at NSec.Cryptography.HashAlgorithm..ctor(Int32 hashSize)
   at NSec.Cryptography.Blake2b..ctor(Int32 hashSize)
   at NSec.Cryptography.HashAlgorithm.get_Blake2b_256()

Edit: The VMs are running .NET Desktop Runtime 6.0.21. But after upgrading the physical machine from 6.0.19 to 6.0.21 it still works, so it's probably not an issue of the runtime.

@samuel-lucas6
Copy link

The Visual C++ Redistributable is required on Windows. This is mentioned at the bottom of the NSec Installation page. You need the vcruntime DLL in the same directory as a self-contained application if the runtime hasn't been installed (see #67).

@mimeister
Copy link

Thanks, I had overlooked that. It works after installing that.

@samuel-lucas6
Copy link

It is quite easy to miss. @ektrah do you think it would be worth putting it in a highlighted Note section like the warning about nonce reuse for AEADs?

@ektrah
Copy link
Owner

ektrah commented Sep 19, 2023

I have reworked the page a bit in 0eb608d. I hope that makes it more clear 😸

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

No branches or pull requests

4 participants