Lan2Play / PugSharp

Pugsharp is a PUG System Plugin for CS2 based on the awesome CounterStrikeSharp by roflmuffin. Its intended purpose is to be used with our fork of eventula, but ofc can be used in a different environment as well. We also try to build an compatible api with most apis of the awesome Get5.
GNU General Public License v3.0
40 stars 8 forks source link

Match cannot load via eventula manager #51

Closed Toutzn closed 10 months ago

Toutzn commented 10 months ago

If we start a matchmaking via the eventula manager the following FAIL pops up:

L 11/17/2023 - 21:52:37: rcon from "172.30.0.21:52684": command "ps_loadconfig "myserver.mydomain.ltd/api/matchmaking/1/configure/1" "Bearer 1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx""
info: PugSharp.PugSharp[0] Command "LoadConfig " called.
info: PugSharp.PugSharp[0] Start loading match config!
info: PugSharp.Config.ConfigProvider[0] Loading match from "myserver.mydomain.ltd/api/matchmaking/1/configure/1"
fail: PugSharp.Config.ConfigProvider[0] Failed loading config from myserver.mydomain.ltd/api/matchmaking/1/configure/1. System.UriFormatException: Invalid URI: The format of the URI could not be determined.    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)    at System.Uri..ctor(String uriString)    at PugSharp.Config.ConfigProvider.LoadMatchConfigFromUrlAsync(String url, String authToken) in /home/runner/work/PugSharp/PugSharp/PugSharp.Config/ConfigProvider.cs:line 61
L 11/17/2023 - 21:53:07: rcon from "172.30.0.21:53542": command "ps_loadconfig "myserver.mydomain.ltd/api/matchmaking/1/configure/1" "Bearer 1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx""
info: PugSharp.PugSharp[0] Command "LoadConfig " called.
info: PugSharp.PugSharp[0] Start loading match config!
info: PugSharp.Config.ConfigProvider[0] Loading match from "myserver.mydomain.ltd/api/matchmaking/1/configure/1"
fail: PugSharp.Config.ConfigProvider[0] Failed loading config from myserver.mydomain.ltd/api/matchmaking/1/configure/1. System.UriFormatException: Invalid URI: The format of the URI could not be determined.    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)    at System.Uri..ctor(String uriString)    at PugSharp.Config.ConfigProvider.LoadMatchConfigFromUrlAsync(String url, String authToken) in /home/runner/work/PugSharp/PugSharp/PugSharp.Config/ConfigProvider.cs:line 61
L 11/17/2023 - 21:53:38: rcon from "172.30.0.21:44334": command "ps_loadconfig "myserver.mydomain.ltd/api/matchmaking/1/configure/1" "Bearer 1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx""
info: PugSharp.PugSharp[0] Command "LoadConfig " called.
info: PugSharp.PugSharp[0] Start loading match config!
info: PugSharp.Config.ConfigProvider[0] Loading match from "myserver.mydomain.ltd/api/matchmaking/1/configure/1"
fail: PugSharp.Config.ConfigProvider[0] Failed loading config from myserver.mydomain.ltd/api/matchmaking/1/configure/1. System.UriFormatException: Invalid URI: The format of the URI could not be determined.    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)    at System.Uri..ctor(String uriString)    at PugSharp.Config.ConfigProvider.LoadMatchConfigFromUrlAsync(String url, String authToken) in /home/runner/work/PugSharp/PugSharp/PugSharp.Config/ConfigProvider.cs:line 61
Certificate expires in 40h16m at 1700399430 (current time 1700254420), will renew in 38h16m

Did I something wrong? Or Bug?

Toutzn commented 10 months ago

I added now https:// infant of the variables but:

