pepzwee / node-csgo-web-tradebot

Web based CS:GO trade bot. Similar to CSGOSell.
MIT License
147 stars 59 forks source link

"ERR_CONNECTION_REFUSED" When logging in #150

Closed coooool123 closed 6 years ago

coooool123 commented 6 years ago

I've had about 4 issues already and I've followed the tutorial to a T and I'm pretty sure I didn't miss-do anything at all but I feel as if there are errors alongside the code itself that should be updated.

Anyhow I have a new issue which is still not redirecting me back to the site but now I get this error message when I try to login now: "ERR_CONNECTION_REFUSED" saying it refuses to connect or it'll be just like my last post and just constantly redirect me back to the login page and not go back to the site as it should so now I have 2 issues since the last one wasn't solved STILL. d833c42179ab5de466295d39317d6ae6

pepzwee commented 6 years ago

Make sure passport-steam is version 1.0.9.

pepzwee commented 6 years ago

Connection refused means the script is not running and/or crashed. Login loop is caused by passport-steam not being up-to-date.

coooool123 commented 6 years ago

How exactly can I know the version and update it? It wasn't in the guide, I don't want to screw everything up again

pepzwee commented 6 years ago

Inside script directory: cat node_modules/passport-steam/package.json | grep version

coooool123 commented 6 years ago

It says https://gyazo.com/b424234506aacff7aaa39e8104b074d4 so I'm assuming i'm already up-to-date with it

pepzwee commented 6 years ago

Did you launch the script using pm2?

coooool123 commented 6 years ago

Not sure how to do that - Would it be pm2 [the code you gave me above]?

pepzwee commented 6 years ago

pm2 logs 0

coooool123 commented 6 years ago

So pm2 logs 0 and then I paste the code above correct? Sorry if I'm a hassle I'm trying to get used and learn this kind of stuff

pepzwee commented 6 years ago

The output of that command.

coooool123 commented 6 years ago

https://gyazo.com/f2af5d3e5313896b9a205c3d6c610dfe This was the output - I don't see anything related to the version within this output

pepzwee commented 6 years ago

Create a folder called polls, inside that folder create a file called bot_1.json, inside that file put {}. After you've done that, restart the script with this command: pm2 restart 0

Email me your config.js file contents, remove only the bot username, password and its secrets if there's more errors. (hello@pepzwee.com)

coooool123 commented 6 years ago

Do I create the folder within the directory you gave to me?

pepzwee commented 6 years ago

You create the folder where the script files are (config, index etc..).

coooool123 commented 6 years ago

I sen't you the email

pepzwee commented 6 years ago

You don't have SSL and Steam is trying to return to https:// after logging in. That's why it's not working. Even though you have http:// in the config.js file, it's trying to redirect back to https.

I'm unsure if it's because of passport-steam or not. Easiest fix would be to add SSL. I suggest doing it with Cloudflare since it's the easiest way for you.

coooool123 commented 6 years ago

I'll be trying it out and let you know the update! Thanks

coooool123 commented 6 years ago

I now have the SSL but now it doesn't show the ERROR... connection issue thing which is good, instead, now it shows the SSL certification error in console like last time and still won't redirect back to the sites page again.

coooool123 commented 6 years ago

So, do you have a solution? This is quite frustrating for myself lol