psdlt / roboape

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

Any suggestions on this error? #13

Closed iamChadH closed 2 years ago

iamChadH commented 2 years ago

It's running but doesn't seem to be buying any tokens, even ones that fall into the criteria outlined in my .env file. Here's a sample of what I'm seeing in the console: 2021-12-28T00:57:50.010Z [Web3Helper] Nonce: 276 2021-12-28T00:57:50.016Z [WatchNewPairs] Listening to logs 2021-12-28T00:57:50.017Z [WatchNewPairs] Current account balance: 0.112879078936727904 BNB 2021-12-28T00:58:29.287Z [WatchNewPairs] New pair created: 0x1fdf038a4b18db7a583c4b58060e400970062045. BNB reserve: 6. 2021-12-28T00:58:29.787Z [BscScan] 0x717ba67807bdb0733893892a9d56602978800f53 not verified 2021-12-28T00:58:50.056Z [WatchNewPairs] Current account balance: 0.112879078936727904 BNB (node:91091) UnhandledPromiseRejectionWarning: Error at Query.run (webpack://robo-ape/./node_modules/sequelize/dist/lib/dialects/postgres/query.js?:50:25) at eval (webpack://robo-ape/./node_modules/sequelize/dist/lib/sequelize.js?:313:28) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async PostgresQueryInterface.select (webpack://robo-ape/./node_modules/sequelize/dist/lib/dialects/abstract/query-interface.js?:396:12) at async Function.findAll (webpack://robo-ape/./node_modules/sequelize/dist/lib/model.js?:1102:21) (node:91091) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:91091) [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.

psdlt commented 2 years ago

@iamChadH have you properly set up PostgreSQL?

iamChadH commented 2 years ago
iamChadH commented 2 years ago

@psdlt I believe so. I used the following command to set it up: docker run --name roboape-db -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres

iamChadH commented 2 years ago

Got it to work! Had to delete the app.js file and start again. Thanks for this tool!