fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.35k stars 497 forks source link

`remote reset` error with 1.8.8 and higher #434

Open banool opened 6 months ago

banool commented 6 months ago

This works:

docker run fullstorydev/grpcurl:v1.8.7 -d '{ "starting_version": 0 }'   -max-msg-sz 30000000   -H "authorization:Bearer aptoslabs_ep2o8nuDPuS_529dxW5UWEUY1YZeRWLM6EPCmsLNuz4BE"   grpc.mainnet.aptoslabs.com:443 aptos.indexer.v1.RawData/GetTransactions

You see data stream.

This does not:

docker run fullstorydev/grpcurl:v1.8.8 -d '{ "starting_version": 0 }'   -max-msg-sz 30000000   -H "authorization:Bearer aptoslabs_ep2o8nuDPuS_529dxW5UWEUY1YZeRWLM6EPCmsLNuz4BE"   grpc.mainnet.aptoslabs.com:443 aptos.indexer.v1.RawData/GetTransactions

You get this error instead:

Error invoking method "aptos.indexer.v1.RawData/GetTransactions": rpc error: code = Unavailable desc = failed to query for service descriptor "aptos.indexer.v1.RawData": upstream connect error or disconnect/reset before headers. reset reason: remote reset
foo4u commented 5 months ago

Just ran into this and found the issue. grpcurl 1.8.8 started looking for an endpoint called /grpc.reflection.v1.ServerReflection/ServerReflectionInfo before falling back to /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo. However, it doesn't fall back on all error conditions.