pushrax / node-rcon

A generic RCON protocol client for node.js
MIT License
133 stars 31 forks source link

I am getting the error authentication failed #35

Closed squeaky2137 closed 3 years ago

squeaky2137 commented 3 years ago

I am getting the error authentication failed. The password is 100% correct I have copy and pasted multiple times and just typed. Any idea the reason for the error?

pushrax commented 3 years ago

This may be due to sending a command too early, before the authentication step finishes.

I made a simpler example that shows the correct order of events https://github.com/pushrax/node-rcon/blob/master/examples/basic.js

I also updated the stdio example to queue any commands that were issued before authentication finishes. That approach could be an option, depending on your application.

Feel free to reopen the issue if this wasn't the problem.

squeaky2137 commented 3 years ago

Ah ya i forgot to respond here but that was the issue. I had it in order but it wasnt an async / did add a timeout so it would try sending command before fully authenticatings haha i solved this though but ty for responding :)