Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "options.ca" property must be one of type string, Buffer, TypedArray, or DataView. Received type object #41

Open
wchmiela opened this issue Jun 27, 2020 · 3 comments

Comments

@wchmiela
Copy link

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.

@moraesslucas
Copy link

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.

@moraesslucas
Copy link

moraesslucas commented Jun 30, 2020

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"
            }
        }
    }

@umeraqeel786
Copy link

umeraqeel786 commented Jul 17, 2020

@moraesslucas how can i find ibpConnection.js file in fabcar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants