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

Newer versions won't connect to AP in Mint #160

Open
falkreon opened this issue Dec 15, 2024 · 1 comment
Open

Newer versions won't connect to AP in Mint #160

falkreon opened this issue Dec 15, 2024 · 1 comment

Comments

@falkreon
Copy link

falkreon commented Dec 15, 2024

Steps to reproduce

(I'm sure this can be reproduced in other environments, but this should ALWAYS reproduce it)

  • Use Linux Mint 22 Cinnamon (kernel 6.8.0-48-generic, cinnamon 6.2.9)
  • Use the com.valvesoftware.Steam package from Flathub (https://flathub.org/apps/com.valvesoftware.Steam)
  • Install Timespinner (The Steam game with ID 368620)
  • Install TSRandomizer v1.32.3 as directed, by moving the entire contents of Linux.v1.32.3.zip into the game folder, and changing the file permissions of TSRandomizer.bin.x86_64 to +x.
  • Add TSRandomizer as a non-steam game and launch it.

Expected Result

TSRandomizer launches Timespinner, connects to archipelago.gg successfully when correct connection information is entered, and plays a randomized multiworld game.

Observed Result

TSRandomizer succeeds in launching Timespinner, but fails immediately to connect to archipelago.gg, reporting "Connection timed out" even though no time has passed.

Running TSRandomizer directly (not from within steam) succeeds in (re)launching Timespinner, but displays the same connection timeout, producing the following stdout:

sh: 1: /home/falkreon/.steam/root/steam.sh: not found
Game wasn't started by Steam-client. Restarting.
Controller 0: Logitech F310 Gamepad (XInput), GUID: 6d041dc2, Mapping: 030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,
Using EXT_swap_control_tear VSync!
FNA3D Driver: OpenGL
OpenGL Renderer: AMD Radeon™ RX 7600 XT (radeonsi, navi33, LLVM 17.0.6, DRM 3.58, 6.8.0-48-generic)
OpenGL Driver: 4.6 (Compatibility Profile) Mesa 24.0.9-0ubuntu0.3
OpenGL Vendor: AMD
MojoShader Profile: glsl120
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API FAIL] SteamAPI_Init() failed
SteamAPI.Init() failed!
Using EXT_swap_control_tear VSync!

Flatpak concerns

I've now tried on Flatpak on a Mint+KDE machine and non-Flatpak on a Mint+Cinnamon machine. Both exhibit the quick-disconnect bug.

I've verified with flatseal on the flatpak version that the steam package ships with incredibly permissive settings such as share=network, share=ipc, and device=all.

Originally I thought that an incompatibility with Flatpak was the root cause of the issue, but that appears to have been a red herring.

Diagnostic progress and workaround

Backdating to v1.27.3 (without the OpenSSL downpatch) fixes the problem!

I went way back here on a hunch because everything from OpenSSL to .NET Framework to MultiClient were updated in a fairly short span of time. When I have time I'll try and bisect this to get a better bead on where the problem is exactly in the version track.

@falkreon falkreon changed the title TSRandomizer can't find Flatpak Steam / can't network from within flatpak Newer versions won't connect to AP in Mint Jan 7, 2025
@sgrunt
Copy link

sgrunt commented Feb 1, 2025

As a Linux user myself - and an avid Archipelago player - I was a bit confused when I first saw this report because I've never personally experienced any connection issues with the randomizer myself, although I also run Steam directly rather than relying on the flatpak for it.

That said, I was curious enough about this to spin up a VM to see if I could find some more information about what was going on - while I was initially unsuccessful, I found that uninstalling Mono was sufficient to reproduce the connectivity issues.

I'd therefore guess that you'd first see the issue in the v1.30.1 release (which does note in the release notes that you might need to have Mono installed for things to work).

While I'd thus think the simplest solution to this problem would be to somehow have Mono installed within the Steam flatpak image, I'm also not familiar enough with flatpak to know how easy or difficult that might be, although I'd lean more towards "not likely to happen", so I spent some time debugging what the actual underlying issue is.

In the absence of Mono, there are two parts to the problem:

  • Neither the game itself or the randomizer ships with the shared library libmono-btls-shared.so, which is necessary for Mono to be able to make TLS connections. (You might have this present on your host system already; for testing purposes I used the one provided in the Ubuntu package mono-runtime-common_6.8.0.105+dfsg-3.2_arm64 since the base game ships with assemblies from Mono 6.8.)
  • Even with the above library in place, it needs certificates to trust in one of two specific locations in the filesystem, the more likely of which is in a tree in ~/.config/.mono. While it's easiest to copy the contents of an existing /etc/mono/certstore/* (like the one on your host system) in for that to function, on a system without Mono available at all I found it was sufficient to run the following to build enough of a trust store for the connection to succeed:
mkdir -p ~/.config/mono/new-certs/Trust
cp -L /etc/ssl/certs/*.0 ~/.config/mono/new-certs/Trust

The ideal solution here would be to just have Mono available within the flatpak, but I think the above is enough of a workaround for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants