n0mad01 / node.bittrex.api

No longer maintained
MIT License
183 stars 187 forks source link

TypeError: Cannot read property 'sigBytes' of undefined at Object.a.algo.HMAC.a.lib.Base.extend.init ([...]/npm-container/node_modules/node.bittrex.api/hmac-sha512.js:24:177 #14

Closed hems closed 8 years ago

hems commented 8 years ago

I'm running an application on my local machine using OSX without any problems but when deploying to an ubuntu instance i'm receiving the following error while trying to use the api:

    TypeError: Cannot read property 'sigBytes' of undefined
        at Object.a.algo.HMAC.a.lib.Base.extend.init (/bundle/bundle/programs/server/npm/npm-container/node_modules/node.bittrex.api/hmac-sha512.js:24:177)

any suggestions on what might be causing the problem?

n0mad01 commented 8 years ago

hmac-sha512.js is just one part of googles crypto.js (it was the only working hmac-sha512 implementation i had found so far).

https://code.google.com/archive/p/crypto-js/

Maybe your ubuntu machine has some other dependencies to crypto.js occurring in this case.

hems commented 8 years ago

i had an undefined variable on my code that was only undefined on the server, that was the problem.

i'm not sure if it' your interest to catch that error ( for instance validating the required parameters ) hopefully avoiding crashes.