B3none / cs2-retakes

CS2 implementation of retakes. Based on the version for CS:GO by Splewis.
GNU General Public License v3.0
192 stars 38 forks source link

RetakesPluginShared file not found #99

Closed DeonduPreez closed 7 months ago

DeonduPreez commented 7 months ago

I'm currently running a server via Docker Desktop on Windows using the Docker image generated by https://github.com/joedwards32/CS2. This image is built off of the cm2network/steamcmd:root Docker image, which is running Debian.

I'm building multiple other docker images on my local, one is just to download the latest version of CS2 into the image for faster building times on subsequent images as I've been burned before by using Docker's cache so I run --no-cache on builds. I call this the "cs2-basic" image. There are no addons in here

The next image is built using the above-mentioned "cs2-basic" image as a base, but adds Metamod, Counterstrike-Sharp, and a bash script that modifies the gameinfo.gi file to allow Metamod to start up. I call this the "cs2-metamod-cssharp" image. The versions of Metamod and counterstrikesharp I'm using in this build are the following currently:

The final image is my retakes image which is built off of the above-mentioned "cs2-metamod-cssharp" image. This image adds all of the plugins for CounterStrikeSharp into the image as well as some of the static config files. The versions I'm currently using for the retakes plugins are the following:

I'm using curl to download the zip files, then unzipping them into a temp directory, which I then use to copy all of the files into the correct directories. Thereafter I'm using the root user to set the ownership of all of the files in the temp directory recursively to the steam user as that's the user that will be running the CS2 server.

When I used previous versions of CS2-Retakes that didn't have a shared plugin this process worked 100%, but with the shared plugin I'm running into a FileNotFoundException while CounterStrikeSharp tries to load the RetakesPlugin. The exceptions are as follows:

2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/RetakesPlugin/RetakesPlugin.dll
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32    at System.Reflection.RuntimeAssembly.GetExportedTypes()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 128
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/RetakesPluginShared/RetakesPluginShared.dll
2024-03-27 13:57:32 System.Exception: Unable to find plugin in assembly
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 131
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/InstadefusePlugin/InstadefusePlugin.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 11:57:32 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/steam/cs2-dedicated/game/csgo/addons/counterstrikesharp/plugins/CS2Rcon/CS2Rcon.dll
2024-03-27 13:57:32 System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2024-03-27 13:57:32    at System.Reflection.RuntimeModule.GetTypes()
2024-03-27 13:57:32    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2024-03-27 13:57:32    at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
2024-03-27 13:57:32    at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
2024-03-27 13:57:32 System.IO.FileNotFoundException: Could not load file or assembly 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2024-03-27 13:57:32 
2024-03-27 13:57:32 File name: 'RetakesPluginShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'

I've tried setting ownership recursively again on the addons directory above the metamod and CounterStrikeSharp addons, but even that didn't work and I have confirmed that the file actually exists inside the image. I'm stumped and any guidance would be appreciated. I'm more than happy to upload my Dockerfiles here if you'd like to have a look at them.

Proof of the RetakesPluginShared.dll file being in the correct directory: image

DeonduPreez commented 7 months ago

Done updating, I gave you as much information as I could without adding all the Dockerfiles in here as well

ipsvn commented 7 months ago

The RetakesPluginShared needs to be in the counterstrikesharp/shared directory, not plugins - outlined in the readme

DeonduPreez commented 7 months ago

Thank you for the response, and apologies for wasting your time. I completely missed that part

B3none commented 7 months ago

Thank you for the response, and apologies for wasting your time. I completely missed that part

Happens to the best of us! 🤓