TypeError: Cannot read property 'concat' of null
See original GitHub issueI keep getting the following error in my nodejs application. I am using node v8.11.1
and grpc v1.11.3
. The same code was working fine a few days ago.
TypeError: Cannot read property 'concat' of null
at Object.getInterceptingCall (/home/dipu/projects/tee/node_modules/grpc/src/client_interceptors.js:1376:39)
at ServiceClient.Client.makeUnaryRequest (/home/dipu/projects/tee/node_modules/grpc/src/client.js:471:47)
at apply (/home/dipu/projects/tee/node_modules/lodash/lodash.js:478:17)
at ServiceClient.wrapper (/home/dipu/projects/tee/node_modules/lodash/lodash.js:5337:16)
at Promise (/home/dipu/projects/tee/node_modules/grpc-promisify/src/index.js:22:26)
at new Promise (<anonymous>)
at ServiceClient.client.(anonymous function) [as getTeeFeed] (/home/dipu/projects/tee/node_modules/grpc-promisify/src/index.js:21:14)
at Object.shadowClient.(anonymous function) [as getTeeFeed] (/home/dipu/projects/tee/build/webpack:/server/helper/grpc-client.js:40:27)
at /home/dipu/projects/tee/build/webpack:/server/api/contents.js:31:33
at Layer.handle [as handle_request] (/home/dipu/projects/tee/node_modules/express/lib/router/layer.js:95:5)
at next (/home/dipu/projects/tee/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/dipu/projects/tee/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/dipu/projects/tee/node_modules/express/lib/router/layer.js:95:5)
at /home/dipu/projects/tee/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/home/dipu/projects/tee/node_modules/express/lib/router/index.js:335:12)
at next (/home/dipu/projects/tee/node_modules/express/lib/router/index.js:275:10)
EDIT: I updated from grpc v1.7.3
. After I reverted back to old package-lock.json
the error was fixed. But still a question remains: why this error happened?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'concat' of Undefined in JS
The "Cannot read property 'concat' of undefined" error occurs when the concat() method is called on an undefined value. To solve the error,...
Read more >TypeError: Cannot read property 'concat' of undefined
My problem is that when i run my project it gives me an error that says: TypeError: Cannot read property 'concat' of undefined....
Read more >TypeError: Cannot read property 'concat' of undefined
Description of the problem: When I run my experiment I get an error which says, 'TypeError: Cannot read property 'concat' of undefined'.
Read more >Uncaught TypeError: Cannot read property 'concat' of undefined
Hi,. I got an error message in the through the developer console inspection. https://imgur.com/a/IXwkK2l. Uncaught TypeError: Cannot read property 'concat' ...
Read more >[Solved]-Can not read property 'Concat' of Undefined-Chart.js
[Solved]-Can not read property 'Concat' of Undefined-Chart.js ... You would have to set the chart type in the main chart option, not inside...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@murgatroid99 The client constructor ensures that
client[functionName].interceptors
is an array, which ensures all those other calls return arrays https://github.com/grpc/grpc-node/blob/master/packages/grpc-native-core/src/client.js#L391@dipu-bd You are using a
grpc-promisify
library which clobbers theclient[functionName]
function, removing theinterceptors
attribute https://github.com/leaves4j/grpc-promisify/blob/master/src/index.js#L14I can update the signatures of the private methods to only return arrays but the immediate fix here is to not clobber
client[functionName]
, and if you do, reattach.interceptors
.The
grpc
package has been deprecated. We recommend using@grpc/grpc-js
instead. That library has a different interceptor implementation, which shouldn’t have these issues.