-
Notifications
You must be signed in to change notification settings - Fork 4k
Error after hours running on localDB branch #94
Comments
I think I know why this happened, but can you turn on debug for now? And let me know when it happens again (with debug on) |
I just started running it in debug mode, will keep you posted! |
@kingkorf This bug is NOT related to the "localDB branch" I still get it on my own branch which doesn't have "localDB" support
@askmike Based on the looks of it, I think this one is yet another bug related to an improperly set up (node.js conventions) error handler / the issue seems to have a similar surface area to the issue you fixed the other day with the upstream cex.io APIs gekko was relying on. Edited to add:
^ I didn't change that routine in my own branch, but line numbers might be different so I just wanted to put that out there, and ask for clarity: Does gekko just assume that all exchange API object prototypes will have an "apply" method? I don't have time today (about to go out of town since here in the local timezone in NY it's xmas and I have plans tonight) |
The previous log was on Windows 7 platform with latest node. I just ran into another crash (same message I think), and noticed that cex.io gave me a 521 (Cloudflare). Check it out right now... This one is one Arch Linux platform with everything up-to-date.
Hope this helps. |
Oh crap, I think I just spotted the issue. I think the function needs a bind. I had a similar bug when I was first writing the code for #67 ... ... and because I was being VERY lazy I basically just reused some nearby code which already used a bind (can't remember if the async code I borrowed for no good reason other than being lazy and wanting something quick like... I think it was either from the underscore or lodash library, but I could've done the bind natively in node.js if I wasn't being so lazy) https://github.com/kuzetsa/gekko/blob/72ab99fabf2df42a4cc2c711ec2bd96f3902338a/portfolioManager.js Code in question:
As you can see, REALLY lazy. I vaguely remember you had to refactor that because it looked ugly (which I'm not gonna deny AT ALL) Mostly I'm just posting this as a hint in case anyone wants to take a stab at fixing the issue (I'm not certain, and only SUSPECT it's actually related to setting up a callback without a bind, and it could be entirely unrelated) Edited to add: Not only am I often lazy, I'm procrastinating need to get ready / gonna be late for the holidays if I don't stop typing on this gekko issue and... ... (AFK, possibly for a day or two) |
I was assuming this bug was called by a stackoverflow (which happened after X amount of retries), which it did not. The error came from a refactor, after which I referenced to @kuzetsa apply is a method that every function has. The error came from the fact that I was not passing a function (because I removed the |
Thanks for the quick fix! 👍 How is trading for CEX.io comming along? |
Hi there,
I'm trying out your localDB branch and I get this error after about 3 hours running:
I don't know how this happend, but maybe you can make something out of it.
Cheers 👍
The text was updated successfully, but these errors were encountered: