In support of this comment on Proton's CoH2 issues thread: Company of Heroes 2 (231430) #3875
Based on original solution by @Cytomax55 in the same thread.
Edit Feb 2023: this may also work for CoH3 (the paths are different of course). I haven't tested this for CoH 3 yet and hope either Proton / Relic will make this fix unnecessary. See also @sfxworks's comment.
- You may want to disable cloud-sync for CoH2 on steam as it can cause issues. Thanks @Commando-Brando
- Open your terminal, and run*:
curl https://gist.githubusercontent.com/TechT10n/79b853003f2e9841a18e8b6decd0fd3e/raw/coh2_multiplayer_fix.sh | bash
If this doesn't work (because for example your Steam path is different from the default), you may have to copy the script from that link and alter the part where the path is specified, and then run it locally (see also this comment).
If that still doesn't work for some reason, you can follow the manual steps below:
*Note that this runs a remote shell script directly; it is always a good idea to check the script's contents before running it (just open the URL to the gist in a browser) to make sure it doesn't do anything weird. I don't have any malicious intent and I have no reason to think TechT10n has either, but it is good practice regardless.
Note: some users have reported that reinstalling and clearing the Steam cache is unnecessary; you can try to skip step 1 to 4 and start at step 5, but your mileage may vary.
Additionally, this fix does not always seem to work; I have no clue as to why it does work for some and doesn't for others, or why it seems to stop working sometimes even with the same system/config. It should be deterministic 🤷♂️.
-
You may want to disable cloud-sync for CoH2 on steam as it can cause issues. Thanks @Commando-Brando
-
Uninstall/delete CoH2:
- (1a) Uninstall CoH 2 on steam.
- (1b) Delete remaining files here:
rm -rf "~/.steam/steam/steamapps/common/Company of Heroes 2"
- (1c) Delete compatibility data for CoH2:
rm -rf ~/.steam/steam/steamapps/compatdata/231430/
-
Clear download cache in Steam -> settings -> "downloads" tab (requires Steam login afterwards;
⚠️ make sure you know your Steam credentials beforehand!⚠️ . -
Reinstall CoH2 on Steam.
-
Launch CoH 2 -> at this stage game would still give 'Sync Error' in multiplayer games either immediately after loading the map or when first enemy is encountered with proton 5.0-10, 5.13-6, 6.3-6, experimental, 6.14-GE-2.
-
Download vc_redist.x64.exe at ✅
https://www.microsoft.com/en-us/download/details.aspx?id=48145
from the microsoft website. Note that another link, namely ❌https://aka.ms/vs/16/release/vc_redist.x64.exe
did NOT WORK, as it was missing the required DLL at the time this report was submitted. -
make separate directory to extract
vc_redist.x64.exe
to. E.g.mkdir /tmp/vcredist && cp /PATH/TO/DOWNLOAD/vc_redist.x64.exe /tmp/vcredist/vc_redist.x64.exe
. -
cd to the download directory and extract
vc_redist.x64.exe
usingcabextract
to the directory you chose as such:cabextract vc_redist.x64.exe -d /tmp/vcredist
. If this did not result inucrtbase.dll
being extracted, use cabextract again to extracta10
specifically. -
Copy or move ONLY
ucrtbase.dll
to~/.steam/steam/steamapps/compatdata/231430/pfx/drive_c/windows/system32/
(cp /tmp/vcredist/ucrtbase.dll ~/.steam/steam/steamapps/compatdata/231430/pfx/drive_c/windows/system32/
) . May require sudo privileges. -
Launch Company of Heroes 2 in Steam using Proton 5.0-10. I have only played 1 match, but given that the sync-error would occur immediately or on the first enemy sighting before, I suspect this resolved the sync-error issue. Not yet tested on 6.3-2.
Another note: tested on Steam native client, Manjaro w/ kernel 5.10.59
I've run into problems at all three routes in attempting to solve this with the instructions. I'm surprised how many people are saying it worked for them.
My attempt at the first solution provided gave me these lines in the terminal:
"
bash: line 31: cabextract: command not found
bash: line 32: cabextract: command not found
cp: cannot stat 'tmp/ucrtbase.dll': No such file or directory
cp: cannot stat 'tmp/ucrtbase.dll': No such file or directory
Success: ucrtbase.dll was copied to /home/deck/.steam/steam/steamapps/compatdata/231430/pfx/drive_c/windows/system32\n
"
This sounded to me like my Steam path was different so I tried the next solution which says, "copy the script from that link and alter the part where the path is specified, and then run it locally."
However I got stuck on this step:
"if you download that script and run it from a terminal window it should save you the trouble of going through all of these steps manually, and it will even make sure file permissions are set properly.
Just open the script in any text editor and change this line:
STEAM_ROOT=~/.steam/steam
to
STEAM_ROOT=/run/media/mmcblk0p1"
What happens is when I change the line in a text editor and then I copy, paste, and run it in terminal, it just seems to crash the terminal program, called Konsole. It quits Konsole immediately after it starts loading. This lead me to the other part of that instruction which mentions the bash script failing. This sounded to me like what was happening so I tried the instruction:
"If the bash script fails, it may be that you are missing one of the following programs. Run this to install them, and then re-run the script.
for arch (SteamDeck / SteamOS)
sudo pacman -Syu && sudo pacman -S cabextract wget
for RedHat based distros
sudo dnf update
sudo dnf install wget cabextract
for debian based distros
sudo apt-get update && sudo apt-get upgrade
sudo apt install wget cabextract
"
However, this just gave me an error message in the terminal:
"
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
sudo: dnf: command not found
sudo: dnf: command not found
sudo: apt-get: command not found
sudo: apt: command not found
(1)(deck@steamdeck ~)$
"
So I thought maybe I need to download this thing called cabextract because I'm not seeing it installed anywhere on my Steam Deck. I downloaded it and its installation instructions involved putting more codes into the terminal, which just gave me more error messages. Since I got stuck there, I decided to attempt the last "Fallback instructions to perform the workaround manually" section but I'm stuck on Step 6. I'm not really sure what is meant by "make a separate directory to E.g." What's E.g. mean? I'm so lost now that I'm not even sure I know what is meant by making a separate directory let alone what it means to "E.g." it. I can see these steps also require cabextract, which I cannot seem to find any instructions online how to install that. When I attempt to follow the Install document that comes with its download, it's more codes to put into terminal which I don't understand and seem to be doing wrong. Am I just not seeing the simple Install button for this cabextract program?
Anyway, I don't think any of these solutions on this page are in layman's terms. Normally I could just look up what I don't know but this mess of problems I've been running into while trying to follow the instructions are getting more unclear to me as I attempt them.