tealdeer: macOS panicks with --update: MissingOrMalformedExtensions

This is the new 1.5.0 version:

❯ tldr  --version
tealdeer 1.5.0

❯ brew info tealdeer
tealdeer: stable 1.5.0 (bottled)
Very fast implementation of tldr in Rust
https://github.com/dbrgn/tealdeer
Conflicts with:
  tldr (because both install `tldr` binaries)
/opt/homebrew/Cellar/tealdeer/1.5.0 (12 files, 4.3MB) *
  Poured from bottle on 2022-01-01 at 11:05:57
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tealdeer.rb
License: Apache-2.0
==> Dependencies
Build: rust ✘
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions

Here’s the full backtrace:

❯ RUST_BACKTRACE=full tldr -u
thread 'main' panicked at 'Client::new(): reqwest::Error { kind: Builder, source: MissingOrMalformedExtensions }', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.8/src/blocking/client.rs:798:38
stack backtrace:
   0:        0x102dfd988 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha47ac0a9192e239e
   1:        0x102c804f4 - core::fmt::write::hfbe6a7b828c32513
   2:        0x102def8ec - std::io::Write::write_fmt::h34cd061a987d18fd
   3:        0x102defe80 - std::panicking::default_hook::{{closure}}::h2b5c2a08263c3d54
   4:        0x102df09f8 - std::panicking::rust_panic_with_hook::h36a6e8d335334d30
   5:        0x102dfe020 - std::panicking::begin_panic_handler::{{closure}}::h71decad72c0b1843
   6:        0x102dfdf8c - std::sys_common::backtrace::__rust_end_short_backtrace::hfd636421a82c4798
   7:        0x102df02c4 - _rust_begin_unwind
   8:        0x102e886f4 - core::panicking::panic_fmt::hebdff93de232aa26
   9:        0x102e88c68 - core::result::unwrap_failed::hf00c663ffab666bd
  10:        0x102e180dc - tldr::cache::Cache::update::hb0cdc3544a17b6e3
  11:        0x102e2b0a0 - tldr::main::h3a2425d2761a091a
  12:        0x102e22778 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5861f9871dbcaf49
  13:        0x102e28aa0 - _main

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 32 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Of course! When installed through rustup, you should have the cargo command available (if not, please say so). You can create a minimal project using your terminal:

cd /tmp
cargo new testing
cd testing

Now, edit the file Cargo.toml (located at /tmp/testing/Cargo.toml) to include the line

rustls-native-certs = "0.6.2"

right after the line [dependencies].

Now, replace the content of the file src/main.rs (located at /tmp/testing/src/main.rs) to be

fn main() {
    dbg!(rustls_native_certs::load_native_certs()
        .expect("Couldn't load the certs!")
        .len());
}

Finally, in a terminal again, run

cd /tmp/testing
cargo run

This will produce some output about downloading the dependency we added and then the output of our small program. On my machine, it looks like this:

$ cargo run
   Compiling base64 v0.13.0
   Compiling openssl-probe v0.1.5
   Compiling rustls-pemfile v1.0.0
   Compiling rustls-native-certs v0.6.2
   Compiling testing v0.1.0 (/tmp/testing)
    Finished dev [unoptimized + debuginfo] target(s) in 1.10s
     Running `target/debug/testing`
[src/main.rs:2] rustls_native_certs::load_native_certs().expect("Couldn't load the certs!").len() = 136

In any case, your output should be roughly the same until the Running target/debug/testing, after that is were it gets interesting 😃

Reading the above, it seems the solution is for users to manually recompile… however, could the tealdeer-macos-x86_64 binary in the releases be updated with one that works?

Good thing you found a temporary solution!

Since this is looking like a problem with rustls-native-certs, here is another mvp:

// Cargo.toml has
//     rustls-native-certs = "0.6.1"

fn main() {
    dbg!(rustls_native_certs::load_native_certs()
        .expect("Couldn't load the certs!")
        .len());
}

I suppose it that fails, we should open a bug at rustls-native-certs?

Sure I will do that! Thank you!

@storopoli Thank you! This appears to be a bug in reqwest, which is out of our reach. Please file a bug report at https://github.com/seanmonstar/reqwest . Make sure to include the MVP in the report, it will be helpful to the investigators. Feel free to link the thread here, we will see if any actions come up that we can take to fix this for you and possibly many others 😃