Skip to content

Version 0.2.13 doesn't work with Rust 1.67.1, Android SDK 17 and NDK 21 #326

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
tyilo opened this issue Mar 7, 2025 · 2 comments
Open

Comments

@tyilo
Copy link

tyilo commented Mar 7, 2025

I have a project which needs to be able to run on Android API level 17. Thus I'm stuck at version 1.67.1 of Rust and Android NDK 21.

The latest version of native-tls which supports Rust 1.67.1 is 0.2.13.

The following code works with version 0.2.12:

fn main() {
    let connector = native_tls::TlsConnector::new().unwrap();
    println!("Connector: {connector:?}");
}

Cargo.toml:

[package]
name = "native-tls-test"
version = "0.1.0"
edition = "2021"
rust-version = "1.67.1"

[dependencies]
native-tls = { version = "=0.2.12", features = ["vendored"] }

However when using 0.2.13, I get the following error:

$ RUST_BACKTRACE=full ./native-tls-test
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Normal(ErrorStack([]))', src/main.rs:2:53
stack backtrace:
   0:  0xf139fa2 - <unknown>
   1:  0xf14a83e - <unknown>
   2:  0xf138b98 - <unknown>
   3:  0xf139e48 - <unknown>
   4:  0xf13abec - <unknown>
   5:  0xf13a90e - <unknown>
   6:  0xf13b056 - <unknown>
   7:  0xf13ae88 - <unknown>
   8:  0xf13a2b6 - <unknown>
   9:  0xf13ad08 - <unknown>
  10:  0xef16a40 - <unknown>
  11:  0xef16c48 - <unknown>
  12:  0xef16e24 - <unknown>
  13:  0xef16d52 - <unknown>
  14:  0xef16f1c - <unknown>
  15:  0xef16eb0 - <unknown>
  16:  0xef16e90 - <unknown>
  17:  0xf136e1e - <unknown>
  18:  0xef16e74 - <unknown>
  19:  0xef16dcc - <unknown>
  20: 0xf35d2912 - <unknown>

As there are no version numbers available between 0.2.13 and 0.2.14, where a fix could potentially provided, I don't know if you could even do anything about this with a new release.

I'm just posting this, if other people run into the same problem.

@vessd
Copy link

vessd commented Mar 26, 2025

For me the problem was solved by installing the openssl package. Before that only the libssl3 package was installed, but it seems something has changed.

@tyilo
Copy link
Author

tyilo commented Mar 31, 2025

For me the problem was solved by installing the openssl package. Before that only the libssl3 package was installed, but it seems something has changed.

I can't install a package on an Android device...

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

No branches or pull requests

2 participants