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

The app crashes on Android when using SHA256 from System.Security.Cryptography #88098

Closed
nongvantinh opened this issue Feb 8, 2024 · 2 comments

Comments

@nongvantinh
Copy link
Contributor

Tested versions

Godot Engine v4.2.stable.mono.official.46dc27791

System information

Windows 11 Pro

Issue description

When testing my app on Windows 11 Pro, everything functions properly. However, when exporting it to an Android device, it crashes.

Steps to reproduce

Simply calling SHA256 sha256 = SHA256.Create(); in the code and exporting it to an Android device will crash the app.

Minimal reproduction project (MRP)

crashSHA256.zip

@akien-mga
Copy link
Member

This is probably the same root cause as #84559.

@raulsntos
Copy link
Member

Thanks for the report, I'll close it to consolidate in #84559 because I think they're the same issue.

Currently .NET Android exports use the linux-bionic runtime identifier which doesn't support the JNI that is required for crypto APIs. This means that you have to provide the OpenSSL library yourself, if you are able to package libssl.so and libcrypto.so into the APK it should fix your issue.

There's a new PR that changes the way Android exports work to use the android runtime identifier instead. This allows us to use the JNI for crypto support, so it should fix the issue without having to manually provide libssl.so and libcrypto.so.

@raulsntos raulsntos closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants