alexcrichton/tokio-curl

Error running from examples

Opened this issue · 5 comments

No error compiling the program. Error when running.

thread 'main' panicked at 'called Result::unwrap()on anErr value: PerformError { error: Error { repr: Custom(Custom { kind: Other, error: Error { description: "Problem with the SSL CA cert (path? access rights?)", code: 77, extra: None } }) } }', /checkout/src/libcore/result.rs:860

Hm this looks like curl is attempting to probe CA path locations but the permissions are off? Do you know if that is true on your system?

Yup, I'm using this example from tokio-curl https://docs.rs/tokio-curl/0.1.9/tokio_curl/

Cargo.toml
[dependencies]
tokio-curl="0.1.9"
curl="0.4.8"
futures="0.1.14"
tokio-core="0.1.9"

Yes. Working in Windows 10 Pro but not in GNU/Linux Lubuntu 16.04

2017-08-22

Using RUST_BACKTRACE=1

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PerformError { error: Error { repr: Custom(Custom { kind: Other, error: Error { description: "Problem with the SSL CA cert (path? access rights?)", code: 77, extra: None} }) } }', /checkout/src/libcore/result.rs:906:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:572
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::result::unwrap_failed
  10: testcurl::main
  11: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  12: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:61
  13: __libc_start_main
  14: _start

Sorry I don't know where this would come from :(

You may want to try digging around in curl's source to see where this error comes from, but short of that I don't otherwise know how to fix this offhand.

It's okay, @alexcrichton , I'll try to find out the problem. I just want to make sure that the bug is not from tokio-curl

bluss commented

I had this error message (Debian stretch at this time) for a package that was probably using curl through the same path, in my case cargo-outdated's cargo code. (While cargo had no problem, the difference being of course that cargo-outdated was compiled locally).

I fixed it by uninstalling libcurl3-nss: the nss version does not support reading pem certificates at this time (The problem is something like that). The package manager should ensure that an alternate libcurl library remains installed, otherwise see to that.

After package removals, I rebuilt cargo-outdated and it worked fine.