Questions tagged [grpc-web]

gRPC-Web provides a JavaScript library that lets browser clients access a gRPC service.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

gRPC-Web Repository

gRPC-Web Documentation

217 questions
2
votes
1 answer

GRPC: Passing JSON with proto.Message field between browser and server

I've been struggling with passing a JSON with Message values back and forth between systems. Got a bit further, but I'm still not there. A Struct seems to be the way but even though the struct I'm sending looks perfectly fine, it is empty once…
Berco Beute
  • 1,115
  • 15
  • 30
2
votes
1 answer

how to pass array in grpc call using reactjs

I want to send an array of objects into grpc call with reactjs using the "grpc-web-client" module. but it is giving me an error while sending an array of objects. Following is the error: TypeError: n.toArray is not a function I don't understand…
2
votes
1 answer

gRPC Streaming In React Not Working As Expected

I'm trying to test out gRPC streaming in my react app. Although I'm having some troubles. We've tested our streaming in bloom and it successfully streams an event every 2 seconds up to 8 streams. However when I try it out in my React Application the…
Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143
2
votes
0 answers

gRPC-Web Sending JSON as String

I need to send data of nested JSON object from gRPC-web to Backend Golang server. I ended up with converting and sending JSON as a string to the backend server and converting the string back to the JSON in the backend server. Is this a good practice…
Tony King
  • 51
  • 1
  • 7
2
votes
1 answer

"409 Audience not allowed" error when making calls to ESP using Cloud Endpoints and Firebase

I've been working on a gRPC service that requires the ability to receive calls from a browser being authenticated with Firebase. I got everything working up until this 409 error but can't seem to find any more info on it. I'll try to provide as much…
Diericx
  • 418
  • 8
  • 24
2
votes
1 answer

How to send trailing metadata from python gRPC service to grpc-web client?

I'm trying to send trailing metadata from python gRPC service to grpc-web client. But on client side I cannot receive it. I'm using envoy proxy server to connect grpc-web with python gRPC service. For sending metadata I'm using this method: class…
Andrew K
  • 646
  • 5
  • 6
2
votes
1 answer

Update protoc-gen-grpc-web on Linux

I installed grpc-web and the protoc-gen-grpc-web through npm. So when I do npm list -g | grep grpc I get ➜ frontend git:(master) ✗ npm list -g | grep grpc ├─┬ @grpc-gen/protoc-gen-grpc-web@0.4.0 ├── grpc-web@1.0.3 ├─┬…
po.pe
  • 1,047
  • 1
  • 12
  • 27
2
votes
4 answers

How I can test from browser (like from swagger) my webapp powered by gRPC-Web without REST?

I want to develop my client-server web app with clear gRPC (gRPC-Web) without REST. Something like described at official doc: https://grpc.io/docs/quickstart/web.html Is it exist any tool like swagger that let me view message formats from .proto and…
razon
  • 3,882
  • 2
  • 33
  • 46
1
vote
0 answers

In gRPC web, how do you abort a call and make an early return through an interceptor?

The problem I've written an interceptor to cancel a gRPC-web method call, but I couldn't find a way to make an early return. Assuming I want to return a cache instead. When the call is cancelled in the interceptor, the callback function doesn't get…
orange
  • 11
  • 2
1
vote
1 answer

envoy: grpc-web takes a few requests until it no longer times out

Context: I run envoy with grpc-web. I have a bunch of gRPC servers to route to. Each server has a dedicated route and cluster (see config below). Envoy runs inside a docker-container with no special changes (only config and SSL). Envoy and the gRPC…
Pungrammer
  • 165
  • 2
  • 10
1
vote
1 answer

GRPC-Web Stream: Only receiving data when stream is closed

I have setup a simple Java & Spring Boot backend in order to stream data to a gRPC-web client. The Streaming is working as expected when calling from Postman. I call the endpoint and receive the data every 2 seconds. But when I start the stream from…
Vitor Villar
  • 1,855
  • 18
  • 35
1
vote
1 answer

Connecting to grpc-web from Android

I am trying to connect to GRPC web server from Android client. I have tried using the ManagedChannelBuilder, AndroidChannelBuilder and OkHttpChannelBuilder but none of them seem to connect to grpc-web server, they can only connect to the GRPC…
ananth
  • 439
  • 5
  • 10
1
vote
1 answer

How to use grpc-web with the code first grpc services using protobuf-net?

We have developed grpc services using codefirst protobuf-net method. How can we call these services from javascript using grpc-web? how do we generate grpc javascript client code if we dont have .proto files? Thanks
last-Programmer
  • 985
  • 3
  • 9
  • 19
1
vote
1 answer

How to handle a gRPC-web unary call backend behind Envoy in Vue.js with protobuf-ts?

I am trying to implement a gRPC-web call in a Vue.js application that is similar to this example (https://github.com/timostamm/protobuf-ts/blob/master/packages/example-angular-app/src/app/grpcweb-unary/grpcweb-unary.component.ts). My proto file is…
staticdev
  • 2,950
  • 8
  • 42
  • 66
1
vote
0 answers

Data not streamed from the server to the client using grpc web and nginx reverse proxy

A go GRPC server is running on an amazon Linux 2 EC2 instance. GRPC web wrapper is used, which makes the server available for a NEXTjs application. Two ports are exposed. One for regular GRPC requests and another for GRPC web requests. Nginx is…