![](/img/trans.png)
[英]Error: 12 UNIMPLEMENTED: unknown service discovery.Discovery Using Hyperledger Fabric Node sdk Service Discovery
[英]Hyperledger - Fabric Node SDK - Curve property error
将节点项目部署到Heroku时遇到问题。
由于来自fabri-client
包的依赖性,出现了一个恒定错误。
错误为: "Cannot read property 'curve' of undefined"
。 我还不清楚为什么。
所有生成的文件都已经过验证(证书文件,pem和所有配置文件)。 它在生产和本地上完全相等。
似乎是有关某些文件或属性无法读取的错误。 我已经看了很多,却一无所获。
2018-10-08T13:13:24.139587+00:00 app[web.1]: [31merror[39m: [Client.js]: Failed to load user "admin" from local key value store. Error: TypeError: Cannot read property 'curve' of undefined 2018-10-08T13:13:24.139597+00:00 app[web.1]: at Object.KEYUTIL.getKey (/app/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10378) 2018-10-08T13:13:24.139599+00:00 app[web.1]: at CryptoSuite_ECDSA_AES.getKey (/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) 2018-10-08T13:13:24.139602+00:00 app[web.1]: at <anonymous> 2018-10-08T13:13:24.139737+00:00 app[web.1]: [31merror[39m: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: TypeError: Cannot read property 'curve' of undefined 2018-10-08T13:13:24.139740+00:00 app[web.1]: at Object.KEYUTIL.getKey (/app/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10378) 2018-10-08T13:13:24.139742+00:00 app[web.1]: at CryptoSuite_ECDSA_AES.getKey (/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) 2018-10-08T13:13:24.139743+00:00 app[web.1]: at <anonymous> 2018-10-08T13:13:24.140035+00:00 app[web.1]: ERRO: TypeError: Cannot read property 'curve' of undefined 2018-10-08T13:13:24.140037+00:00 app[web.1]: at Object.KEYUTIL.getKey (/app/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10378) 2018-10-08T13:13:24.140039+00:00 app[web.1]: at CryptoSuite_ECDSA_AES.getKey (/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) 2018-10-08T13:13:24.140041+00:00 app[web.1]: at <anonymous> 2018-10-08T13:13:30.471688+00:00 heroku[router]: at=info method=POST path="/add_id" host=damp-lowlands-60646.herokuapp.com request_id=a13c1b5d-31f0-4e24-aabb-8733b102cf18 fwd="201.48.168.28" dyno=web.1 connect=1ms service=53ms status=500 bytes=322 protocol=https 2018-10-08T13:13:30.463089+00:00 app[web.1]: [31merror[39m: [Client.js]: Failed to load user "admin" from local key value store. Error: TypeError: Cannot read property 'curve' of undefined 2018-10-08T13:13:30.463101+00:00 app[web.1]: at Object.KEYUTIL.getKey (/app/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10378) 2018-10-08T13:13:30.463103+00:00 app[web.1]: at CryptoSuite_ECDSA_AES.getKey (/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) 2018-10-08T13:13:30.463105+00:00 app[web.1]: at <anonymous> 2018-10-08T13:13:30.466974+00:00 app[web.1]: [31merror[39m: [Client.js]: Failed to load an instance of requested user "admin" from the state store on this Client instance. Error: TypeError: Cannot read property 'curve' of undefined 2018-10-08T13:13:30.466978+00:00 app[web.1]: at Object.KEYUTIL.getKey (/app/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10378) 2018-10-08T13:13:30.466980+00:00 app[web.1]: at CryptoSuite_ECDSA_AES.getKey (/app/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:204:27) 2018-10-08T13:13:30.466982+00:00 app[web.1]: at <anonymous> 2018-10-08T13:13:30.468452+00:00 app[web.1]: Failed to invoke successfully :: TypeError: Cannot read property 'curve' of undefined
谢谢!
我遇到了同样的问题,对我有用的是
注意:就我而言,出现此问题是因为我使用的是客户端代码的1.3版本,而我的超级账本结构为1.4版本
这是由于fabric-client-kv- *文件夹中的证书无效/过期。
解:
如果找不到证书文件夹,请在程序中查找以下行,
var store_path = path.join(__dirname, 'hfc-key-store');
要么
credentialStore:
# [Optional]. Specific to FileKeyValueStore.js or similar implementations in other SDKs. Can be others
# if using an alternative impl. For instance, CouchDBKeyValueStore.js would require an object
# here for properties like url, db name, etc.
path: "./fabric-client-kv-org1"
“ hfc-key-store”或“ fabric-client-kv-org1”是包含证书的文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.