NullReferenceException at IsAuthedFixed
Since the newest Rust update I'm getting this error quite often in the server console:

Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00000] in <ac94896c59084a7dbf564a402a6cc9a1>:0 
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <ac94896c59084a7dbf564a402a6cc9a1>:0 
  at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <ac94896c59084a7dbf564a402a6cc9a1>:0 
  at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <ac94896c59084a7dbf564a402a6cc9a1>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3e46d2a997e94a3cb08cf065508cd483>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <1fe782f4b27a43ae85d29ebb2d56c007>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <1fe782f4b27a43ae85d29ebb2d56c007>:0​
Have also been getting this. 
Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00000] in <d14f10b0201a4c4e87a51d00724c9ee3>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <d14f10b0201a4c4e87a51d00724c9ee3>:0
at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <d14f10b0201a4c4e87a51d00724c9ee3>:0
at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <d14f10b0201a4c4e87a51d00724c9ee3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0​
my Rcon goes nuts.
Noone have this permission yet, i just installed plugin.
Gives me:
Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.AutoTurretAuth+c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00000] in <25b74f60605c4fcaae836b516fa228f4>:0 
  at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <25b74f60605c4fcaae836b516fa228f4>:0 
  at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <25b74f60605c4fcaae836b516fa228f4>:0 
  at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <25b74f60605c4fcaae836b516fa228f4>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in :0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0
That error is from the Auto Turret Authorization plugin. This plugin (Better Turret Aim) doesn't affect turret authorization lists, nor does it affect targetting. It only utilizes the current target to update aim vectors more quickly so I'm a bit skeptical this is an issue with this plugin. My guess is that you installed both plugins around the same time and blamed the wrong plugin.

If you had the AutoTurretAuth plugin installed for some time without issue, and these errors only started happening once you installed Better Turret Aim, and if these errors then went away once you unloaded Better Turret Aim, then there may be a compatibility issue between the two that we can look into.

Edit: An admin has now moved this thread to the Auto Turret Authorization forum.

As for debugging the actual error, it looks like the authorizedPlayers list on the tool cupboard contains a null entry. That plugin should probably be updated to filter out null entries, but whatever is adding the null entries should probably be fixed as well. Did you recently install or update any plugins that alter cupboard authorization?
yeah, but it happened the second i installed this plugin.
But you are right its not from your plugin (facepalm).
:Thank you XD

this has been going on for sevral days. I have not had any player say anything but this is what is showing up in console.

Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00006] in <85b591c91dbb439ea851312e4afc6fa2>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <85b591c91dbb439ea851312e4afc6fa2>:0
0b/s in, 0b/s out
at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <85b591c91dbb439ea851312e4afc6fa2>:0
at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <85b591c91dbb439ea851312e4afc6fa2>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0
Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00006] in <85b591c91dbb439ea851312e4afc6fa2>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <85b591c91dbb439ea851312e4afc6fa2>:0
0b/s in, 0b/s out

still

 

Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00006] in <3e4eea20163f4095b01d510ca3f62d94>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <3e4eea20163f4095b01d510ca3f62d94>:0
44b/s in, 748b/s out
at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <3e4eea20163f4095b01d510ca3f62d94>:0
at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <3e4eea20163f4095b01d510ca3f62d94>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0
Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00006] in <3e4eea20163f4095b01d510ca3f62d94>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <3e4eea20163f4095b01d510ca3f62d94>:0
33b/s in, 561b/s out
at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <3e4eea20163f4095b01d510ca3f62d94>:0
at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <3e4eea20163f4095b01d510ca3f62d94>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0

Running lasted update of oxide and rust. getting this error inconsole.

Failed to call hook 'OnTurretTarget' on plugin 'AutoTurretAuth v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)at Oxide.Plugins.AutoTurretAuth+<IsAuthed>c__AnonStorey3.<>m__0 (ProtoBuf.PlayerNameID playerNameId) [0x00006] in <dffef1cd0c8248819d9d8094182e00d6>:0at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <351e49e2a5bf4fd6beabb458ce2255f3>:0at Oxide.Plugins.AutoTurretAuth.IsAuthed (BasePlayer player, BaseEntity turret) [0x00031] in <dffef1cd0c8248819d9d8094182e00d6>:0at Oxide.Plugins.AutoTurretAuth.OnTurretTarget (AutoTurret turret, BaseCombatEntity entity) [0x00015] in <dffef1cd0c8248819d9d8094182e00d6>:0at Oxide.Plugins.AutoTurretAuth.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0008d] in <dffef1cd0c8248819d9d8094182e00d6>:0at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0

Added one null check, please let me know if it resolves the issue. May take it step further as White suggested previously, just noticed it too late.

Locked automatically