Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

getting issue while running node Query.js #120

Open
potini3 opened this issue Dec 27, 2018 · 4 comments
Open

getting issue while running node Query.js #120

potini3 opened this issue Dec 27, 2018 · 4 comments

Comments

@potini3
Copy link

potini3 commented Dec 27, 2018

I was getting error like this can any one help me this one is fabcar

Store path:C:\Users\admin\fabric-samples\fabcar\hfc-key-store
(node:6016) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition
instead
Successfully loaded user1 from persistence
Query has completed, checking results
error from query = { Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]
at Object.exports.createStatusError (C:\Users\admin\fabric-samples\fabcar\node_modules\fabric-client\node_modules\grpc\src\common.js:87:15)
at Object.onReceiveStatus (C:\Users\admin\fabric-samples\fabcar\node_modules\fabric-client\node_modules\grpc\src\client_interceptors.js:1188:28)
at InterceptingListener._callNext (C:\Users\admin\fabric-samples\fabcar\node_modules\fabric-client\node_modules\grpc\src\client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (C:\Users\admin\fabric-samples\fabcar\node_modules\fabric-client\node_modules\grpc\src\client_interceptors.js:614:8)
at callback (C:\Users\admin\fabric-samples\fabcar\node_modules\fabric-client\node_modules\grpc\src\client_interceptors.js:841:24)
code: 2,
metadata: Metadata { _internal_repr: {} },
details: 'access denied: channel [mychannel] creator org [Org1MSP]' }

@vishal3152
Copy link

vishal3152 commented Dec 27, 2018 via email

@potini3
Copy link
Author

potini3 commented Dec 27, 2018

Hi Vishal,

How do I ressolve it. I believe it is taking my credentials from hfc-key-store directly. These values are created when I run registerUser.js

@vishal3152
Copy link

vishal3152 commented Dec 27, 2018 via email

@potini3
Copy link
Author

potini3 commented Dec 28, 2018

Today I deleted my hfc-key-store and restarted the fabric ./startfabric.sh and I got this error in the end of the Script
Error: error getting endorser client for channel: endorser client failed to conn ect to peer0.org1.example.com:7051: failed to create new connection: context dea dline exceeded

But I proceed to ./startfabric.sh node
It worked fine and I ran enrollAdmin and registerUser after that I ran
Node query.js I didn't get any errors but It did not get any response I got like this below how to resolve this

PS C:\Users\admin\fabric-samples\fabcar> node Query.js
Store path:C:\Users\admin\fabric-samples\fabcar\hfc-key-store
(node:6384) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition
instead
Successfully loaded user1 from persistence
Query has completed, checking results
Response is []

and also when I proceed to node invoke.js I am getting the error below

PS C:\Users\admin\fabric-samples\fabcar> node invoke.js
Store path:C:\Users\admin\fabric-samples\fabcar\hfc-key-store
(node:4812) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition
instead
Successfully loaded user1 from persistence
Assigning transaction_id: c211f8835de0f6ff9f13062f233be23e9e007a2d575bfb97eb6f6de98638b75f
Transaction proposal was bad
Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...
Failed to invoke successfully :: Error: Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...

@potini3 potini3 closed this as completed Dec 28, 2018
@potini3 potini3 reopened this Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants