Jump to content

Failed to call hook 'OnServerInitialized' on plugin 'UpdaterNpcSpawn v1.0.0'

Pending 3.1.1

Endr1ck
Endr1ck

Posted

Failed to call hook 'OnServerInitialized' on plugin 'UpdaterNpcSpawn v1.0.0' (IOException: Cannot create a file when that file already exists.)
  at System.IO.FileSystem.MoveDirectory (System.String sourceFullPath, System.String destFullPath) [0x00040] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.IO.Directory.Move (System.String sourceDirName, System.String destDirName) [0x000ed] in <f98723dd4586469db5213ec59da723ca>:0 
  at Oxide.Plugins.UpdaterNpcSpawn.ReadAndRenameConfigOldNpcSpawn () [0x0091d] in <fdbbd1f9c3544b53aefec999bd6e2558>:0 
  at Oxide.Plugins.UpdaterNpcSpawn.OnServerInitialized () [0x0000a] in <fdbbd1f9c3544b53aefec999bd6e2558>:0 
  at Oxide.Plugins.UpdaterNpcSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00072] in <fdbbd1f9c3544b53aefec999bd6e2558>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0 

CsaszyKJ

Posted

Just delete the updater file from the server.

Copy all the other files from NPC Spawn into the server, then just copy the new version into the plugins folder.

Worked..
The same error message come up for me as well, when i've tried to run the updater alone.

 

aimacak

Posted

7 hours ago, CsaszyKJ said:

Just delete the updater file from the server.

Copy all the other files from NPC Spawn into the server, then just copy the new version into the plugins folder.

Worked..
The same error message come up for me as well, when i've tried to run the updater alone.

 

@Endr1ck

Thank you for your help, but the ticket author also created a ticket in BetterNpc, with an error already related to UpdaterBetterNpc, so it's not so clear, but the author does not respond in that ticket, because he has two tickets in two plugins, in this case the BetterNpc ticket is more important, because the update should start with him.

CyberKnet

Posted

This is because configs/NpcSpawn_old.json still exists from the last time you updated NpcSpawn. If you are done with that file then you can delete it, rerunning the upgrade will complete.

@CsaszyKJ That will work provided the config file layout didn't change - but if it did change it will leave you with a broken NpcSpawn configuration. It's likely to be fine most times, but I wouldn't recommend unless you know the config layout didn't change. In any case, it's better to resolve the root problem since it is easy to do as mentioned above.

@KpucTaJl I understand why the old config file is not auto-deleted and agree with that decision. With that said, could it be a good idea to detect this and notify the user that the upgrade was aborted due to the old config file still existing from a previous upgrade?

  • Like 1
2.2m

Downloads

Total number of downloads.

10.3k

Customers

Total customers served.

149.5k

Files Sold

Total number of files sold.

3.2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.