grpc-web-client icon indicating copy to clipboard operation
grpc-web-client copied to clipboard

Doesn't appear to work on tonic 0.7.0

Open Edgeworth opened this issue 2 years ago • 1 comments

Looks like something changed in tonic 0.7.0 - I get this sort of error now:

38  | pub struct Client {
    | -----------------
    | |
    | doesn't satisfy `<_ as Service<tonic::codegen::http::Request<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>>>::Response = tonic::codegen::http::Response<_>`
    | doesn't satisfy `_: GrpcService<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>`
    | doesn't satisfy `_: Service<tonic::codegen::http::Request<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>>`
    |
    = note: the following trait bounds were not satisfied:
            `grpc_web_client::Client: GrpcService<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>`
            `<grpc_web_client::Client as Service<tonic::codegen::http::Request<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>>>::Response = tonic::codegen::http::Response<_>`
            `grpc_web_client::Client: Service<tonic::codegen::http::Request<http_body::combinators::box_body::UnsyncBoxBody<tonic::codegen::Bytes, Status>>>`

Edgeworth avatar Apr 02 '22 08:04 Edgeworth

I've created a crate based on this with updated dependencies: https://crates.io/crates/tonic-web-wasm-client

devashishdxt avatar May 25 '22 15:05 devashishdxt