Skip to content

Error when deploying on Heroku with Docker #728

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
danechitoaie opened this issue Jan 30, 2025 · 1 comment
Closed

Error when deploying on Heroku with Docker #728

danechitoaie opened this issue Jan 30, 2025 · 1 comment

Comments

@danechitoaie
Copy link

I just added Sentry to my Rust project that I'm deploying on Heroku using Docker and after I added Sentry the build started failing with this error:

The following warnings were emitted during compilation:
warning: [email protected]: Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the compilation process. See stderr section below for further information.
error: failed to run custom build command for `openssl-sys v0.9.104`

My Cargo.toml is like this:

reqwest = { version = "0.12.9", default-features = false, features = ["json", "deflate", "gzip", "brotli", "rustls-tls"] }
sentry = { version = "0.36.0", default-features = false, features = ["backtrace", "contexts", "panic", "transport", "anyhow", "reqwest", "rustls"] }

From what I see Sentry tries to use openssl-sys? Shouldn't it use rustls in the way I configured it?
Any way to make Sentry use rustls so I don't need to compile OpenSSL?

@danechitoaie
Copy link
Author

I think I got it working. At least now it builds.

sentry = { version = "0.36.0", default-features = false, features = ["backtrace", "contexts", "panic", "anyhow", "reqwest", "rustls"] }

Basically I had to remove the "transport" feature from sentry.

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

1 participant