project-fika / Fika-Server

Server-side changes to make multiplayer work
Other
93 stars 28 forks source link

If Aki.Server.exe stops running and is restarted, all in-raid progress is lost for anyone that isn't the host #29

Closed Daemris closed 2 weeks ago

Daemris commented 3 weeks ago

I host a progress server and often host the Fika server. Sometimes, for some reason, the progress server (Aki.Server.exe) will close.

When the progress server closes, the Fika server will continue to run with no indication that the progress server closed. (Maybe an in-game warning?) Upon raid end Fika server clients will have lost all in-raid progress and their games will fail to load back to the menu. The only solution is to Alt+F4.

Hosts of the Fika server will not lose any progress so long as they wait for all clients to 'time out' after extraction. Hosts of single-player fika servers will also not lose any progress so long as the server is restarted before extraction.

I believe this is because Fika references some 'players' variable which is not actually populated with information in the event the server is restarted. Perhaps this information could be stored in a non-volatile way in the event the progress server dies?

Lacyway commented 2 weeks ago

I have been playing SPT since September quite extensively and my server has never crashed. Can I ask what is causing your random shutdowns? Any logs indicating anything? While I am open to finding a solution, I am also concerned with the root of your problem.

Daemris commented 2 weeks ago

I've played SPT for a few years and have also generally never had a server crash before this run.

server-2024-06-13.log server-2024-06-14.log server-2024-06-15.log

2024.06.14_21-51-55_0.14.1.2.29197 errors.log 2024.06.14_21-51-55_0.14.1.2.29197 application.log

edit: as i look back these files have different dates. the bottom two are the most recent logs from the BepInEx folder.

I don't feel like any of these errors should be responsible for this.

Mods in use:

(\BepInEx\Plugins)

(\user\mods)

nexus4880 commented 2 weeks ago

We would need server logs located in /user/logs.

Daemris commented 2 weeks ago

I have edited the message with the most recent logs in /user/logs/. Nothing in those logs seems like it would be indicative of a failure either. I'm actually having a hard time telling which logs are from times the server has crashed because there is literally no difference lol

fariparedes commented 2 weeks ago

You can reproduce this error by cycling your connection and booting the players, and then having them head to extract in their own clients when the Aki server reconnects to them. There will be an error message referencing a "players" variable in the server log. I believe it's related.

Daemris commented 2 weeks ago

@fariparedes yeah that's the players variable I was talking about. didn't have other players to produce the trace, thank you.

Daemris commented 2 weeks ago

image

Here is a picture of the trace. You can also cause this error by leaving a raid in the esc menu before all clients are disconnected.

fariparedes commented 2 weeks ago

Yep, that looks like the one I got!

Lacyway commented 2 weeks ago

This should be fixed with https://github.com/project-fika/Fika-Server/pull/32, if this issue arises again after 3.9 please let us know.