Questions tagged [grpc-go]

The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

385 questions
4
votes
1 answer

How to fix "context finished before block retrieved: context canceled" occurred while instantiating chaincode?

The instantiation command completes successfully, but when analyzing peer logs, you may notice this: 2019-04-17 17:25:52.581 UTC [gossip.state] commitBlock -> DEBU 48c [canal-contrato] Committed block [1] with 1 transaction(s) 2019-04-17…
3
votes
3 answers

CORS grpc Gateway GoLang

I have a vue.js 3 frontend, and I am calling a Golang backend via grpc-gateway. I have been at this for a while but I see light at the end of the tunnel. I am currently facing a CORS issue. However, I am reading conflicting information on how to…
Mike3355
  • 11,305
  • 24
  • 96
  • 184
3
votes
1 answer

Not able to set header when calling test function with grpc.SetHeader or grpc.SendHeader

I have a function which add something into the grpc header func Dummy(ctx context.Context, request *service.Request) error { err := grpc.SetHeader(ctx, metadata.Pairs("key", "value")) return err } This works fine when it gets called with…
Aman RAJ
  • 87
  • 1
  • 5
3
votes
1 answer

rpc error: code = Unavailable desc = error reading from server: EOF resulting in a panic runtime error: invalid memory address error on goland

I am new Stack Overflow and this is my first question so I'm very open and happy to make any improvements to it :) I'm having an issue when I run a test method to unlike an artwork. I have a method that enables a user to like a specific artwork…
3
votes
1 answer

Service compiling successfully, but message structs not generating - gRPC/Go

I am using gRPC/protobufs as the protocol to communicate between my client and server, both written in go. I'm able to run the command show below to generate the cards.pb.go (server) and cards_grpc.pb.go (client) files without any problem. The…
Sal
  • 1,471
  • 2
  • 15
  • 36
3
votes
2 answers

gRPC error: How to solve "Connection closed before server preface received"?

I deployed DgraphAlpha and DgraphZero in docker. I am connecting to Dgraph as described in the documentation. func newClient() *dgo.Dgraph { d, err := grpc.Dial("localhost:9080", grpc.WithInsecure()) if err != nil { log.Fatal(err) …
Devid Mercer
  • 160
  • 1
  • 2
  • 8
3
votes
2 answers

Getting "protoc": executable file not found in $PATH when running "go generate" command

We have an application written in GoLang and we are using GRPC for defining service contracts. When we try to run "go generate" command to generate stub from proto file it gives following error: main.go:4: running "protoc": exec: "protoc":…
3
votes
1 answer

Using gRPC Web with Dart

I have a web application with the following stack: UI: Flutter Web/Dart Server: Go Communication Protocol: gRPC/gRPC-Web I have defined a few protobufs and compiled them into both Go and Dart successfully. When I run the Go server code, I am able…
Sal
  • 1,471
  • 2
  • 15
  • 36
3
votes
0 answers

Unknown gRPC error with no error message - gRPC-web and goproxy

I'm trying to build a web application with the following stack: Flutter/Dart Go/goproxy gRPC MongoDB I was able to successfully define and compile a protobuf into Dart and Go, however now that I'm trying to integrate the UI with the backend, I am…
Sal
  • 1,471
  • 2
  • 15
  • 36
3
votes
1 answer

Appropriate MAX_CONCURRENT_STREAMS value of http2

I have a situation where I need to set the max_concurrent_streams option while using grpc-go. So I read this RFC7540 document. I read the article and searched, but I have a question that remains unanswered. I am trying to set MAX_CONCURRENT_STREAMS…
3
votes
1 answer

grpc_send_timeout doesn't work, Nginx closes GRPC streams unexpectedly

everyone! I have a config for TLS NGINX server, which proxies stream (bidirectional/unidirectional) to my golang GRPC server. I use params in NGINX conf (server context): grpc_read_timeout 7d; grpc_send_timeout 7d; But! My bidirectional streams…
3
votes
3 answers

server error: rpc error: code = Unavailable desc = transport is closing" in gRPC

I have a grpc server and a client (in my blog project). when I run the server, It seems everything is ok, when I run the client, I face this error, and both server and client close. rpc error: code = Unavailable desc = transport is closing I think…
Arsham Arya
  • 1,461
  • 3
  • 17
  • 25
3
votes
1 answer

Can gRPC method return a message with a field that could be string or null?

I'm designing a gRPC service written in Go. In front of the gRPC service is Envoy which converts incoming HTTP requests to gRPC and converts the gRPC responses to JSON. The requirement of this application is to have an endpoint that returns the…
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
3
votes
2 answers

grpc-gateway runtime version conflict

from last few days the protoc generator is generating code with v2 version of github.com/grpc-ecosystem/grpc-gateway. I want to keep using github.com/grpc-ecosystem/grpc-gateway v1.16.0. I am unable to remove the v2 version which is causing…
3
votes
2 answers

undefined: grpc.ClientConnInterface when compiling grpc

I am new to grpc. In my go.mod file I have: google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8 google.golang.org/grpc v1.21.1 github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d github.com/golang/protobuf v1.3.2 I am generating…
user_78361084
  • 3,538
  • 22
  • 85
  • 147