nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript šŸš€
https://nestjs.com
MIT License
67.28k stars 7.59k forks source link

grpc UnhandledPromiseRejectionWarning #1470

Closed kbrustol closed 5 years ago

kbrustol commented 5 years ago

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Using @grpc/proto-loader v0.4.0 throw UnhandledPromiseRejectionWarning:

(node:68) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'service' of null at ServerGrpc.collectDeepServices (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:168:81) at ServerGrpc.collectDeepServices (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:180:22) at ServerGrpc.collectDeepServices (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:180:22) at ServerGrpc.collectDeepServices (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:180:22) at ServerGrpc.collectDeepServices (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:180:22) at ServerGrpc.getServiceNames (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:60:14) at ServerGrpc.bindEvents (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:43:39) at ServerGrpc.start (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:28:20) at ServerGrpc.listen (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:25:20) at NestMicroservice.listen (/usr/src/app/node_modules/@nestjs/microservices/nest-microservice.js:81:21) (node:68) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:68) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. E0124 16:15:41.849136600 68 server.cc:1391] assertion failed: gpr_atm_acq_load(&server->shutdown_flag) || !server->listeners Aborted [nodemon] app crashed - waiting for file changes before starting...

Minimal reproduction of the problem with instructions

Clone nestjs sample 04-grpc and use @nestjs/proto-loader 0.4.0

Environment


Nest version: 5.7.1


For Tooling issues:
- Node version: 11.7
- Platform:  Windows 10

Others:

VincentSurelle commented 5 years ago

Same as #1469 ?

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.