ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

Unhandled promise rejection #138

Closed jangrewe closed 7 years ago

jangrewe commented 7 years ago

My bot keeps on restarting, using GDAX/Coinbase BTC/EUR:

$ nodejs /opt/tribeca/K.js K.json
19:54:16.632 main Requiring authentication to web client
19:54:16.652 main Listening to admins on port 7134
19:55:18.110 main Unhandled promise rejection! TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null
    at Object.<anonymous> (/opt/tribeca/app/server/gateways/coinbase.js:506:23)
    at Generator.next (<anonymous>)
    at fulfilled (/opt/tribeca/app/server/gateways/coinbase.js:4:58)
    at tryCatcher (/opt/tribeca/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/tribeca/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/opt/tribeca/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/opt/tribeca/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/opt/tribeca/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/opt/tribeca/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/opt/tribeca/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/opt/tribeca/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5) Promise {
  _bitField: 18087936,
  _fulfillmentHandler0:
   TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null
       at Object.<anonymous> (/opt/tribeca/app/server/gateways/coinbase.js:506:23)
       at Generator.next (<anonymous>)
       at fulfilled (/opt/tribeca/app/server/gateways/coinbase.js:4:58)
       at tryCatcher (/opt/tribeca/node_modules/bluebird/js/release/util.js:16:23)
       at Promise._settlePromiseFromHandler (/opt/tribeca/node_modules/bluebird/js/release/promise.js:512:31)
       at Promise._settlePromise (/opt/tribeca/node_modules/bluebird/js/release/promise.js:569:18)
       at Promise._settlePromise0 (/opt/tribeca/node_modules/bluebird/js/release/promise.js:614:10)
       at Promise._settlePromises (/opt/tribeca/node_modules/bluebird/js/release/promise.js:693:18)
       at Async._drainQueue (/opt/tribeca/node_modules/bluebird/js/release/async.js:133:16)
       at Async._drainQueues (/opt/tribeca/node_modules/bluebird/js/release/async.js:143:10)
       at Immediate.Async.drainQueues (/opt/tribeca/node_modules/bluebird/js/release/async.js:17:14)
       at runCallback (timers.js:672:20)
       at tryOnImmediate (timers.js:645:5)
       at processImmediate [as _immediateCallback] (timers.js:617:5),
  _rejectionHandler0: undefined,
  _promise0: undefined,
  _receiver0: undefined }
19:55:20.125 main Did not complete clean-up tasks successfully, still shutting down.
19:55:20.125 main Exiting with code 1

this happens with 8a69424f0ac072c221f900fe64ca96132b5b48ee

jangrewe commented 7 years ago

Hmm, seems to be an outage, again: https://status.coinbase.com/

ctubio commented 7 years ago

i will try to add a meaningful msg somehow