FabioZumbi12 / SEDiscordBridge

A Torch plugin to connect the SE server to Discord
MIT License
13 stars 11 forks source link

Loading plugin from zip file #3

Closed Conjuro closed 6 years ago

Conjuro commented 6 years ago

Torch supports loading plugins directly from their zip files, however it expects the files to be in top level/root folder. Having the files in a sub folder 'SEDiscordBridge' causes an 'Error initializing server' error.

FabioZumbi12 commented 6 years ago

Good to know, ill do this on next release

Conjuro commented 6 years ago

Including the log from loading the plugin. I was going by memory, and after rereading the errors, it seems like Torch finds the plugin in the sub folder inside the zip file, so I'm not sure if it's some path mismatch that the plugin can't handle or if it's Torch itself.

I tried re-zipping the plugin without the sub folder, and it still failed, so it's not actually the folder structure causing it. Should have done some more testing before creating the issue.

00:16:08.7597 [INFO]   PluginManager: Loading plugin 'SEDiscordBridge' (v1.0)
00:16:08.8268 [ERROR]  Initializer: Error initializing server.
00:16:08.8268 [FATAL]  Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
00:16:08.8398 [FATAL]  Initializer: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()<---

System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()<---

00:16:08.8398 [FATAL]  Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.SEDicordBridgePlugin.Init(ITorchBase torch) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 48
   at Torch.Managers.PluginManager.LoadPlugins()
   at Torch.TorchBase.Init()
   at Torch.Server.TorchServer.Init()
   at System.Threading.Tasks.Task.Execute()
Conjuro commented 6 years ago

And it doesn't help that I'm testing with the old release that failed when it didn't have an existing config file.

In fact it works just fine loading the plugin from the zip file.

Closing this issue and hanging my head in shame.