-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication sometimes fails #9
Comments
I some times get no response as well, did you find a fix for this? |
I can't see why the server is behaving this way. |
So I have no idea why this is happening and I still don't know if this is a library issue or an issue with the CS:GO gameserver itself. I've noticed the issue started happening somewhere around May 2020. The following code is a temporary solution I'm not proud of, but it's what we've been running at Generation Esports for a couple months without the auth issue happening again. if (type === protocol.SERVERDATA_AUTH && decodedPacket.type !== protocol.SERVERDATA_AUTH_RESPONSE) {
/**
* Since May 2020 reports have arisen about CSGO servers sending 0x00 but not confirming auth
* with 0x02. This is a temporary solution that solves the problem.
*/
if (decodedPacket.body !== '') {
if (decodedPacket.body === '\u0000\u0000\n\u0000\u0000\u0000<\n\u0000\u0000\u0002\u0000\u0000\u0000') {
resolve(true)
} else {
reject(Error('Unable to authenticate'))
}
this.connection.removeListener('data', onData)
}
return
} As I see more people having the issue now I am going to take the time to audit the library and come up with a better solution than the one above. |
Thx Enrique |
thanks!
…On Sat, Nov 7, 2020 at 12:25 AM Markus Adrario ***@***.***> wrote:
Thx Enrique
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSECN4JMZ5OTAEFA5FY4VDSOSHV7ANCNFSM4THKGYOA>
.
|
@EnriqCG may I ask where you place this quick fix? and does it just make the problem go away for now or do I still need to handle something? (sorry im new to rcon and udp) on another note ive started to run a linux server instead of windows and the issue hasnt happened yet |
You should replace this if statement with the above mentioned snippet. That should handle the authentication error and there is no extra requirement. I can confirm the issue happens on Linux too. I rarely run a CS:GO server in Windows anymore and I see this issue a lot. So it is not an OS-dependent thing. |
Protocol.SERVER... has to be with a capital P. EDIT: |
do you guys know if there is an rcon command I can call to get the players score in cs:go? |
A little off-topic, but no, not that I know. Candidates would be "status" or "users", but both don't show scores. For this you would need server Queries: Alternatively you could parse logs to track scores. |
FYI, just ran into this problem and the posted fix is slightly incorrect - or at least it appears to be with the latest versions of CSGO at least. This is what we ended up running with.
|
Is this still on the roadmap with 2.x? |
This issue is happening with CoD4x servers too. I'm using npm and I don't know how to fix it with the code above; can somebody tell me? Thanks <3 |
I have a problem, that sometimes (meanwhile close to 50%) the authentication fails. No answer is sent from the module.
Logging whats happening, I found that sometimes the 2 Authentication packets are sent by the server (or at least received by rcon-srcds) as 1:
a correct set of packets looks like this:
The text was updated successfully, but these errors were encountered: