Failed to invoke successfully :: TypeError: Cannot read property 'getConnectivityState' of undefined /opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355 if(self._stream) state = self.stream.call.channel.getConnectivityState(); ^
TypeError: Cannot read property 'getConnectivityState' of undefined
at ClientDuplexStream.<anonymous> (/opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355:56)
at emitOne (events.js:116:13)
at ClientDuplexStream.emit (events.js:211:7)
at ClientDuplexStream._emitStatusIfDone (/opt/share/hyperledger/node_modules/grpc/src/client.js:236:12)
at ClientDuplexStream._readsDone (/opt/share/hyperledger/node_modules/grpc/src/client.js:201:8)
at /opt/share/hyperledger/node_modules/grpc/src/client_interceptors.js:705:15
I am using latest version of pre-requisites as mentioned in below link:
http://hyperledger-fabric.readthedocs.io/en/release-1.1/getting_started.html#install-prerequisites
Can anybody tell me where am i going wrong?
Yes, this is due to a new version of grpc released 3 days ago (v1.11.0). The version is controlled by fabric-client and it takes the latest available. You need to delete the grpc module and reinstall it with
npm install grpc@1.9.1
. This will fix the issue. Going forward you may need to have grpc fixed at 1.9.1 in your package.json until Hyperledger resolve this issue.Reference: https://chat.hyperledger.org/channel/general?msg=FME6aDfnfMexWTm6g
Faced the same issue while building the web docker edit package.json add the line "dependencies": { "grpc" : "1.9.1",
build the docker again issue the docker compose agin ! it works
I commented these lines in
EventHub.js
. It's required only for state log. For example:it works fine now.
I was trying to connect the composer bna to IBM blockchain, and I tried out installing grpc 1.9.1.. and even 1.10.1.. I tried out like everything, and the only thing that worked was doing as Kataus suggested, I commented out the lines relate to the getConnectivity state, and it finally connected to the IBM blockchain network I had.
Thank you Anjy, updating grpc module worked fine.
I'm still getting below error after commenting the line in EventHub.js
Previous detailed error: