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

generateXAddress - Cannot read property 'Symbol(Symbol.iterator)' of undefined #1209

Closed vanphandinh closed 4 years ago

vanphandinh commented 4 years ago

rippleHelper.js

Screen Shot 2020-02-14 at 10 02 40 AM

test.js

Screen Shot 2020-02-14 at 10 03 49 AM

Run "node test.js"

(node:65181) UnhandledPromiseRejectionWarning: UnexpectedError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at Object.generateAddressAPI (/Users/vanphandinh/Desktop/projects/blockchain/node_modules/ripple-lib/dist/npm/offline/generate-address.js:29:15) at RippleAPI.generateXAddress (/Users/vanphandinh/Desktop/projects/blockchain/node_modules/ripple-lib/dist/npm/api.js:219:35) at RippleHelper.generateAddress (/Users/vanphandinh/Desktop/projects/blockchain/src/ripple2/rippleHelper.js:37:25) at test (/Users/vanphandinh/Desktop/projects/blockchain/src/ripple2/test.js:30:25) at Object. (/Users/vanphandinh/Desktop/projects/blockchain/src/ripple2/test.js:45:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) (node:65181) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:65181) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

intelliot commented 4 years ago

Good catch. Thank you for reporting this. It looks like a bug introduced in ripple-lib 1.6.3. Can you try using version 1.6.2 instead?

vanphandinh commented 4 years ago

Good catch. Thank you for reporting this. It looks like a bug introduced in ripple-lib 1.6.3. Can you try using version 1.6.2 instead?

Yes, thanks