Closed tanpro260196 closed 7 years ago
Update those plugins to use Newtonsoft.Json version 10
where can I get that? The file that goes with tshock is 9.0.1.
Ok, I tried with the new file from here: https://www.nuget.org/packages/newtonsoft.json/ Nothing change, same error.
The plugins will need to be recompiled. Alternatively you can try downloading the versions required by the plugins (eg version 6 for chestroom) and putting them all in the serverplugins folder (in separate sub-folders) I.e.,
Serverplugins
Newtonsoft6
Newtonsoft.Json.dll (version 6) Newtonsoft9 Newtonsoft.json.dll (version 9) etc
Thanks, that works for some, but then there is this:
Seconomy
'[Server API] Error Startup aborted due to an exception in the Server API initialization: System.InvalidOperationException: Failed to load assembly "Wolfje.Plugins.Jist.dll". ---> System.InvalidOperationException: Could not create an instance of plugin class "Wolfje.Plugins.Jist.JistPlugin". ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'TShockAPI, Version=4.3.21.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. at Wolfje.Plugins.Jist.JistPlugin..ctor(Main game) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at TerrariaApi.Server.ServerApi.LoadPlugins() --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins() --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins() at TerrariaApi.Server.ServerApi.Initialize(String[] commandLineArgs, Main game) at TerrariaApi.Server.HookManager.InitialiseAPI() '
Region Trigger:
[Server API] Warning Plugin "RegionTrigger" has had an unhandled exception thrown by one of its GameInitialize handlers: System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified. File name: 'MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' at RegionTrigger.RtRegionManager..ctor(IDbConnection db) at RegionTrigger.RegionTrigger.OnInitialize(EventArgs args) at TerrariaApi.Server.HandlerCollection`1.Invoke(ArgsType args)
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]
Do the same as before, but with TShock.dll version 4.321.0 and MySql.Data.dll version 6.9.9.0
Note that having two tshockapi.dlls may cause unintended behaviour
oh well, guess I gonna stay with the old build for a while then, but why does this happened anyway? tshock does not normaly require exact file version like this...
This is a result of the recently added recursive asssembly resolver. It will now search subdirectories along with the base ServerPlugins folder, but in order for it to load the right dependencies for each plugin, it was changed to use an assembly's full name, which includes the file version. We are aware that this effectively breaks -ignoreversion functionality and discussion is open for whether we should look into a workaround.
@tanpro260196 The problem of RegionTrigger has been fixed on the latest release: https://github.com/mistzzt/RegionTrigger/releases
Is this still an issue? @tanpro260196
I'm gonna go ahead and say this is definitely a problem. Um, where do you plan to source developers to update all plugins to use recent assembly versions, @Ijwu?
Seems to me like -ignoreversion should just not try to resolve every assembly exactly.
@hakusaro It may be that I've misunderstood the issue. Perhaps some more intelligence put into the recursive loading may be necessary. I'd hate to have to build and resolve a dependency tree, but that may be required to optimally load all plugins without issue.
The problem is that people are forced to find old versions of TShock even for the most basic plugins. It's like we've hard locked everything down so much that you can't even upgrade your server without including the original TShockAPI.dll something was built with.
Don't know why but recompile the plugin with the file from tshock_release.zip just does not works. It still require exact file version, where can I change that in Visual Studio 2017?
At least two other people have reported this "issue" in the last 24 hours.
Can anyone confirm this is still an issue? @tanpro260196
No, it's fixed now. @ProfessorXZ
For example, Ancientgod's Chestroom plugin return this error:
[Server API] Error Startup aborted due to an exception in the Server API initialization: System.InvalidOperationException: Plugin "Chestroom" has thrown an exception during initialization. ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at ChestroomPlugin.ChestroomPlugin.ReadConfig() at ChestroomPlugin.ChestroomPlugin.Initialize() at TerrariaApi.Server.ServerApi.LoadPlugins() --- End of inner exception stack trace --- at TerrariaApi.Server.ServerApi.LoadPlugins() at TerrariaApi.Server.ServerApi.Initialize(String[] commandLineArgs, Main game) at TerrariaApi.Server.HookManager.InitialiseAPI()
The same goes for Region Trigger (Could not load Newtonsoft.Json), Seconomy (Could not load tshockapi.dll) and Enerdy's Discord Bridge and some other plugins.