235 questions
0
votes
0
answers
55
views
Why won't node gRPC server side streaming end after cancelling from grpc-web client?
I am trying to stream data to browser client using gRPC Node library.
I am using grpc-js for server and grpc-web for browser client using vue-2. I am using @grpc-web/proxy as a middleware.
I could ...
0
votes
0
answers
41
views
NestJS gRPC is not parsing full response
I am new to gRPC and trying to learn by creating something in NestJs.
but I am stuck on a weird problem where I am trying to send some data by postman but only getting partial data in return.
I am ...
0
votes
1
answer
123
views
How can I receive "any" in NestJS with grpc/proto-loader?
I am using NestJS and have the following message in my protobuf file:
message MyMessage {
string test = 1;
google.protobuf.Any payload = 2;
}
I am then using NestJS with the following ...
0
votes
0
answers
57
views
Facing DEADLINE_EXCEEDED error with the @google-cloud/pubsub package
We are listening for messages from a subscription using the @google-cloud/pubsub package. Everything seems to be working fine, except we are seeing an error frequently pop up in our DataDog console:
...
1
vote
1
answer
158
views
How to Resolve `net::ERR_INVALID_HTTP_RESPONSE` Error When Sending Data to gRPC Server from Browser?
I'm attempting to send data to http://localhost:50051/helloworld.Greeter/SayHello, but I'm encountering the following error in the browser console:
POST http://localhost:50051/helloworld.Greeter/...
0
votes
1
answer
198
views
How can I fix the decoding error in my gRPC Node.js application?
I'm new to gRPC with Node.js, and I'm trying to create a simple request to understand how it works.
I asked ChatGPT for a simple application where the client sends data to the server, and the server ...
0
votes
3
answers
278
views
proto generated files not being compiled into dist Nestjs
I'm implementing gRPC between 2 servers.
the files are being generated perfectly, here is the generate-proto.ps1 file
# Ensure the script stops on the first error
$ErrorActionPreference = "Stop&...
0
votes
1
answer
87
views
error TS2345: Argument of type `'ISchoolService' `is not assignable to parameter of type `'ServiceDefinition<UntypedServiceImplementation>'`
I generate grpc Typescript code with:
"proto": "npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=./grpc/client --plugin=protoc-gen-grpc=`which ...
0
votes
0
answers
49
views
Hit `<foo>_pb.js` does not provide an export named `'<foo>'` syntax error
I generate proto js files with:
npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=grpc_js:./grpc/client --plugin=protoc-gen-grpc=`which ...
0
votes
0
answers
158
views
GRPC io.grpc.StatusRuntimeException: UNAVAILABLE: Keepalive failed. The connection is likely gone
I am new to grpc and java and trying to make use of grpc bidi streaming. I have a grpc server in javascript and client in java running android 7.1.1 version. I am trying to use bidi stream to ...
0
votes
0
answers
59
views
`grpc_tools_node_protoc` generated code does not build for `--moduleResolution=nodenext`
My Node.JS project uses --moduleResolution=nodenext. Code generation script:
"proto": "npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=grpc_js:....
0
votes
0
answers
237
views
why do I get error using Grpc when I import proto path to my PackageDefinition?
hello I have this problem within the file path and I checked the path it's 100% correct and the file is within the same directory that I'm importing:
import { NestFactory } from '@nestjs/core';
import ...
0
votes
1
answer
208
views
Cryptic gRPC error: Received RST_STREAM with code 5
Setup
@grpc/grpc-js based client
GRPC C++ based server
What is happening?
An exception is thrown by GRPC stating:
Error 13: INTERNAL: Received RST_STREAM with code 5
The error is very ambiguios and ...
0
votes
1
answer
230
views
GRPC Node client retry interceptor
I'm have implemented node grpc client retry using interceptor but it is only retrying once and not upto maxRetries which is specified. Also, the error is not propagating to the caller. Can you please ...
1
vote
1
answer
459
views
Firebase Functions All Throwing INTERNAL: Received RST_STREAM with code 2 Error
I have firebase app with over a hundred Google Cloud functions that were working without issue. After some development and testing using the Firebase emulator, I deployed the changes to production. ...
0
votes
1
answer
110
views
infinite sending request POSTMAN(POST method)
I was already finishing my application when out of nowhere my order simply didn't load, I couldn't even post it, this stayed in this infinite loop saying it was sending but it never sent.
my service:
*...
0
votes
2
answers
2k
views
Error 12 UNIMPLEMENTED: The server does not implement the method FindAllComprador
Well, I'm trying to resolve this error in my gRPC method, I've been looking at my code for hours but I can't find the error, I need get one array of elements when I use Get on Postman, but I get this ...
0
votes
0
answers
93
views
Implementing gRPC with Nginx in a React.js and Node.js Application
I am currently facing challenges in establishing communication between the gRPC client, implemented in React.js, and the gRPC server, implemented in Node.js. On the client side, I have successfully ...
1
vote
1
answer
215
views
How to compile gRPC Proto files?
How to use the protoc command line program to compile a *.proto file to a certain language for all languages except for Node.
0
votes
1
answer
189
views
nodejs grpc-js reconnection after server restart
I am experiencing some strange behavior with @grpc/grpc-js client reconnection
Once the client connected successfully and the server restart, the client keep looping in connecting state
How should I ...
1
vote
1
answer
684
views
Error in generate protocol buffers in grpc node
I wanna build a microservice with gRPC in Nodejs, but I got an error.
I installed [email protected] and [email protected], but when I enter this command:
grpc_tools_node_protoc --js_out=...
0
votes
1
answer
320
views
Issue when migrating to @grpc/grpc-js from grpc
Im trying to migrate an older Node app that is using grpc to @grpc/grpc-js. But facing issue when trying to get
In the (old) grpc package the messages definitions are returning functions and there are ...
0
votes
1
answer
285
views
AWS X-RAY + Opentelemetry gRPC instrumentation not working well
I have this code that initializes a tracer.
The context of it is that is being used inside a monorepo with multiple services that are deployed into aws. The traces go from the api-gw to the service ...
1
vote
0
answers
277
views
How to solve the error: "Error: Cannot find module" when building NestJs?
I have a NestJs application in which I want to use the GRPC.
To generate my typescript files from my `.proto` file I used the npm module "grpc_tools_node_protoc_ts" who generated me 2 files, ...
0
votes
1
answer
64
views
ClientWritableStream implementation in grpc-js node library is different from whats mentioned in grpc/node API reference
grpc-js reference
Where write method has encoding as second argument
_write(chunk: RequestType, encoding: string, cb: WriteCallback) {
const context: MessageContext = {
callback: cb,
};
...
0
votes
1
answer
384
views
Should we use bidirectional streaming vs unidirectional grpc requests in a chat app
I have a simple chat app with an api-gateway responsible for socket.io and chat-microservice responsible for storing chats and messages.
//api-gateway/chat.gateway.ts
//receive web-socket messages ...
0
votes
1
answer
160
views
Will 2 unidirectional identical gRPC calls open 2 HTTP/2 connections or will they reuse a single connection?
In my chat app (Nest.js + gRPC microservices) I need to send requests (to create messages) as fast as possible and I worry that reopening the connection (if it is the case) can take too much time and ...
0
votes
1
answer
419
views
does @grpc/grpc-js reuse the http2 connection or does it create new connection for each call/request
I have a nestjs + grpc-js service and a client. And this rpc is called very frequently. The question is: does it reuse the connection or starts a new one every time rpc is called? Or should I use ...
0
votes
0
answers
765
views
I am getting Error: 13 INTERNAL: No message received when replacing grpc with @grpc/grpc-js
When i am trying to switch to new grpc package (@grpc/grpc-js)from existing package(grpc) in my existing code i am getting the error
code
const grpc = require("@grpc/grpc-js");
const ...
1
vote
1
answer
608
views
nodejs grpc-tools generate js code protobuf package import path is error
this is my project:
/nodejs
/out
/protos
project.proto
package.json
project.proto
syntax = "proto3";
package com.test;
import "google/protobuf/timestamp.proto&...
3
votes
2
answers
6k
views
gRPC Health Checks on AWS ALB
No matter which health check path I provide, even if it's completely arbitrary text, the health check will only pass as long if the matcher code is set to 0.
I have one service that's just using the ...
0
votes
1
answer
906
views
How to add request timeout in GRPC Server in Nestjs
We have created a GRPC server microservice in nestjs which fetches data from the Database and share the result with the client. but need to add some timeout in the GRPC server so if the request is not ...
1
vote
0
answers
164
views
gRPC module throwing error with Electron.js
I am trying to work with gRPC in my electron application but grpc module is not working after building the electron application. Initially I tried with grpc node module but it is deprecated recently. ...
1
vote
0
answers
109
views
How can i setup client-side load balancing without using any external service like haproxy?
Haproxy configuration for multiple gprc server is awful and we want to use client-side load balancing but don't know how to do it. I found some files in grpc-node library (like this) related to load ...
0
votes
1
answer
862
views
Server side gRPC service not getting recognised on client Side
I have been learning about gRPC, and I was trying to implement a gRPC API to create, get and list to-dos. Here is the server side code of the API:
https://github.com/girikgarg8/NodeJS/tree/master/...
1
vote
1
answer
659
views
How to properly re-map types from .proto files to Typescript and vice versa?
Let's imagine I have 2 Nest.js services: Service A and Service B, which communicate using gRPC. I am trying to pass an object of type UserSettings from Service A to Service B via Remote Procedure Call ...
5
votes
1
answer
2k
views
Node.js GRPC call to another microservice throwing "CANCELLED: Call cancelled" error
We are using Node.js, Docker Swarm, and GRPC to deploy multiple microservices. One of our microservices is a GRPC service that handles websockets for our frontend. However, when we make a GRPC call to ...
0
votes
1
answer
123
views
fabric-gateway on node.js takes 4 minutes to complete fail or success
I'm trying to migrate from fabric-network to fabric-gateway, in largely due to experiencing an issue with fabric-network where hundreds of connections are left open and eventually clog the server. I'...
2
votes
0
answers
204
views
gRPC (node) Server waits for all RPCs to be handled before sending back responses
The following link contains a detailed description of the issue: https://github.com/grpc/grpc-node/issues/2384
When a server receives multiple RPCs from a client, instead of sending back responses as ...
2
votes
2
answers
1k
views
Compiled Typescript files from gRPC proto files mark every property as optional
I have a bunch of proto files that I compiled to Typescript with the following script:
yarn proto-loader-gen-types \
--grpcLib=@grpc/grpc-js \
--outDir=${OUT_DIR} \
${IN_DIR}/*.proto
One ...
1
vote
0
answers
363
views
Can @grpc/grpc-js dynamically unpack google.protobuf.Any type?
I work on a gRPC client using @grpc/grpc-js, and I have to handle application-specific errors by reading the details array of the google.rpc.Status object. Is it possible to dynamically unpack the ...
1
vote
2
answers
3k
views
How to generate the Typescript files from proto files?
I'm attempting to generate some Typescript files for a React project that would utilize gRPC through proto files.
I ran a script:
#!/bin/bash
IN_DIR="./protos"
OUT_DIR="./dist"
# ...
0
votes
1
answer
129
views
Can't resolve module clarifai-nodejs-grpc in React JS
Error
Module not found
Can't resolve 'clarifai-nodejs-grpc' node module grps-js and proto-loader
I tried config-overrides.js with react-app-rewired:
module.exports = function override(config, env) {
...
1
vote
0
answers
58
views
How can I save the grpc reponse in NodeJS?
I create both grpc server and client. But I'm new to Node/TS and don't know how to save the respone in the callback function.
function read(path:string): string {
logger.info(`reading ${path}`);
...
2
votes
0
answers
919
views
gRPC nodejs client can't send request to server because of serialization failure
I'm currently working on implementing a gRPC nodejs client that should communicate with a java/kotlin gRPC server to test out the cross language codegen.
However when I try to make a call from my ...
2
votes
1
answer
611
views
What is the recommended way to do a grpc call from inside a Typescript Vue.Js component?
After reading the documentation of grpc I see proto files can generate Node (Javascript), Typescript with plugin grpc_tools_node_protoc_ts and grpc-web. Since performance is not critical in my case I ...
0
votes
0
answers
500
views
GRPC server streaming, how to increase server ping time
Am working on a project using GRPC which has a node js server and client is Android written in Kotlin.
We are able to setup the connection and the server streaming works as expected.
The problem we ...
1
vote
1
answer
1k
views
Is there any way to use Pipes with Grpc in Nestjs?
So I'm building an httpgateway which sends messages to a microservice made with nestjs/grpc.
Problem is that, once I decorate my controller with @UsePipes(....) it throws an error for the gateway. I ...
1
vote
1
answer
2k
views
GRPC with JavaScript Client?
Hello I m trying to find ref for GRPC with JavaScript Client.
I checked tried to search but is generally refer Node Library.
In my implementation I have .NET GRPC server and have react UI app
so just ...
-1
votes
1
answer
1k
views
Yarn install is failing
I know i shouldn't just throw a question like this and wish i can provide more information, but i am really no idea what it is and it also my first time encounter such issue (after change to new ...