austinyearlykim / wolf

:wolf: Binance trading bot for node.js
78 stars 27 forks source link

(SOLVED) Problems with ticker #35

Closed Orbitalz-eth closed 6 years ago

Orbitalz-eth commented 6 years ago

I'm constantly getting this when trying to run the bot, I've tried adjusting the timeouts in the ticker.js file, but no luck. Is there anyway to just bypass this ticker stuff?:

Ticker √ should be able construct Ticker 1) should be able to initialize Ticker 2) should be able to execute array of callbacks undefined == true 3) should be able access Ticker meta data

Ticker √ should be able construct Ticker 4) should be able to initialize Ticker 5) should be able to execute array of callbacks undefined == true 6) should be able access Ticker meta data

18 passing (20s) 6 failing

1) Ticker should be able to initialize Ticker: Uncaught Error: connect EACCES 13.114.117.249:9443 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)

2) Ticker should be able to execute array of callbacks: Error: Timeout of 6000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

austinyearlykim commented 6 years ago

Hi @BatmanPDX,

The Ticker is responsible for tracking and reporting to WOLF the current prices of your target and base assets. I would strongly recommend against just "bypassing" these tests as they are pretty important.

Are you on a stable internet connection? I can put in better handling around initializing the Ticker in the next version release.

Orbitalz-eth commented 6 years ago

Yea, im on a good connection. xfininty 4mb/sec. dont know why it keeps failing on the ticker.

austinyearlykim commented 6 years ago

Hi @BatmanPDX,

Can you:

git checkout master git pull git reset --hard origin/master npm test

And let me know if this is still an outstanding issue? Thank you!

Orbitalz-eth commented 6 years ago

hey @austinyearlykim

this is what I get with the latest update, I have .env file in the root directory to:

wolf@3.4.1 test C:\wolf mocha --recursive --exit

module.js:549 throw err; ^

Error: Cannot find module 'dotenv' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (C:\wolf\test\binance.js:1:63) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at C:\Users\Triangle\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:250:27 at Array.forEach () at Mocha.loadFiles (C:\Users\Triangle\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:247:14) at Mocha.run (C:\Users\Triangle\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:576:10) at Object. (C:\Users\Triangle\AppData\Roaming\npm\node_modules\mocha\bin_mocha:637:18) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3 npm ERR! Test failed. See above for more details.

austinyearlykim commented 6 years ago

npm i in the root directory and try again :)

Orbitalz-eth commented 6 years ago

@austinyearlykim installed the packages, but it's still giving me ticker problems, damn:

Ticker √ should be able construct Ticker 1) should be able to initialize Ticker 2) should be able to execute array of callbacks undefined == true 3) should be able access Ticker meta data

17 passing (10s) 3 failing

1) Ticker should be able to initialize Ticker: Uncaught Error: connect EACCES 13.114.229.146:9443 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)

2) Ticker should be able to execute array of callbacks:

  Uncaught AssertionError [ERR_ASSERTION]: false == true
  + expected - actual

  -false
  +true

  at Timeout.setTimeout [as _onTimeout] (test\ticker.js:49:21)

3) Ticker should be able access Ticker meta data: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

npm ERR! Test failed. See above for more details.

Orbitalz-eth commented 6 years ago

I turned off my ip blocker to see if maybe that was interfering and I also refreshed my nettime sync. That seem to fix the ticker problem. Ran a test 3 times, and all three passed the test. So hopefully that's fixed and it was my net time sync and or ip blocker.

austinyearlykim commented 6 years ago

NICE! 👍