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

[get_team_view_fast] Fails for player name with trailing whitespaces (assumption for now) #116

Open
FlorianSW opened this issue Jul 18, 2022 · 9 comments

Comments

@FlorianSW
Copy link
Collaborator

I actually do not know if the trailing whitespaces are the real issue here, however, the following error popped up in our logs for an otherwise legitimate looking player:

[2022-07-18 20:34:42,907][ERROR] rcon.commands commands.py:wrap:59 | Auto retrying _request ('playerinfo  Showa ',) {'can_fail': False}
Traceback (most recent call last):
  File "/code/rcon/commands.py", line 54, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 
[2022-07-18 20:34:42,948][WARNING] rcon.commands commands.py:_reconnect:95 | reconnecting
[2022-07-18 20:34:45,099][ERROR] rcon.extended_commands extended_commands.py:get_team_view_fast:237 | Failed to get info for {'name': ' Showa ', 'steam_id_64': '765xxxxxxxxxxxxxx', 'steam_bans': {'CommunityBanned': False, 'VACBanned': False, 'NumberOfVACBans': 0, 'DaysSinceLastBan': 0, 'NumberOfGameBans': 0, 'EconomyBan': 'none', 'has_bans': False}, 'country': 'DE'}
Traceback (most recent call last):
  File "/code/rcon/commands.py", line 54, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/code/rcon/extended_commands.py", line 235, in get_team_view_fast
    player_data = future.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/code/rcon/cache_utils.py", line 146, in wrapper
    return cached_func(*args, **kwargs)
  File "/code/rcon/cache_utils.py", line 72, in __call__
    val = self.function(*args, **kwargs)
  File "/code/rcon/extended_commands.py", line 362, in get_detailed_player_info
    raw = super().get_player_info(player)
  File "/code/rcon/commands.py", line 236, in get_player_info
    data = self._request(f"playerinfo {player}", can_fail=can_fail)
  File "/code/rcon/commands.py", line 62, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 

I can provide the actual steam ID if that would be of help, however, I'm not comfortable sharing that here publicly :)

@FlorianSW
Copy link
Collaborator Author

It actually isn't that easy to add trailing whitespaces to the your player name anymore. It looks like Steam added some additional validation here and simply strips away the whitespaces. So this player I mentioned probably has some old name set, still.

However, as we had the same issue just yesterday again, but with another name, I was able to reproduce. As some background:
the players name is [NSK] | desp3rado | vi'D, however, as the name in HLL seems to have a different length limit then in Steam, it is currently stripped to be [NSK] | desp3rado | and it shows up like that in the RCon. However, when executing playerinfo [NSK] | desp3rado | returns with a FAIL:

Got FAIL for playerinfo [NSK] | desp3rado | 

Using the "official" RCon tool provided by the GSP returns FAIL as well :/ So this really looks a bit more like a game server side RCon issue.

@FlorianSW
Copy link
Collaborator Author

Update: I got the response from Team17, that this issue with trailing whitespaces should be fixed with the next update. I'll wait for it to verify that afterwards. I did not get any more info, yet, on how this is fixed (like either the whitespace needs to be there, should be removed (trim), or if the name should be quoted. Let's see 😅)

@MarechJ
Copy link
Owner

MarechJ commented Aug 27, 2022 via email

@FlorianSW
Copy link
Collaborator Author

Just checked this again and.. what should I say: It is still the same behavior as before U13 🤷 I'll get in touch with T17 again to find out what they actually tried to fix and how.

@MarechJ
Copy link
Owner

MarechJ commented Dec 7, 2022

Thanks for following up. it's quite annoying indeed, to have that 1% of failure especially in the automoderation. We could potentially make those guys immune but that may lead to abuses / bypasses.

And for stats gather, well, we're just screwed.

@FlorianSW
Copy link
Collaborator Author

Just for your interest: U14 did not fix this issue 🤷

@ElGuillermo
Copy link
Collaborator

ElGuillermo commented Nov 10, 2023

As we still can't rely on a fix from game developers, we may try to change CRCON behavior.
Please give some advice on my suggestion here : #249

@ElGuillermo
Copy link
Collaborator

CRCON v9.1.0 introduces the option to warn/kick these bad profile players when they join.

@FlorianSW
Copy link
Collaborator Author

I would really like to keep this issue open as a reminder to check this from time to time, if the underlying issue is fixed by T17. Right now, anything that we implemented is an ugly workaround only :)

@FlorianSW FlorianSW reopened this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants