Button disappears after restart

Button disappears after restart

The button is not visible to the players after my nightly server restart. Only when I reload BackpackButtons does the button reappear. This phenomenon has been occurring for a few days.

Does this have something to do with an update from Rust?

Best regards

Do you see any errors when the server is booting? My guess is that there was an error in BackpackButton, either when compiling or when loading.

Thank you for your quick reply, I really appreciate it.

I don't see any error message in the console, nor in the logs. In the logs it looks like BackpackButton loaded without errors after the restart.

Hi, have you had time to look into the problem by any chance?

I'm not sure what could cause this, especially without errors. I haven't heard anyone else report it.

The plugin shows the UI using the OnPlayerSleepEnded hook, which is when the player stands up after spawning. The only thing I could think of is that the plugin did not subscribe to that hook, which can only happen if there is an error in the OnServerInitialized hook, which would be in the logs. Note that during boot, that hook is called at a different time than when the plugin loads, it's when the server opens up to player connections, which is a few minutes later than when the plugin loads, so you might have missed it in the logs. If you can send me the full logs over DM, I can check if anything looks out of the ordinary.

Thank you, i will send you the oxide logs.

Thanks, I think I see the problem.

There is no error, but I see the plugin AutoSkinTeam unloaded itself at the time the OnServerInitialized hook is called on all plugins in sequence, because it did not find a clan plugin. Historically, there has been an Oxide bug where if a plugin unsubscribes from a hook while handling that hook, the next plugin that the hook was to be called on gets skipped. That must be what is happening here. When AutoSkinTeam unloads itself while processing OnServerInitialized, it effectively unsubscribes from that hook, bumping the next plugin into its place on the list, causing the next plugin to be skipped. In this case, BackpackButton is skipped and does not initialize.

Unfortunately, this issue never throws any errors so it's difficult to diagnose. Fortunately, I've seen it a few times before with other plugins I maintain so it was easy for me to spot.

Someone contributed a patch to Oxide earlier this year to resolve this bug, but given that this has happened again, it appears the bug was in fact not resolved.

Ideally this needs to be solved by the framework, but in the meantime, you can suggest to the AutoSkinTeam plugin maintainer that they trigger their self-unload on the next frame instead of in the same frame as the OnServerInitialized hook. This is the standard mitigation which other plugin developers have done before. I know it's not ideal for plugin devs to have to work around this, but until they do, that AutoSkinTeam plugin can cause this problem for basically any plugin (whichever plugin is right after it alphabetically).

Thank you so much for your help mate.

I removed AutoSkinTeam for now, because i dont really use it. So i will see, if the problem is solved, when its removed.

TY for your time!

I also have noticed the backpack button disappearing. I do not use AutoSkinTeam but in the mean time, I will have this plugin simply reload after restart has been completed.

Merged post

Additionally when I teleported using NTeleportation plugin, upon arrival at teleport destination, my Backpack Button disappeared.

MrLiquid

I also have noticed the backpack button disappearing. I do not use AutoSkinTeam but in the mean time, I will have this plugin simply reload after restart has been completed.

Additionally when I teleported using NTeleportation plugin, upon arrival at teleport destination, my Backpack Button disappeared.

Are you also seeing this issue on server restart? Can you send me your server logs?

Which commands are you using to teleport using NTeleportation? As long as the plugin makes you sleep when you teleport, the backpack button should reappear once you wake up.

Nivex gave me an update to NTeleportation which may fix the interference .. I'll let you know if this doesnt work.

I use TPMarker to click on the map and move around.