Can't execute BeamMP-Launcher on Ubuntu

I have successfully followed this guide to completion without any errors, however, whenever I try to run BeamMP-Launcher, nothing happens except the ‘Launcher.log’ file is instantly updated with the following logs:

[INFO] Mod caching directory: ./Resources
[DEBUG] Launcher was invoked as: ‘~/BeamMP-Launcher/bin/BeamMP-Launcher’
[INFO] BeamMP Launcher v2.3.2
[INFO] Launcher version is up to date
[INFO] IMPORTANT: You MUST keep this window open to play BeamMP!
[ERROR] Failure in LegitimacyCheck: basic_string::_M_replace_aux
[ERROR] Exception in main(): basic_string::_M_replace_aux
[INFO] Closing in 5 seconds
[INFO] If this keeps happening, contact us on either: Forum: (can’t post links), Discord: (can’t post links)

I haven’t found anyone with a similar issue, so any help would be appreciated.

For this issue you’ll either need to wait for our roaming forum Linux enjoyer, Linda, to notice your post or file a support ticket in the Discord.

Providing live support for an issue like this is much easier for our support agents, if you have the ability to open a Support ticket on the official Discord they will be able to help you in a more timely matter :slight_smile:

okay, so, beamMP has a “feature” that checks whether you own a steam copy and it does so by checksum’ing your integrity.json file in your game’s base folder in (path could be different on Ubuntu!) ~/.local/share/Steam/steamapps/common/BeamNG.drive, which could be easily ctrl+v’d into a pirated copy but i digress, which contains an array of text data to all the game’s file paths and hash algorithms to let external programs know that something is missing (such as beamMP or file integrity checks, not the game itself - so that you could play with half the cars or levels corrupted lol). clearly, something is off with this LegitimacyCheck function in the code, implying that beamMP itself is probably compiled incorrectly, but there is some reason to believe that actually your beamNG is simply missing files or they’re corrupted (not matching hashes). check beamNG’s file integrity first in the game’s steam properties and then try again. if the same basic_string::_M_replace_aux string appears, then you have to recompile it. if it happens again, then uhh, well, it’s up to beamMP guys now, wow, 0 days without something not working in beamMP… it works fine on arch tho :sweat_smile:

oh, and also, unrelated (?) but still, you don’t have to launch it from ~/BeamMP-Launcher/bin/, you can put this BeamMP-Launcher binary anywhere, for example, in your ~/Desktop (it will create a mess tho but it’s convenient). but surely this isnt what causes you problems, right? it does have to create files and folders in the same directory as the binary, though, which could be conflicting if they have different rights to user groups, but that’s a different problem. so yeah, you only need its binary

:heart:

The launcher is mostly likely properly compiled, but as you said a steam installation of beamng is missing or in a weird spot. This means the launcher also can’t find beamng version, which is why it crashes.

Thanks for the replies everyone!


@OctopusCarDoor
Thanks for the info, I submitted a ticket on Discord but didn’t get a response before I had to go. I’ll try the live support there when I have some free time. If they find a solution I’ll post it here so people can see it in the future.


@Linda420
I’ll be detailed, just in case I’m doing something wrong!

As instructed, I verified the integrity of all the 35275 files (according to Steam), but unfortunately I was still getting the same basic_string::_M_replace_aux error as you anticipated.

Then, to recompile BeamMP launcher again, I went to ~/BeamMP-Launcher and ran this command again:

cmake --build bin --parallel --config Release

Still got same issue upon launching, so I decided to do a fresh BeamMP rebuild by deleting ~/BeamMP-Launcher and then cloning the repository before following the steps in the guide again.

Interestingly, this time, after running

cmake --build bin --parallel --config Release

I noticed two warnings that I didn’t pay full attention to the first time I compiled it:

~/BeamMP-Launcher/src/main.cpp: In function ‘int main(int, const char**)’:
~/BeamMP-Launcher/src/main.cpp:31:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   31 |     system("clear");
      |     ~~~~~~^~~~~~~~~
~/BeamMP-Launcher/src/Startup.cpp: In function ‘void ReLaunch()’:
~/BeamMP-Launcher/src/Startup.cpp:131:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  131 |     system("clear");
      |     ~~~~~~^~~~~~~~~

I’m not familiar with the codebase of this project, but perhaps this could have something to do with my issue?


@WiserTixx
I see… Just in case, my game is using the default location provided by Steam, which is ~/snap/steam/common/.local/share/Steam/steamapps/common/BeamNG.drive

Could you symlink ~/.steam/ to ~/snap/steam/ and see what happens?

Did it, nothing has changed.

sheesh… so uhm, this is probably not related to the beamMP error you’re having (unless it is then it would be funny i think lol) but, do you know why snap and any package installed via snap are considered… NOT GOOD in all of linux community? it always sucked! please, install things via flatpak if you wish for a healthy state of your system (and your mind!). getting rid of snapd, installing flatpak instead, then a flatpak version of steam and beamng off of it is a nice start - that’s proper paths, proper libraries and proper functionality :wink:

one suspicion i do have actually revolves around ubuntu paths, since ubuntu loves to do things differently. i think that beamMP cant actually find your game: if it cant find integrity.json, then it cant find your game folder! for some reason (pointy fingers! not at you though) beamMP instead of “game not found! launcher closing!” it gives you this scary error. i think that’s what’s going on

Yeah, I’ve seen people trash a lot on snaps, I even googled exactly what you did at some point lol.

I’m actually new to Linux, so the first thing I did when I installed Ubuntu was to get my programs from the App Center (only snaps) as an Ubuntu introduction video playlist I was watching at the time suggested.

In practice, I haven’t had any of these bad experiences with snaps so far. Matter of fact, in comparison to Windows, they are performing exceptionally well! However, I plan to experiment and probably slowly migrate everything I have to flatpak, especially if I get noticeable differences in performance.

I have this feeling in the back of my head that maybe, yes, BeamMP might not work as intended with the Steam snap, but I hope that’s not the case as reinstalling my game library would just be… :weary:

I’ll try to see if I can get BeamMP to find the integrity.json file. If that fails, I’ll start my flatpak migration with Steam, I guess…

The launcher tries find the game path first and then looks for the integrity.json to get game version. This error is the first step failing but it’s seemingly unhandled which is why the error is so cryptic.

I removed Steam (Snap) and installed Steam (Flatpak).
After running it for the first time, I installed BeamNG there and let it run once. However, even after recompiling the BeamMP launcher again, I’m still getting the exact same error.
This time around, the game is located at
~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/BeamNG.drive
Has anyone ever run BeamMP on Ubuntu?


@Linda420
I understand these concerns, and I’m not dismissing them. I’m just saying that snaps are usable and have a user-friendly platform (App Center).

While it might have had a rough start, it’s now simply a slightly less optimal choice rather than a dealbreaker. To people outside the tech bubble, the difference between these package managers is negligible, assuming they even notice any. They just want something that works, and the proof is that most people still use Windows despite everything Microsoft has done and is doing.

As for me, I actually appreciate some features such as the convenience of automatic updates—it’s similar to how smartphones handle updates, and it makes life easier. Sure, I could do everything manually to squeeze out a bit more performance, but I see that as a diminishing returns scenario.

Feel free to respond, but this will be my last argument because I think we’re not allowed to get too off topic (package manager comparison).

Good news!

I decided to dive into the code a bit and managed to get BeamMP working on my PC for both the Flatpak and Snap Steam versions (they were failing for different reasons)!

To summarize:

Flatpak

The problem was that the algorithm was looking for the libraryfolders.vdf file in the wrong location.
Mine wasn’t in
homeDir + "/.steam/root/steamapps/"
but rather in
homeDir + "/.var/app/com.valvesoftware.Steam/.steam/root/steamapps/"
To fix this, I created a vector that stores these two locations and iterate through them until I find the right match.

Snap

Due to the isolated nature of Snap packages, the algorithm wasn’t finding the location of the game directory even with libraryfolders.vdf located.
So after the main search, if nothing is found, I check if the user is using the Snap version, assigning homeDir + "/snap/steam/common/.local/share/Steam/steamapps/common/BeamNG.drive/" to the game location variable if so.


I left a pull request on GitHub with these changes.

1 Like