grpc-node

gRPC-Node Error: Unexpected token u in JSON at position 0

蓝咒 提交于 2021-02-11 14:16:59
问题 So I keep getting this 'unexpected token u in JSON at position 0' error. I'm currently make a request from the main initiator which is making a gRPC request to customers gRPC server. When I don't containerize my files and manually npm install packages in each directory, it works smoothly. However, for some reason when I containerize my files, it has this issue. Usually this issue occurs with asynchronous requests (gRPC is async so makes sense), and I think they're racing to completion, but

GRPC - nodejs DNS resolution failed

ぐ巨炮叔叔 提交于 2021-02-08 06:57:21
问题 I'm working with a GRPC service hosted with HTTPS and self-signed cert. When I connect using syntax like: const client = new productService('https://grpc-server-xxx.com:9090', grpc.credentials.createInsecure()) I am getting the error like this { Error: 14 UNAVAILABLE: DNS resolution failed at Object.exports.createStatusError (C:\grpc\node_modules\grpc\src\common.js:91:15) at Object.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:1209:28) at InterceptingListener._callNext

Docker: How to access files from another container from a given container?

冷暖自知 提交于 2020-08-20 11:29:26
问题 Basically I have a main directory and Books Directory (General file structure, there's more but these are the important pieces). So when I fire a request from main to booksServer, it doesn't work because the node modules are missing. That's because the node modules are inside the docker container at a specific path: '/usr/src/app' How can I have main.js see that books (service/container) does have the proper node packages inside this specific path? I think I can use docker-compose, but I

#grpc node client allow signed certificate

女生的网名这么多〃 提交于 2020-06-29 04:04:34
问题 i have a self signed grpc service on server, and got it working for dart server with dart client. But i could not figure how to bypass or allow self signed certificate for node client.. I've tried this: const sslCreds = await grpc.credentials.createSsl( fs.readFileSync('./ssl/client.crt'), null, // privatekey null, // certChain { checkServerIdentity: function(host, info) { console.log('verify?', host, info); if ( host.startsWith('127.0.0.1') || host.startsWith('logs.example.com') ) { return

(Node.js) --grpc_out: protoc-gen-grpc: %1 is not a valid Win32 application

帅比萌擦擦* 提交于 2020-05-16 01:42:17
问题 I want to compile my .proto file into stubs, but when entering the command: `protoc -I=. ./protos/dummy.proto --js_out=import_style=commonjs,binary:./server --grpc_out=./server --plugin=protoc-gen-grpc=which grpc_tools_node_protoc_plugin I got the following error : --grpc_out: protoc-gen-grpc: %1 is not a valid Win32 application. Thigs I have installed : Windows 10 npm install -g grpc-tools npm install google-protobuf protoc NOTE: I noticed there are a few similar questions already, but I

Firestore / gRPC behind a corporate firewall / proxy

老子叫甜甜 提交于 2019-12-07 00:28:43
问题 Our company has built an electron application using Firestore and now we are trying to deploy the application behind a corporate proxy and firewall (customer environment). After setting the proxy authentication settings using electrons app.on('login') all network requests in the application are successful, except for the firestore connection. We receive the following error: [2018-09-21T09:09:13.556Z] @firebase/firestore: Firestore (5.5.0) [Connection]: GRPC stream error. Code: 14 Message: 14

Firestore / gRPC behind a corporate firewall / proxy

懵懂的女人 提交于 2019-12-05 04:26:58
Our company has built an electron application using Firestore and now we are trying to deploy the application behind a corporate proxy and firewall (customer environment). After setting the proxy authentication settings using electrons app.on('login') all network requests in the application are successful, except for the firestore connection. We receive the following error: [2018-09-21T09:09:13.556Z] @firebase/firestore: Firestore (5.5.0) [Connection]: GRPC stream error. Code: 14 Message: 14 UNAVAILABLE: Connect Failed [2018-09-21T09:09:13.557Z] @firebase/firestore: Firestore (5.5.0)