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

Build error v0.11.1: no method named disable_built_in_roots found for struct TlsConnectorBuilder in the current scope #1181

Closed
meldron opened this issue Feb 18, 2021 · 5 comments

Comments

@meldron
Copy link
Contributor

meldron commented Feb 18, 2021

Building reqwuest v0.11.1 with with native-tls fails with the following error:

   Compiling reqwest v0.11.1
error[E0599]: no method named `disable_built_in_roots` found for struct `TlsConnectorBuilder` in the current scope
   --> /home/meldron/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.1/src/async_impl/client.rs:218:25
    |
218 |                     tls.disable_built_in_roots(!config.tls_built_in_root_certs);
    |                         ^^^^^^^^^^^^^^^^^^^^^^ method not found in `TlsConnectorBuilder`
  • Linux Ubuntu 18.04
  • cargo 1.50.0 (f04e7fab7 2021-02-04)

Cargo.toml:

reqwest = { version = "0.11.0", default-features = false, features = ["blocking", "native-tls", "rustls-tls", "json"] }

Building reqwest worked fine with v0.10.10

@meldron meldron changed the title no method named disable_built_in_roots found for struct TlsConnectorBuilder in the current scope Build error: no method named disable_built_in_roots found for struct TlsConnectorBuilder in the current scope Feb 18, 2021
@meldron meldron changed the title Build error: no method named disable_built_in_roots found for struct TlsConnectorBuilder in the current scope Build error v0.11.1: no method named disable_built_in_roots found for struct TlsConnectorBuilder in the current scope Feb 18, 2021
@seanmonstar
Copy link
Owner

Hm, we may be using a new feature but didn't update the minimum version of native-tls. If you run cargo update -p native-tls, does that fix it?

@meldron
Copy link
Contributor Author

meldron commented Feb 18, 2021

If you run cargo update -p native-tls, does that fix it?

cargo update -p native-tls                                                                                                                           
    Updating crates.io index
    Updating core-foundation v0.7.0 -> v0.9.1
    Updating core-foundation-sys v0.7.0 -> v0.8.2
    Updating native-tls v0.2.4 -> v0.2.7
    Updating security-framework v0.4.4 -> v2.0.0
    Updating security-framework-sys v0.4.3 -> v2.0.0

After running cargo update -p native-tls reqwest compiled again. Thanks a lot!

I tried to update reqwest with the following approach.

  1. cargo upgrade
  2. cargo clean
  3. cargo build

Is this in general a bad approach?

Thanks for your quick response! 👍

@meldron meldron closed this as completed Feb 18, 2021
@seanmonstar
Copy link
Owner

Is this in general a bad approach?

No, you did fine. I think reqwest needs to update its minimum native-tls version, so that if you update reqwest, it requires an update to native-tls.

meldron pushed a commit to meldron/reqwest that referenced this issue Feb 19, 2021
Update to v0.2.7 to prevent pssoible build error (seanmonstar#1181) caused by
incompatible native-tls version < v0.2.7
seanmonstar pushed a commit that referenced this issue Feb 19, 2021
Update to v0.2.7 to prevent possible build error (#1181) caused by
incompatible native-tls version < v0.2.7

Co-authored-by: Bernd Kaiser <bk@dfjk.eu>
@bgianfo
Copy link

bgianfo commented Feb 19, 2021

Is a new version getting released with this fix?

@seanmonstar
Copy link
Owner

It will eventually, but there's steps to update for any user bumping into this. The only time you would is if you updating reqwest only, instead of a full cargo update.

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

3 participants