https://bugs.winehq.org/show_bug.cgi?id=48696
Bug ID: 48696 Summary: MechWarrior 5: Mercenaries - Multiplayer doesn't connect Product: Wine Version: 5.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: smcnam@gmail.com Distribution: ---
Created attachment 66569 --> https://bugs.winehq.org/attachment.cgi?id=66569 winedebug log
Reporting for this game: https://appdb.winehq.org/objectManager.php?sClass=version&iId=38689
This is a game that is launched through the Epic Games Launcher. In the past, multiplayer worked, but MW5 released a game update that broke it. I have tried with multiple Internet connections to rule out local issues, and flushed my iptables configuration. There is definitely something about the network connectivity for multiplayer that Wine doesn't support.
Attached log with WINEDEBUG=warn+all,+timestamp
Based on some packet captures, it appears they are hosting a Coturn STUN server (version 4.5.1.1) on Amazon EC2 to do the session joining without anyone needing to forward ports. Not sure if they only use this for VoIP, or for the game also.
Wireshark packet capture available upon request. Most of it is encrypted, but it does appear that the TURN/STUN negotiation fails, possibly due to Wine not emulating the networking code correctly.
Steps to reproduce:
1. Install Epic Games Launcher in a wineprefix following the workarounds from the Epic Games Launcher appdb entry
2. Install MechWarrior 5 following the workarounds from the MechWarrior 5 appdb entry -- recommend installing both DXVK and media foundation as dependencies
3. Launch MechWarrior 5 (required: modern GPU and drivers that can drive DXVK reliably; AMD Vega/Navi + recent open source Mesa or Nvidia Pascal/Turing + Nvidia binaries seem to work well)
4. Using two players, or two separate instances of MW5 and one person, have the people add each other as "Friends" in the game interface.
5. Have one person click on Co-Op, then Instant Action, then Confirm (just accept the default scenario). The person who clicks on Co-Op is the HOST.
6. On the screen where the player's mech is displayed and there are three empty bays for other mechs to be added, the HOST will go to their Friends list (top left corner) and invite the other person to join the game.
7. The person who got invited must accept the invite from their friends list.
8. Expected behavior: the invitee loads into the match. Actual behavior: "Connecting to server" message is displayed for about 30 seconds, then the invitee is given a black screen or brief loading screen, then kicked back to the main menu.
It is recommended for the HOST to be running native Windows with a configuration known to work with MW5 co-op multiplayer. Native Windows users also fail to join a game that is hosted by a Wine user, but in order to successfully reproduce this bug with only one of the two players having an issue, one of the two should be running on a working client on native Windows. Of course, eventually if the bug is fixed, a Wine user can be both the host and the invitee.
https://bugs.winehq.org/show_bug.cgi?id=48696
Sean McNamara smcnam@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu
https://bugs.winehq.org/show_bug.cgi?id=48696
bugzilla@biechl.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@biechl.net
--- Comment #1 from bugzilla@biechl.net --- Created attachment 66907 --> https://bugs.winehq.org/attachment.cgi?id=66907 debug output of network
I think it is a tad easier to track down, as when you start the game and then click "Co-Op", you get the same result - a screen saying "Connecting" and nothing happens.
The initial preparations for multiplayer seem to be done when starting up the game. When you later click on "Co-Op", I cannot see much in the logs that catch my eye. On startup though, there are a couple or network related issues.
I've attached a log with WINEDEBUG=-all,+seh,+winhttp,+winsock,+wininet There seems to also be some Vulkan info, sorry for that.
What I /think/ could be the issue:
[0415/141700.323:WARNING:cert_verify_proc_win.cc(111)] Unknown error -2146762482 mapped to net::ERR_FAILED
The game uses the Chromium Embedded Framework (CEF3), which can be located in: MW5Mercs/Binaries/ThirdParty/CEF3/Win64/
There are these files: chrome_elf.dll d3dcompiler_43.dll d3dcompiler_47.dll icudtl.dat libcef.dll libEGL.dll libGLESv2.dll natives_blob.bin <dir>Resources |_ cef_100_percent.pak |_ cef_200_percent.pak |_ cef_extensions.pak |_ cef.pak |_ devtools_resources.pak |_ <dir>locales snapshot_blob.bin
The file in question, cert_verify_proc_win.cc, belongs to this framework. To me it looks like a certificate chain validation error. I have no clue how to fix that, though.
Another note: This is what is in the logs when you actually click Co-Op in the game:
00f9:trace:winsock:WSASocketW af=23 type=2 protocol=17 protocol_info=(nil) group=0 flags=0x1 00f9:trace:winsock:WSASocketW created 0e58 00f9:trace:winsock:WS_setsockopt (socket 0e58, level IPPROTO_IPV6, name IPV6_V6ONLY, optval 0x3ebbed78 (0), optlen 4) 00f9:trace:winsock:WSACreateEvent 00f9:trace:winsock:WSACreateEvent 00f9:trace:winsock:WS_inet_ntop family 23, addr (0x3ebbec88), buffer (0x3ebbeb40), len 46 00f9:trace:winsock:WS_connect socket 0e58, ptr 0x3ebbec80 { family AF_INET6, address 2001:4860:4860::8888, port 53 }, length 28 00f9:warn:winsock:wsaErrno errno 101, (Network unreachable). 00f9:trace:winsock:WS_closesocket (socket 0e58) -> 0 00f9:trace:winsock:WSACloseEvent event=0xe5c 00f9:trace:winsock:WSACloseEvent event=0xe60 0142:trace:winsock:DllMain 0x7f98e0330000 0x2 (nil) 0142:trace:winsock:WS_getaddrinfo "wpad", (null) 0x4e68f848 -> 0x4e68f840 -3
I don't have IPv6 enabled, so there is this error about network unreachable. I've tried to enable it, but still unable to connect. Don't have a log where IPv6 is enabled, but I can create one if that helps.
https://bugs.winehq.org/show_bug.cgi?id=48696
--- Comment #2 from Sean McNamara smcnam@gmail.com --- (In reply to bugzilla from comment #1)
Created attachment 66907 [details] debug output of network
I think it is a tad easier to track down, as when you start the game and then click "Co-Op", you get the same result - a screen saying "Connecting" and nothing happens.
The initial preparations for multiplayer seem to be done when starting up the game. When you later click on "Co-Op", I cannot see much in the logs that catch my eye. On startup though, there are a couple or network related issues.
I've attached a log with WINEDEBUG=-all,+seh,+winhttp,+winsock,+wininet There seems to also be some Vulkan info, sorry for that.
What I /think/ could be the issue:
[0415/141700.323:WARNING:cert_verify_proc_win.cc(111)] Unknown error -2146762482 mapped to net::ERR_FAILED
The game uses the Chromium Embedded Framework (CEF3), which can be located in: MW5Mercs/Binaries/ThirdParty/CEF3/Win64/
There are these files: chrome_elf.dll d3dcompiler_43.dll d3dcompiler_47.dll icudtl.dat libcef.dll libEGL.dll libGLESv2.dll natives_blob.bin
<dir>Resources |_ cef_100_percent.pak |_ cef_200_percent.pak |_ cef_extensions.pak |_ cef.pak |_ devtools_resources.pak |_ <dir>locales snapshot_blob.bin
The file in question, cert_verify_proc_win.cc, belongs to this framework. To me it looks like a certificate chain validation error. I have no clue how to fix that, though.
Another note: This is what is in the logs when you actually click Co-Op in the game:
00f9:trace:winsock:WSASocketW af=23 type=2 protocol=17 protocol_info=(nil) group=0 flags=0x1 00f9:trace:winsock:WSASocketW created 0e58 00f9:trace:winsock:WS_setsockopt (socket 0e58, level IPPROTO_IPV6, name IPV6_V6ONLY, optval 0x3ebbed78 (0), optlen 4) 00f9:trace:winsock:WSACreateEvent 00f9:trace:winsock:WSACreateEvent 00f9:trace:winsock:WS_inet_ntop family 23, addr (0x3ebbec88), buffer (0x3ebbeb40), len 46 00f9:trace:winsock:WS_connect socket 0e58, ptr 0x3ebbec80 { family AF_INET6, address 2001:4860:4860::8888, port 53 }, length 28 00f9:warn:winsock:wsaErrno errno 101, (Network unreachable). 00f9:trace:winsock:WS_closesocket (socket 0e58) -> 0 00f9:trace:winsock:WSACloseEvent event=0xe5c 00f9:trace:winsock:WSACloseEvent event=0xe60 0142:trace:winsock:DllMain 0x7f98e0330000 0x2 (nil) 0142:trace:winsock:WS_getaddrinfo "wpad", (null) 0x4e68f848 -> 0x4e68f840 -3
I don't have IPv6 enabled, so there is this error about network unreachable. I've tried to enable it, but still unable to connect. Don't have a log where IPv6 is enabled, but I can create one if that helps.
Thanks for helping to debug this. My local ISP doesn't support IPv6, but I enabled a Wireguard VPN that fully passes the IPv6 test and I tried several websites successfully. Unfortunately I still am unable to join a game. That IPv6 error might be a red herring.
https://bugs.winehq.org/show_bug.cgi?id=48696
--- Comment #3 from bugzilla@biechl.net --- Unfortunately it's not an IPv6 issue. I tested again with IPv6 enabled and it does not make a difference. I have also looked into the network packages and could not find much (because most of it is encrypted), besides one of the remote hosts closing the connection due to an error (the exact error code is encrypted unfortunately).
Since it looked like it might be a certificate chain validation error to me, I've tried to run it with a modified version of wine that always returns true (0) when validating a certificate chain, but that didn't help either. (dlls/crypt32/chain.c - CertVerifyCertificateChainPolicy)
I'm pretty much stuck.
Ah one thing to mention about my log: I did have enabled various overrides when doing the log, hoping some of them would fix the issue. Without these, there were different errors, but the result, no multiplayer, has been the same. These are my overrides:
d3dx11_42 d3dx11_43 d3dx9 d3dx10 win7 winhttp msasn1 crypt32 iertutil wininet
https://bugs.winehq.org/show_bug.cgi?id=48696
Tyler Kennedy tk@tkte.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tk@tkte.ch
--- Comment #4 from Tyler Kennedy tk@tkte.ch --- So, I ran into what I believe is the same issue as well. On newer versions of Wine (& proton), I get "Offline Mode" in the top left, and trying to connect just times out.
So I popped open the trusty wireshark, and noticed right away that for whatever reason, it's doing DNS lookups to localhost:53. Okay, weird right? These are obviously going to fail because I have no local DNS server running.
242 6.715778737 127.0.0.1 127.0.0.1 DNS 88 Standard query 0x8ed0 A mw5xplay.azurewebsites.net 243 6.715789417 127.0.0.1 127.0.0.1 ICMP 116 Destination unreachable (Port unreachable) 244 6.715794527 127.0.0.1 127.0.0.1 DNS 88 Standard query 0x11d1 AAAA mw5xplay.azurewebsites.net 245 6.715796500 127.0.0.1 127.0.0.1 ICMP 116 Destination unreachable (Port unreachable) 246 6.715805758 127.0.0.1 127.0.0.1 DNS 88 Standard query 0x8ed0 A mw5xplay.azurewebsites.net
... along with similar entries for api.epicgames.dev and such. To confirm this is the only issue, I tossed up a DNS proxy:
pip install dnslib sudo python -m dnslib.proxy
│ Starting Proxy Resolver (*:53 -> 8.8.8.8:53) [UDP] │ Request: [127.0.0.1:48769] (udp) / '9eu8txazwd.execute-api.us-west-2.amazonaws.com.' (A) │ Reply: [127.0.0.1:48769] (udp) / '9eu8txazwd.execute-api.us-west-2.amazonaws.com.' (A) / RRs: A,A,A,A │ Request: [127.0.0.1:48769] (udp) / '9eu8txazwd.execute-api.us-west-2.amazonaws.com.' (AAAA) │ Reply: [127.0.0.1:48769] (udp) / '9eu8txazwd.execute-api.us-west-2.amazonaws.com.' (AAAA) / RRs: │ Request: [127.0.0.1:42195] (udp) / 'api.epicgames.dev.' (A) │ Reply: [127.0.0.1:42195] (udp) / 'api.epicgames.dev.' (A) / RRs: CNAME,A,A,A,A,A,A,A,A │ Request: [127.0.0.1:42195] (udp) / 'api.epicgames.dev.' (AAAA) │ Reply: [127.0.0.1:42195] (udp) / 'api.epicgames.dev.' (AAAA) / RRs: CNAME │ Request: [127.0.0.1:34831] (udp) / 'wpad.' (A) │ Reply: [127.0.0.1:34831] (udp) / 'wpad.' (A) / NXDOMAIN │ Request: [127.0.0.1:39127] (udp) / 'static.mw5mercs.com.' (A) │ Reply: [127.0.0.1:39127] (udp) / 'static.mw5mercs.com.' (A) / RRs: CNAME,CNAME,A,A │ Request: [127.0.0.1:47181] (udp) / 'api.epicgames.dev.' (A) │ Reply: [127.0.0.1:47181] (udp) / 'api.epicgames.dev.' (A) / RRs: CNAME,A,A,A,A,A,A,A,A │ Request: [127.0.0.1:42541] (udp) / 'mw5xplay.azurewebsites.net.' (A) │ Reply: [127.0.0.1:42541] (udp) / 'mw5xplay.azurewebsites.net.' (A) / RRs: CNAME,A │ Request: [127.0.0.1:42541] (udp) / 'mw5xplay.azurewebsites.net.' (AAAA) │ Reply: [127.0.0.1:42541] (udp) / 'mw5xplay.azurewebsites.net.' (AAAA) / RRs: CNAME │ Request: [127.0.0.1:54960] (udp) / 'wpad.' (A) │ Reply: [127.0.0.1:54960] (udp) / 'wpad.' (A) / NXDOMAIN
Restarting Mechwarrior, right away we see a number of related DNS queries going through our local server. Annnd it works! I have functional multiplayer in Mechwarrior 5.