standard-ai / ya-gcp

Apache License 2.0
7 stars 8 forks source link

Does not work with tonic feature "tls-roots" #35

Closed shelbyd closed 9 months ago

shelbyd commented 11 months ago

I get the following error when enabling the "tls-roots" feature of tonic. Specifically when running the bigtable example.

Error: BuildError(tonic::transport::Error(Transport, hyper::Error(Connect, Custom { kind: InvalidData, error: InvalidMessage(InvalidContentType) })))

My guess is some kind of handshake issue with TLS. It's entirely possible that this is an issue with some dependency, but I can only really tell the issue from my interaction with this crate.

rnarubin commented 11 months ago

Can you try using the tls-webpki-roots feature on tonic? it's possible our dep declarations aren't specific enough with the features

shelbyd commented 11 months ago

Still fails the same way with tls-webpki-roots.

rnarubin commented 9 months ago

I've figured out the issue. ya-gcp constructs its own https connector, and passes this to tonic. However if tonic has tls enabled, it wraps the connector in its own https handler, and the two conflict. I've fixed this in #36