Comments (13)
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.
from rcon-srcds.
I some times get no response as well, did you find a fix for this?
from rcon-srcds.
I can't see why the server is behaving this way.
I didn't really look into this, I was hoping, @EnriqCG would have a look.
from rcon-srcds.
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.
from rcon-srcds.
Thx Enrique
from rcon-srcds.
from rcon-srcds.
@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
from rcon-srcds.
if (type === protocol.SERVERDATA_AUTH && decodedPacket.type !== protocol.SERVERDATA_AUTH_RESPONSE) {
Protocol.SERVER... has to be with a capital P.
EDIT:
At least in the current version. In the Typescript version from the pull-request it's correct as is.
from rcon-srcds.
do you guys know if there is an rcon command I can call to get the players score in cs:go?
from rcon-srcds.
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:
https://developer.valvesoftware.com/wiki/Server_queries#A2S_PLAYER
Alternatively you could parse logs to track scores.
I'm developing a server API (for linux servers) using nodejs, which does this (not for scores yet, but I plan to implement that too):
https://github.com/Taraman17/nodejs-csgo-api
from rcon-srcds.
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.
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\u0019\t\u0000\u0000\u0002\u0000\u0000\u0000') {
resolve('success')
} else {
reject(Error('Unable to authenticate'))
}
this.connection.removeListener('data', onData)
}
return
}
from rcon-srcds.
Is this still on the roadmap with 2.x?
from rcon-srcds.
This issue is happening with CoD4x servers too.
When I call authenticate()
right after 2 or 3 seconds for second time it doesn't resolve or reject the promise.
I'm using npm and I don't know how to fix it with the code above; can somebody tell me? Thanks <3
from rcon-srcds.
Related Issues (13)
- Possible EventEmitter memory leak detected HOT 3
- Server Connection Timeout Config HOT 4
- Rcon is not a constructor HOT 9
- Problem with multipacket responses HOT 11
- Doesn't work for chiv server HOT 6
- code: 'ETIMEDOUT' on authentication HOT 1
- Rcon is not defined. HOT 3
- Changes with CS2
- A list of all games that are supported HOT 2
- Add localAddress option
- Not all commands give a response & another EventEmitter memory leak HOT 12
- Can this be used with CS:GO HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcon-srcds.