psdlt / roboape

A simple bot which will buy into every new BNB pair created on PancakeSwap
77 stars 46 forks source link

Connection not opening #5

Closed TJCares1966 closed 3 years ago

TJCares1966 commented 3 years ago

I get this error after I run the builds:

(node:5804) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (node:5804) UnhandledPromiseRejectionWarning: Error: connection not open on send() at Object.ConnectionError (/mnt/h/hot-bot/roboape/build/app.js:2:2417200) at Object.ConnectionNotOpenError (/mnt/h/hot-bot/roboape/build/app.js:2:2416552) at /mnt/h/hot-bot/roboape/build/app.js:2:2515832 at Map.forEach () at a.onClose (/mnt/h/hot-bot/roboape/build/app.js:2:2515796) at l.i [as dispatchEvent] (/mnt/h/hot-bot/roboape/build/app.js:2:2633188) at l.f (/mnt/h/hot-bot/roboape/build/app.js:2:2534043) at m. (/mnt/h/hot-bot/roboape/build/app.js:2:2533456) at m.emit (events.js:198:13) at ClientRequest. (/mnt/h/hot-bot/roboape/build/app.js:2:2537854) at ClientRequest.emit (events.js:198:13) at TLSSocket.socketErrorListener (_http_client.js:401:9) at TLSSocket.emit (events.js:198:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at process._tickCallback (internal/process/next_tick.js:63:19) (node:5804) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:5804) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm pretty sure I did something wrong.

psdlt commented 3 years ago

@TJCares1966 right, those are two separate errors :) First is deprecation warning, second one is actually an issue. What is says is that bot is trying to send some commands to BSC node but connection is not established.

Have you copied .env.sample to .env?

Do you maybe have some firewall rules blocking connections to bsc-ws-node.nariox.org?

Have you set up postgresql server and entered correct credentials to .env?

TJCares1966 commented 3 years ago

yes on the .env and yes I finally got postgresql setup correctly. Will check the fire wall now

don't see any rules blocking bsc-ws-node.nariox.org Dropped bsc-ws-node.nariox.org into the browser and it didn't connect.

psdlt commented 3 years ago

Alternatively, you can try https://getblock.io/nodes/bsc (requires an account and API key) for WEB3_WS_PROVIDER

TJCares1966 commented 3 years ago

Please close this issue :) I'm a dummy. had wss:// typed in twice. Told you it was a me issue. lol

psdlt commented 3 years ago

Ha! Issues like that usually takes the longest to debug :) Glad it's resolved now, closing this issue.