Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Factorio server updates when already up to date #4687

Closed
Amlinde opened this issue Oct 22, 2024 · 2 comments
Closed

[Bug]: Factorio server updates when already up to date #4687

Amlinde opened this issue Oct 22, 2024 · 2 comments

Comments

@Amlinde
Copy link
Contributor

Amlinde commented Oct 22, 2024

User story

Due to interpreting the version incorrectly, the update command always thinks factorio is out of date. This has been causing the server to restart whenever it is run, which, in the case of the container version I'm using, is every hour by default.

Game

Factorio

Linux distro

Ubuntu 22.04

Command

command: update

Further information

Pre 2.0, the --version command output was formatted like this:

Version: 1.1.110 (build 62357, linux64, headless)
Binary version: 64
Map input version: 0.18.0-0
Map output version: 1.1.110-0

With the 2.0 update it is now formatted like this:

Version: 2.0.8 (build 79416, linux64, headless)
Version: 64
Map input version: 1.0.0-0
Map output version: 2.0.8-1

This causes LinuxGSM to interpret the version as

2.0.8
64

instead of 2.0.8

Relevant log output

No response

Steps to reproduce

No response

@skwasjer
Copy link

skwasjer commented Oct 24, 2024

I think this also causes malformed JSON when sending (in my case) Discord hook, due to the LF control character:


[ .... ] Updating fctrserver: Sending Discord alertparse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 28, column 4
[ FAIL ] Updating fctrserver: Sending Discord alert: {"message": "The request body contains invalid JSON.", "code": 50109}

From /log/scripts:

Oct 24 14:56:57.359 fctrserver: START: PASS: Started [redacted]
Oct 24 14:56:57.380 fctrserver: UPDATE: INFO: Sending alert: fctrserver has received a game server update: 2.0.9
64
Oct 24 14:56:58.065 fctrserver: UPDATE: PASS: Using cached IP as public IP address
Oct 24 14:56:59.816 fctrserver: UPDATE: FATAL: Sending Discord alert: {"message": "The request body contains invalid JSON.", "code": 50109}
Oct 24 14:56:59.828 fctrserver: UPDATE: INFO: LinuxGSM version: v24.3.1
Oct 24 14:56:59.830 fctrserver: UPDATE: FATAL: core_exit.sh exiting with code: 1

@skwasjer
Copy link

I can confirm that with the latest hotfix from #4688 the Discord alert also works again.

@Amlinde Amlinde closed this as completed Oct 29, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New Issues to ✅ Done in LinuxGSM Backlog Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants
@skwasjer @Amlinde and others