Fixing the Eco Webserver Swashbuckle errorLast updated: 02/24/19
With the latest Eco server 0.8.0.0 and higher (tested up to 0.8.0.3), you may find that your Eco server doesn't start the webserver up correctly, breaking a lot of essential in-game functionality. It turns out it's significantly more difficult to save the world without scientific data, laws, or a basic government (who would have known?). Without the global impact created from this UI, the game was effectively broke or unusable.
The error printed from the server during startup will look something like the following. There's a larger stacktrace that we've condensed for easier readability.
Failed to start webserver (TargetInvocationException): Exception has been thrown by the target of an invocation. ... Method not found: Swashbuckle.Application.SwaggerEnabledConfiguration Swashbuckle.Application.HttpConfigurationExtensions.EnableSwagger(System.Web.Http.HttpConfiguration,System.Action`1<Swashbuckle.Application.SwaggerDocsConfig>)
This error is common when running the server via Linux in a Mono environment. There have been reports of a similar error in Windows, but this fix has not been confirmed working there yet.
This error is a result of certain Windows specific libraries seemingly not being loaded, despite being required for the webserver.
Steps to resolve the issue
Thankfully, the fix is actually really simple! You just need to add the file shown below to the root directory of your gameserver. See below for the specifics for how to get this fix applied to your server.
This fix has only been confirmed working on the 0.8.0.3 version of Eco. It's possible that it may need updates for future versions of the game. Check back to this article for any future updates.
Fix in One-click
We've already applied a fix to all Nodecraft customers currently running an Eco server. In case one of your backups or has this problem. you can fix this instantly by using the One Click installer to perform a
SteamCMD: Validate as shown below and our system will apply the fix for you after ensuring your server is updated. Don't have a Nodecraft server? No worries - you can migrate your Eco server for an instant fix, otherwise proceed to the steps below.
You can manually fix your linux Eco server by simply uploading the following file to your server. This file will force Mono to load a few required libraries. Mono is a linux program that allows you to run the Windows Eco Server on your linux server.
- Download the following
EcoServer.exe.configand add it to your server directory alongside the
- Restart your server and it should come online with a functional webserver.
Download the fix
EcoServer.exe.config file fixes your Linux Eco webserver server. The downloaded file will include the following code to fix your server:
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-188.8.131.52" newVersion="184.108.40.206" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-220.127.116.11" newVersion="18.104.22.168" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-188.8.131.52" newVersion="184.108.40.206" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>