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

TypeError: Cannot read property 'statusCode' of undefined #31

Closed
askmike opened this issue Jan 24, 2018 · 4 comments
Closed

TypeError: Cannot read property 'statusCode' of undefined #31

askmike opened this issue Jan 24, 2018 · 4 comments

Comments

@askmike
Copy link

askmike commented Jan 24, 2018

Here is the full error:

**[PATH REDACTED]**\gekko\node_modules\binance\lib\rest.js:78
                    if (response.statusCode === 400 && payload.code === -1021 &&
                                 ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.request [as _callback] (**[PATH REDACTED]**\gekko\node_modules\binance\lib\rest.js:78:34)
    at self.callback (**[PATH REDACTED]**\gekko\node_modules\request\request.js:186:22)
    at Request.emit (events.js:160:13)
    at ClientRequest.<anonymous> (**[PATH REDACTED]**\gekko\node_modules\request\request.js:816:16)
    at Object.onceWrapper (events.js:255:19)
    at ClientRequest.emit (events.js:160:13)
    at TLSSocket.emitTimeout (_http_client.js:708:34)
    at Object.onceWrapper (events.js:255:19)
    at TLSSocket.emit (events.js:160:13)
    at TLSSocket.Socket._onTimeout (net.js:412:8)

cross post from askmike/gekko#1781.

@zoeyg
Copy link
Collaborator

zoeyg commented Jan 24, 2018

Were you using version 1.3.1 when you got this? The code in your stack trace, on line 78, is no longer on line 78 but line 80 so I'm going to assume not? The change in your pull request assumes there's a case where both err and response are undefined. Has that been your experience?

I was assuming one or the other would always be defined. I attempted to fix the error you mentioned here 06573af, as it was reported yesterday #26.

@askmike
Copy link
Author

askmike commented Jan 24, 2018 via email

@zoeyg
Copy link
Collaborator

zoeyg commented Jan 24, 2018

No worries. Sorry to create the extra work for you. The issue actually got introduced attempting fix the clock drift issue for gekko. Hopefully 1.3.1 clears everything up.

@askmike
Copy link
Author

askmike commented Jan 25, 2018

Closing this under assumption this is fixed in 1.3.1.

@askmike askmike closed this as completed Jan 25, 2018
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

Successfully merging a pull request may close this issue.

2 participants