info: PugSharp.PugSharp[0] Player Specialist has disconnected! L 11/17/2023 - 22:51:20: rcon from "172.30.0.21:60470": command "ps_loadconfig "https://myserver.localdomain.ltd/api/matchmaking/7/configure/1" "Bearer 1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"" info: PugSharp.PugSharp[0] Command "LoadConfig " called. info: PugSharp.PugSharp[0] Start loading match config! info: PugSharp.Config.ConfigProvider[0] Loading match from "https://myserver.localdomain.ltd/api/matchmaking/7/configure/1" info: PugSharp.Config.ConfigProvider[0] Successfully loaded config for match 7 info: PugSharp.PugSharp[0] Stopping SourceTV demo recording fail: PugSharp.PugSharp[0] Error executing command LoadConfig System.UriFormatException: Invalid URI: The format of the URI could not be determined. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions) at System.Uri..ctor(String uriString) at PugSharp.ApiStats.BaseApi..ctor(String baseUrl, String authKey) in /home/runner/work/PugSharp/PugSharp/PugSharp.ApiStats/BaseApi.cs:line 28 at PugSharp.ApiStats.ApiStats..ctor(String apiStatsUrl, String apiStatsKey) in /home/runner/work/PugSharp/PugSharp/PugSharp.ApiStats/ApiStats.cs:line 12 at PugSharp.PugSharp.ResetForMatch(MatchConfig matchConfig) in /home/runner/work/PugSharp/PugSharp/PugSharp/PugSharp.cs:line 133 at PugSharp.PugSharp.InitializeMatch(MatchConfig matchConfig) in /home/runner/work/PugSharp/PugSharp/PugSharp/PugSharp.cs:line 163 at PugSharp.PugSharp.<>c__DisplayClass35_1.<OnCommandLoadConfig>b__2(MatchConfig matchConfig) in /home/runner/work/PugSharp/PugSharp/PugSharp/PugSharp.cs:line 380 at PugSharp.PugSharp.<>c__DisplayClass35_0.<OnCommandLoadConfig>b__0() in /home/runner/work/PugSharp/PugSharp/PugSharp/PugSharp.cs:line 352 at PugSharp.PugSharp.HandleCommand(Action commandAction, CommandInfo command, CCSPlayerController player, String args, String commandMethod) in /home/runner/work/PugSharp/PugSharp/PugSharp/PugSharp.cs:line 645 SV: CNetworkServerService::StartChangeLevel( (no landmark) ) HostStateRequest::Start(HSR_GAME): loop(levelload) id(5) addons() desc(Changelevel (de_dust2)) SwitchToLoop levelload requested: id [5] addons [] SV: IGameSystem::LoopDeactivateAllSystems { HO: IGameSystem::LoopDeactivateAllSystems { HO: } IGameSystem::LoopDeactivateAllSystems done SV: } IGameSystem::LoopDeactivateAllSystems done SV: Server shutting down: NETWORK_DISCONNECT_LOOPDEACTIVATE (55) CNetworkGameServerBase::SetServerState (ss_active -> ss_dead) L 11/17/2023 - 22:51:22: Log file closed SV: CNetworkStringTableContainer::RemoveAllTables: removing 12 tables CL: CNetworkStringTableContainer::RemoveAllTables: removing 12 tables SV: CGameRulesGameSystem::GameShutdown uninstalled game rules SV: CGameRules::CGameRules destructed L 11/17/2023 - 22:51:22: [META] Could not open folder "/home/lgsm/serverfiles/game/csgo/(null)" (No such file or directory) L 11/17/2023 - 22:51:22: [META] Loaded 0 plugins. SV: Level loading started for 'de_dust2' CL: CLoopModeLevelLoad::MaybeSwitchToGameLoop switching to "game" loopmode with addons () SwitchToLoop game requested: id [5] addons []

Apfelwurm commented 10 months ago

Which version are you using? We had a bug, but that was only in some alpha versions today. Since we have fixed some more stuff today, can you test with the latest alpha please? the bug was between https://github.com/Lan2Play/PugSharp/commit/618ad68027d45a5e0713e5b4f4dec2bdf92c9d2d#diff-2ebe1a9502c809766635bde486db3880828f1344bb56da4f0b1cd3afebbaf2f2 and https://github.com/Lan2Play/PugSharp/commit/da9d6aa1cb01831e5ac55ca417057727760a2a34 . Also please make sure that you have the latest eventula version for some other changes that happened in the course of the last days (which have nothing to do with this error). I leave this ntl open for now, so please report if you manage to get it running now :)

Apfelwurm commented 10 months ago

use the one from https://github.com/Lan2Play/PugSharp/actions/runs/6911365853 (the latest) including counterstrikesharp, since i merged the v55 of it minutes ago. This will also make sure that the suicide command works again (which was broken due to a recent update of cs2), which is critical for the plugin working as intended.

