Skip to content
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

GMOD Server Stats unavailable or wrong info. #537

Closed
devu4 opened this issue Apr 12, 2020 · 6 comments
Closed

GMOD Server Stats unavailable or wrong info. #537

devu4 opened this issue Apr 12, 2020 · 6 comments
Assignees
Labels
Bug This request does fix a bug. Support v3
Milestone

Comments

@devu4
Copy link
Contributor

devu4 commented Apr 12, 2020

I was querying this server 208.103.169.33:27017 but it return either offline or the player count is totally wrong. This is intermittent. Usually notice it when over 50 players.

Any idea why? Server is showing fine on steam and gtracker
https://www.gametracker.com/server_info/208.103.169.33:27017/

Getting this error when I enable debug option:

GameQ\Exception\Protocol: Unable to read length=4 from buffer. Bad protocol format or return?
in GameQ/Buffer.php:133 Stack trace: #0
GameQ/Buffer.php(416): GameQ\Buffer->read(4) #1
GameQ/Protocols/Source.php(485): GameQ\Buffer->readInt32Signed() #2 [internal function]: GameQ\Protocols\Source->processPlayers(Object(GameQ\Buffer)) #3
GameQ/Protocols/Source.php(213): call_user_func_array(Array, Array) #4
GameQ/GameQ.php(585): GameQ\Protocols\Source->processResponse() #5
GameQ/GameQ.php(357): GameQ\GameQ->doParseResponse(Object(GameQ\Server)) #6
GameQ\GameQ->process() #7 {main}

Seems processing players is completely failing.

@uilson
Copy link
Contributor

uilson commented Apr 14, 2020

INFO for possible fix.

I have not looked further into this, but from what I could see in a quick network packet snifing, using Wireshark, it looks like your server is returning extra packets, before the default response with the server info.

This then come back as an error because GameQ does not see the packet response it was expecting, it tries to processe the response, but it can't parse it.

Its possible a mod present on your server, as I tested 2 other servers in the same IP range, presents on gametracker, and they also failed due to the returned extra packets.

And 1 from other IP that parsed correctly, because no extra packets.

@Austinb
Copy link
Owner

Austinb commented Apr 15, 2020

Has something changed with split packets maybe for that mod? I will see if I can get an output and do some debugging on the response.

@Austinb
Copy link
Owner

Austinb commented Apr 25, 2020

I queried a couple of servers including 208.103.169.16:27015 which returns correctly.

Stepping through the responses there is an issue in the player and rules responses causing the parser to choke and error out. I am not sure but it appears something is manipulating the response coming from the server as it doesn't match the expected format. There are other servers showing the same response. I am not sure the cause at this point.

@Austinb
Copy link
Owner

Austinb commented May 3, 2020

This issue maybe related to #534. Please pull down code from v3 and run your code again. Please let me know if it fixes your issues.

@Austinb Austinb added the Bug This request does fix a bug. label May 3, 2020
@Austinb Austinb added this to the v3.0.16 milestone May 3, 2020
@Austinb Austinb self-assigned this May 3, 2020
@Austinb
Copy link
Owner

Austinb commented Jun 7, 2020

Please open this issue again if you are still having the issue when using the latest v3 build (not release).

@Austinb Austinb closed this as completed Jun 7, 2020
@MrFallen
Copy link
Contributor

Garry's mod wrong information

{"teams": [], "gq_mod": "", "gq_name": "Garry's Mod", "gq_type": "gmod", "players": [], "gq_online": "", "gq_address": "46.174.51.162", "gq_mapname": "", "gq_gametype": "", "gq_hostname": "", "gq_joinlink": "steam://connect/46.174.51.162:27015/", "gq_password": "", "gq_protocol": "source", "gq_dedicated": "", "gq_transport": "udp", "gq_maxplayers": "", "gq_numplayers": "", "gq_port_query": "27015", "gq_port_client": "27015"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This request does fix a bug. Support v3
Projects
None yet
Development

No branches or pull requests

4 participants