I'm getting a RangeError: Maximum call stack size exceeded when I try to run Zenbot on Binance.
After a fresh install I try to run Zenbot on Binance, with one of their pairs, for example BTC-USDT. The only thing I changed in the conf.js. was c.selector = 'binance.BTC-USDT'
I keep getting the following errors, after the bot runs for a bit:
2018-02-07 10:14:00 7788.19 BTC-USDT 95 0.00000 BTC 1000.00000000 USDT +0.00% -1.67%
2018-02-07 10:16:00 7804.00 BTC-USDT +0.20% 56 0.00000 BTC 1000.00000000 USDT +0.00% -1.87%
2018-02-07 10:18:00 7847.98 BTC-USDT +0.56% 125 0.00000 BTC 1000.00000000 USDT +0.00% -2.42%
2018-02-07 10:20:00 7871.51 BTC-USDT +0.29% 102 0.00000 BTC 1000.00000000 USDT +0.00% -2.71%
2018-02-07 10:22:00 7848.02 BTC-USDT -0.30% 116 0.00000 BTC 1000.00000000 USDT +0.00% -2.42%
2018-02-07 10:24:00 7835.99 BTC-USDT -0.16% 68 0.00000 BTC 1000.00000000 USDT +0.00% -2.27%
2018-02-07 10:26:00 7871.41 BTC-USDT +0.45% 131 0.00000 BTC 1000.00000000 USDT +0.00% -2.71%
2018-02-07 10:28:00 7890.00 BTC-USDT +0.23% 66 0.00000 BTC 1000.00000000 USDT +0.00% -2.94%
2018-02-07 10:30:00 7935.13 BTC-USDT +0.57% 172 0.00000 BTC 1000.00000000 USDT +0.00% -3.49%
2018-02-07 10:32:00 7867.74 BTC-USDT -0.85% 104 0.00000 BTC 1000.00000000 USDT +0.00% -2.66%
2018-02-07 10:34:00 7864.15 BTC-USDT -0.05% 99 0.00000 BTC 1000.00000000 USDT +0.00% -2.62%
2018-02-07 10:36:00 7920.11 BTC-USDT +0.71% 90 0.00000 BTC 1000.00000000 USDT +0.00% -3.30%
2018-02-07 10:38:00 7941.98 BTC-USDT +0.27% 62 0.00000 BTC 1000.00000000 USDT +0.00% -3.57%
2018-02-07 10:40:00 7968.92 BTC-USDT +0.33% 147 0.00000 BTC 1000.00000000 USDT +0.00% -3.90%
2018-02-07 10:42:00 7929.66 BTC-USDT -0.50% 93 --- 27.05 0.00000 BTC 1000.00000000 USDT +0.00% -3.42%
2018-02-07 10:44:00 7880.00 BTC-USDT -0.63% 110 ---- 23.81 0.00000 BTC 1000.00000000 USDT +0.00% -2.81%
2018-02-07 10:46:00 7853.94 BTC-USDT -0.34% 116 ---- 22.31 0.00000 BTC 1000.00000000 USDT +0.00% -2.49%
2018-02-07 10:48:00 7900.20 BTC-USDT +0.58% 70 --- 30.69 0.00000 BTC 1000.00000000 USDT +0.00% -3.06%
2018-02-07 10:50:00 7905.17 BTC-USDT +0.06% 50 --- 31.55 0.00000 BTC 1000.00000000 USDT +0.00% -3.12%
2018-02-07 10:52:00 7892.20 BTC-USDT -0.17% 62 --- 30.49 0.00000 BTC 1000.00000000 USDT +0.00% -2.96%
2018-02-07 10:54:00 7965.31 BTC-USDT +0.92% 118 -- 42.24 0.00000 BTC 1000.00000000 USDT +0.00% -3.85%
2018-02-07 10:56:00 7977.47 BTC-USDT +0.15% 68 -- 43.94 0.00000 BTC 1000.00000000 USDT +0.00% -4.00%
2018-02-07 10:58:00 7956.87 BTC-USDT -0.26% 79 -- 41.70 0.00000 BTC 1000.00000000 USDT +0.00% -3.75%
2018-02-07 11:00:00 7962.89 BTC-USDT +0.07% 61 -- 42.62 0.00000 BTC 1000.00000000 USDT +0.00% -3.82%
2018-02-07 11:02:00 7955.03 BTC-USDT -0.10% 30 -- 41.70 0.00000 BTC 1000.00000000 USDT +0.00% -3.73%
2018-02-07 11:04:00 7919.91 BTC-USDT -0.45% 91 -- 37.76 0.00000 BTC 1000.00000000 USDT +0.00% -3.30%
2018-02-07 11:06:00 7922.00 BTC-USDT +0.02% 82 -- 38.13 0.00000 BTC 1000.00000000 USDT +0.00% -3.33%
2018-02-07 11:08:00 7911.21 BTC-USDT -0.14% 45 -- 36.90 0.0105 buy 0.00000 BTC 1000.00000000 USDT +0.00% -3.20%
2018-02-07 11:10:00 7919.00 BTC-USDT +0.09% 56 -- 38.45 0.0170 0.0023 0.00000 BTC 1000.00000000 USDT +0.00% -3.29%
2018-02-07 11:11:59 7923.03 BTC-USDT +0.05% 24 -- 39.28 0.0195 0.0030 0.00000 BTC 1000.00000000 USDT +0.00% -3.34%
An error occurred RangeError: Maximum call stack size exceeded
at each (/home/user/zenbot/node_modules/run-series/index.js:14:17)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
An error occurred RangeError: Maximum call stack size exceeded
at each (/home/user/zenbot/node_modules/run-series/index.js:14:17)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
at each (/home/user/zenbot/node_modules/run-series/index.js:17:24)
at Array.<anonymous> (/home/user/zenbot/lib/engine.js:858:20)
...
RangeError: Maximum call stack size exceeded
This looks like a problem in trades.map
I suppose the bot doesn't crash but keeps spitting the error over and over again?
How large is your trades object (check the API object at http://b.o.t.ip/trades)?
I'm actually not able to connect to the web UI. Should I set the IP of the web server where Zenbot is running in the conf.js (ie. 192.168.1.139)?
The endpoint is exposed on start.
Web UI running on http://...
By default the API listens on all available IPv4 interfaces on a random port above 20000
Same issue here. The trades array length at http://b.o.t.ip/trades is 14387.
14387
Thats not a crazy lot.
I have a PR open which fixes a possible problem with dublicating trades getting added to s.trades: https://github.com/DeviaVir/zenbot/pull/1240/commits/439a024c05284e1a671019a4b4e55fd0f45fa2c0
I found these changes between a working exchange.js and the latest updated exchange.js.


This is still a bug today. I can't do any trades on Binance now.
There is a chance that this could be alleviated by #1324 as it doesn't use the run-series loop anymore.