Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

[💡 FEATURE REQUEST]: Support for the gzip gRPC codec #191

Closed
1 task done
hetao29 opened this issue Jan 5, 2022 · 3 comments · Fixed by #195
Closed
1 task done

[💡 FEATURE REQUEST]: Support for the gzip gRPC codec #191

hetao29 opened this issue Jan 5, 2022 · 3 comments · Fixed by #195
Labels
C-feature-accepted Feature discussed and accepted
Milestone

Comments

@hetao29
Copy link

hetao29 commented Jan 5, 2022

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

when my gRPC Client enabled the GzipCodec, then client got the error

my client code:

import 'package:grpc/grpc.dart';
import 'package:helloworld/src/generated/helloworld.pbgrpc.dart';

Future<void> main(List<String> args) async {
  final channel = ClientChannel(
    'localhost',
    port: 50000,
    options: ChannelOptions(
      credentials: ChannelCredentials.insecure(),
      codecRegistry: CodecRegistry(codecs: const [GzipCodec(), IdentityCodec()]),
    ),
  );
  final stub = GreeterClient(channel);

  final name = args.isNotEmpty ? args[0] : 'world';

  try {
    final response = await stub.sayHello(
      HelloRequest()..name = name,
      options: CallOptions(compression: const GzipCodec()),
    );
    print('Greeter client received: ${response.message}');
  } catch (e) {
    print('Caught error: $e');
  }
  await channel.shutdown();
}

the error info:

Caught error: gRPC Error (code: 12, codeName: UNIMPLEMENTED, message: grpc: Decompressor is not installed for grpc-encoding "gzip", details: [], rawResponse: null, trailers: {})

Version

2.x

Relevant log output

No response

@ghost ghost assigned rustatian Jan 5, 2022
@rustatian rustatian changed the title Jan 5, 2022
@rustatian
Copy link
Member

Hey @hetao29, thanks for the report. In the current version, we operate with non-gzipped payloads. Will add it in the RR 2.8.
Does it work without the GzipCodec()?

@rustatian rustatian transferred this issue from roadrunner-server/roadrunner Jan 5, 2022
@rustatian rustatian added the C-feature-accepted Feature discussed and accepted label Jan 5, 2022
@rustatian rustatian moved this to Backlog in RoadRunner Jan 5, 2022
@rustatian rustatian added this to the v2.8.0 milestone Jan 5, 2022
@rustatian rustatian moved this from Backlog to Todo in RoadRunner Jan 5, 2022
@rustatian rustatian changed the title Caught error: gRPC Error (code: 12, codeName: UNIMPLEMENTED, message: grpc: Decompressor is not installed for grpc-encoding "gzip", details: [], rawResponse: null, trailers: {}) [💡 FEATURE REQUEST]: Support for the gzip gRPC codec Jan 5, 2022
@rustatian rustatian modified the milestones: v2.8.0, v2.7.0 Jan 5, 2022
@hetao29
Copy link
Author

hetao29 commented Jan 7, 2022

Hey @hetao29, thanks for the report. In the current version, we operate with non-gzipped payloads. Will add it in the RR 2.8. Does it work without the GzipCodec()?

It work without the GzipCodec()

@rustatian
Copy link
Member

Good, I'll add gzip codec in the upcoming release, please stay tuned 👍🏻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-feature-accepted Feature discussed and accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants