I recently had issues where all of my mods were wiped out and I was no longer able to start any of the servers. It appears to be related to mishandling of the output of steamcmd in arkmanager. I'm posting here first, since I'm not sure if there's something specific to the image or not.
It began on 2024-04-08 and it seems to coincide with a recent steamcmd update (and docker image update):

The version of steamcmd in my container is 1743712175
$ steamcmd
Redirecting stderr to '/home/steam/.steam/logs/stderr.txt'
Logging directory: '/home/steam/.steam/logs'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[ 0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logo
Steam Console Client (c) Valve Corporation - version 1743712175
-- type 'quit' to exit --
Loading Steam API...IPC function call IClientUtils::GetSteamRealm took too long: 49 msec
OK
I believe it's caused by a slight change in output of steamcmd ... +workshop_download_item
The first indication that something was wrong were these logs:
2025-04-09 07:00:59.212 Performing ARK update ... -/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/ Update to 13834083 complete
2025-04-09 07:00:59.270 Running command 'start' for instance 'main'
2025-04-09 07:00:59.303 Checking for updates before starting
2025-04-09 07:00:59.311 Checking for update; PID: 190
2025-04-09 07:01:00.511 Downloading mod 1404697612Executing /arkserver/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd +@NoPromptForPassword 1 +login anonymous +workshop_download_item 346110 1404697612 +quit
2025-04-09 07:01:00.514 /usr/local/bin/arkmanager: line 728: /arkserver/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd: No such file or directory
2025-04-09 07:01:00.515 2025-04-09 07:01:00.519
tail: cannot open '/home/steam/.steam/logs/workshop_log.txt'$'\n''/home/steam/.steam/steam/logs/workshop_log.txt' for reading: No such file or directory
2025-04-09 07:01:00.521 Mod 1404697612 download failed
2025-04-09 07:01:00.521 Mod 1404697612 was not successfully downloaded
2025-04-09 07:01:01.067 Downloading mod 1609138312Executing /arkserver/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd +@NoPromptForPassword 1 +login anonymous +workshop_download_item 346110 1609138312 +quit
2025-04-09 07:01:01.071 /usr/local/bin/arkmanager: line 728: /arkserver/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd: No such file or directory
2025-04-09 07:01:01.076 tail: cannot open '/home/steam/.steam/logs/workshop_log.txt'$'\n''/home/steam/.steam/steam/logs/workshop_log.txt' for reading: No such file or directory
These logs come from here:
https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2696
And then later after some troubleshooting (sorry, I forgot exactly what I did):
Logging directory: '/home/steam/.steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logo
Steam Console Client (c) Valve Corporation - version 1743712175
-- type 'quit' to exit --
Loading Steam API...IPC function call IClientUtils::GetSteamRealm took too long: 49 msec
OK
@NoPromptForPassword 1
"@NoPromptForPassword" = "1"
Connecting anonymously to Steam Public...OK 2025-04-13 11:01:50.539
Waiting for client config...OK 2025-04-13 11:01:50.541
Waiting for user info...OK 2025-04-13 11:01:50.566
workshop_download_item 346110 2307661303 2025-04-13 11:01:56.877
Downloading item 2307661303 ... 2025-04-13 11:01:56.910
Success. Downloaded item 2307661303 to "/home/steam/.steam/SteamApps/workshop/content/346110/2307661303" (24589452 bytes) quit
Mod 2307661303 was not successfully downloaded
These logs come from here: https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2689
I eventually worked around the issue by changing this line: https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2689
to this (to try to remove any ansi escape sequences):
modsrcdir="$(echo "$output" | sed -n 's@Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p' | sed -r "s/\x1B\[(([0-9]{1,2})?(;)?([0-9]{1,2})?)?[m,K,H,f,J]//g")"
And reinstalling the mods with arkmanager installmod ..., before restarting. To
It appears that steamcmd now includes ANSIs escape sequence
You can reproduce this by doing this in a container (I'm basically replicating what arkmanager does):
$ source $(which arkmanager)
$ output=$(runSteamCMDspinnerSubst 2 +workshop_download_item "346110" "1404697612")
$ modsrcdir="$(echo "$output" | sed -n 's@^Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p')"
$ echo "$modsrcdir"
$ modsrcdir="$(echo "$output" | sed -n 's@Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p')"
$ echo "$modsrcdir"
/home/steam/.steam/SteamApps/workshop/content/346110/1404697612
steam@ark-ark-cluster-island-7787888f5f-l84q4:~$ cat $modsrcdir/mod.info
cat: ''$'\033''[0m/home/steam/.steam/SteamApps/workshop/content/346110/1404697612/mod.info': No such file or directory
$ cat /home/steam/.steam/SteamApps/workshop/content/346110/1404697612/mod.info
AwesomeSpyglassAwesomeSpyglass>$
$ sudo apt update
$ sudo apt install -y less
$ echo "$modsrcdir" | less
$ echo "$output" | less
ESC[0m/home/steam/.steam/SteamApps/workshop/content/346110/1404697612
Redirecting stderr to '/home/steam/.steam/logs/stderr.txt'
Logging directory: '/home/steam/.steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logo
Steam Console Client (c) Valve Corporation - version 1743712175
-- type 'quit' to exit --
Loading Steam API...ESC[0mIPC function call IClientUtils::GetSteamRealm took too long: 51 msec
OK
ESC[0mESC[1m@NoPromptForPassword 1
ESC[0m"@NoPromptForPassword" = "1"
ESC[0m
Connecting anonymously to Steam Public...ESC[0mOK
ESC[0mWaiting for client config...ESC[0mOK
ESC[0mWaiting for user info...ESC[0mOK
ESC[0mESC[1mworkshop_download_item 346110 1404697612
ESC[0mDownloading item 1404697612 ...ESC[0m
ESC[0mSuccess. Downloaded item 1404697612 to "/home/steam/.steam/SteamApps/workshop/content/346110/1404697612" (3418407 bytes) ESC[0mESC[1mquit
ESC[0m
I recently had issues where all of my mods were wiped out and I was no longer able to start any of the servers. It appears to be related to mishandling of the output of
steamcmdinarkmanager. I'm posting here first, since I'm not sure if there's something specific to the image or not.It began on 2024-04-08 and it seems to coincide with a recent
steamcmdupdate (and docker image update):The version of
steamcmdin my container is1743712175I believe it's caused by a slight change in output of
steamcmd ... +workshop_download_itemThe first indication that something was wrong were these logs:
These logs come from here:
https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2696
And then later after some troubleshooting (sorry, I forgot exactly what I did):
These logs come from here: https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2689
I eventually worked around the issue by changing this line: https://github.com/arkmanager/ark-server-tools/blob/a05d763b8e2f49a7ea82759728bf682d24fa254d/tools/arkmanager#L2689
to this (to try to remove any ansi escape sequences):
And reinstalling the mods with
arkmanager installmod ..., before restarting. ToIt appears that
steamcmdnow includes ANSIs escape sequenceYou can reproduce this by doing this in a container (I'm basically replicating what
arkmanagerdoes):