Skip to content

reqwest::Error { kind: Builder, source: Normal(ErrorStack([])) } in docker container #725

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

Closed
DanielMauderer opened this issue Jan 27, 2025 · 3 comments

Comments

@DanielMauderer
Copy link

DanielMauderer commented Jan 27, 2025

Environment

sentry = "0.36.0"
rust version: 1.83.0-nightly

Steps to Reproduce

I init sentry with this snippet below on my local machine it works without problems.

In my docker container however it panics.

I tried curl www.google.com and is succeeded so I have internet connection.

 let _guard = sentry::init((
        sentry_url.clone(),
        sentry::ClientOptions {
            release: sentry::release_name!(),
            ..Default::default()
        },
    ));

Expected Result

No panic and logging correctly to my sentry dashboard just like my local env.

Actual Result

stack trace:

thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/sentry-0.36.0/src/transports/reqwest.rs:56:29:
called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Builder, source: Normal(ErrorStack([])) }
stack backtrace:
   0:     0x55c97f53667a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h304520fd6a30aa07
   1:     0x55c97f55e12b - core::fmt::write::hf5713710ce10ff22
   2:     0x55c97f532e03 - std::io::Write::write_fmt::hda708db57927dacf
   3:     0x55c97f537ce2 - std::panicking::default_hook::{{closure}}::he1ad87607d0c11c5
   4:     0x55c97f53794e - std::panicking::default_hook::h81c8cd2e7c59ee33
   5:     0x55c97f53856f - std::panicking::rust_panic_with_hook::had2118629c312a4a
   6:     0x55c97f538257 - std::panicking::begin_panic_handler::{{closure}}::h7fa5985d111bafa2
   7:     0x55c97f536b59 - std::sys::backtrace::__rust_end_short_backtrace::h704d151dbefa09c5
   8:     0x55c97f537ee4 - rust_begin_unwind
   9:     0x55c97f0e5873 - core::panicking::panic_fmt::h3eea515d05f7a35e
  10:     0x55c97f0e5d46 - core::result::unwrap_failed::h7c8d8bbbcf45dc13
  11:     0x55c97f1dd80e - sentry::transports::reqwest::ReqwestHttpTransport::new_internal::he5cba55250dbff95
  12:     0x55c97f1d2066 - <sentry::transports::DefaultTransportFactory as sentry_core::transport::TransportFactory>::create_transport::he7b9a6e8211bd3eb
  13:     0x55c97f2d6e20 - sentry_core::client::Client::with_options::h7f00d757551a2c00
  14:     0x55c97f194c11 - auth_service::main::h1633e43d532755c4
  15:     0x55c97f154a83 - std::sys::backtrace::__rust_begin_short_backtrace::hb761895e6e9c5585
  16:     0x55c97f1adf29 - std::rt::lang_start::{{closure}}::h8900cdf7ae00b407
  17:     0x55c97f52d5c0 - std::rt::lang_start_internal::h4d90db0530245041
  18:     0x55c97f198885 - main
  19:     0x7f2c6094524a - <unknown>
  20:     0x7f2c60945305 - __libc_start_main
  21:     0x55c97f0e6101 - _start
  22:                0x0 - <unknown>

I can't figure out why the builder failes with an empty ErrorStack.

@lcian
Copy link
Member

lcian commented Jan 29, 2025

Hi @DanielMauderer, thanks for reporting the issue.
Are you using rustlang/rust:nightly as the Docker image?
I'm unable to reproduce this with that image.

@DanielMauderer
Copy link
Author

Hi,

was not home the past days. I fixed it today it was a certificates problem.

I saw a comment in the code: "This method fails if a TLS backend cannot be initialized". However I still would have expected an empty ErrorStack.

But I looks like this is a reqwest issue.

thanks for the reply. this issue can be closed.

@lcian
Copy link
Member

lcian commented Feb 1, 2025

Thank you for reporting that.
Maybe you could share how you fixed it so that other people that have the same problem can find a solution here :)

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