XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 511 forks source link

NotConnectedError: unable to verify the first certificate #1058

Closed alex-piccione closed 4 years ago

alex-piccione commented 4 years ago

I receive this error with both TestNet and DevNet. ([UPDATE] probably didn't tried TestNet initially) With MainNet it works!

NotConnectedError: unable to verify the first certificate next_tick.js:68 (node:14088) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated warning.js:18

"use strict"
const RippleAPI = require("ripple-lib").RippleAPI
const api = new RippleAPI({
    server: "wss://s.devnet.rippletest.net:51233" // DevNet
})

api.connect().then(
    () => {
        const accountAddress = "raDU6KUdVNt1t**********8wwftPp7MG"     // DevNet   (obscured)        
        let info = api.getAccountInfo(accountAddress)
        return info
    }
).then((info) => {
    console.log(info)
    return api.disconnect()    
}).catch(console.error)

ripple-lib version 1.3.4 Node version: 10.7.0 Windows 10 x64
run with VS Code

alex-piccione commented 4 years ago

I was probably using only DevNet (the is not supposed to be stable). Checked again TestNet is working.