Toutzn commented 10 months ago

I installed the latest beta plugin Version PugSharp_with_cssharp_and_runtime_linux_0.1.4-beta.zip and the latest Version of eventula GitHub (Run Number: 2123 Run ID: 6911378004) Source Commit a87abf984c23d893e1ae1ba42762066656d856f5 Source Ref refs/heads/master vie docker-compose file. I will install your new compiled plugin and come back to you with results. We are doing a LAN now so it is perfekt time to test something with a lot of people. The old G5API and G5-WEB (https://github.com/PhlexPlexico/G5API/blob/master/docker-compose.yml) doing well, but we do not get statistics back from the server at the moment as I can see it seems to be the get5_api_url value is null.

Toutzn commented 10 months ago

Hi.

info: PugSharp.CsServer[0]
      Stopping SourceTV demo recording
info: PugSharp.CsServer[0]
      Switch map to: "de_dust2"!
info: PugSharp.ApiStats.ApiStats[0]
      Initialize Api Stats with BaseUrl: myserver.localdomai.ltd/api/matchmaking/10/
info: PugSharp.ApiStats.ApiStats[0]
      Using BaseURL : "myserver.localdomai.ltd/api/matchmaking/10/" and authKey "Bearer 1|xxxxxxxxxxxxxxxxxxxx"
fail: PugSharp.ApiStats.ApiStats[0]
      Error initializing ApiStats some api features may not work correctly!
      System.UriFormatException: Invalid URI: The format of the URI could not be determined.
         at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
         at System.Uri..ctor(String uriString)
         at PugSharp.ApiStats.BaseApi.InitializeBase(String baseUrl, String authKey) in /home/runner/work/PugSharp/PugSharp/PugSharp.ApiStats/BaseApi.cs:line 34
info: PugSharp.Application[0]
      Start set match variables
info: PugSharp.CsServer[0]
      Update ConVar mp_overtime_maxrounds to value 6
info: PugSharp.CsServer[0]
      Update ConVar mp_maxrounds to value 24
info: PugSharp.Application[0]
...
info: PugSharp.Application[0]
      OnRoundPreStart called
L 11/18/2023 - 13:28:30: Starting Freeze period
L 11/18/2023 - 13:28:30: World triggered "Match_Start" on "de_dust2"
L 11/18/2023 - 13:28:30: Team playing "CT": Test
L 11/18/2023 - 13:28:30: Team playing "TERRORIST": ol.Clutch
L 11/18/2023 - 13:28:30: MatchStatus: Team playing "CT": Test
L 11/18/2023 - 13:28:30: MatchStatus: Team playing "TERRORIST": ol.Clutch
L 11/18/2023 - 13:28:30: MatchStatus: Score: 0:0 on map "de_dust2" RoundsPlayed: -1
info: PugSharp.Application[0]
...

But, if we are in the match try to type !ready, nothing happens.

[All Chat][Nox (106277189)]: !ready
L 11/18/2023 - 13:34:45: "Nox<2><[U:1:106277189]><CT>" say "!ready"
Certificate expires in 24h35m at 1700399430 (current time 1700310885), will renew in 22h35m
info: PugSharp.Match.Match[0]
      ReadyReminder Elapsed
[All Chat][Toutzn (27270548)]: !ready
L 11/18/2023 - 13:34:55: "Toutzn<1><[U:1:27270548]><TERRORIST>" say "!ready"
info: PugSharp.Match.Match[0]
      ReadyReminder Elapsed
info: PugSharp.Match.Match[0]
      ReadyReminder Elapsed
[All Chat][Toutzn (27270548)]: !ready
L 11/18/2023 - 13:35:16: "Toutzn<1><[U:1:27270548]><TERRORIST>" say "!ready"
info: PugSharp.Match.Match[0]
      ReadyReminder Elapsed
info: PugSharp.Match.Match[0]
      ReadyReminder Elapsed
[All Chat][Toutzn (27270548)]: !ready
L 11/18/2023 - 13:35:38: "Toutzn<1><[U:1:27270548]><TERRORIST>" say "!ready"
info: PugSharp.Match.Match[0]
Apfelwurm commented 10 months ago

this is due to https://github.com/roflmuffin/CounterStrikeSharp/issues/93, going to update soon :) will close this one, due to further communication in Discord.