evote
evote copied to clipboard
The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object
After user registration, there is a response:
Failed to register user + E12345678 + : TypeError [ERR_INVALID_ARG_TYPE]: The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object
response from registerVoter:
{
error: TypeError [ERR_INVALID_ARG_TYPE]: The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object
at validateKeyOrCertOption (_tls_common.js:80:11)
at Object.createSecureContext (_tls_common.js:110:9)
at Object.connect (_tls_wrap.js:1403:48)
at Agent.createConnection (https.js:125:22)
at Agent.createSocket (_http_agent.js:234:26)
at Agent.addRequest (_http_agent.js:193:10)
at new ClientRequest (_http_client.js:276:16)
at Object.request (https.js:309:10)
at /Users/user/Desktop/evote/evote/web-app/server/node_modules/fabric-network/node_modules/fabric-ca-client/lib/FabricCAClient.js:306:37
at new Promise (
Expected: I should register new user.
Any news on that? I'm having the same issue when I'm deploying the application to IBM Cloud. When it's localhost it's working fine.
Hey, @wchmiela I managed to fix the error.
In my ibpConnections.json under certificateAuthorities, it looked like this:
"certificateAuthorities": {
"184.172.233.37:31814": {
"url": "https://184.172.233.37:31814",
"caName": "ca",
"tlsCACerts": {
"pem": [
"certificate in here"
]
}
}
}
I just changed tlsCACerts.pem to a simple string instead of an array, so the fixed version was like this:
"certificateAuthorities": {
"184.172.233.37:31814": {
"url": "https://184.172.233.37:31814",
"caName": "ca",
"tlsCACerts": {
"pem": "certificate in here"
}
}
}
@moraesslucas how can i find ibpConnection.js file in fabcar