rlabrecque / Steamworks.NET

Steamworks wrapper for Unity / C#
http://steamworks.github.io
MIT License
2.83k stars 368 forks source link

Latest version has issues on Steam Deck #647

Open JamesMcGhee opened 2 months ago

JamesMcGhee commented 2 months ago

We have had a couple of users note issues with the latest version of Steamworks.NET and Steam Deck. Initialization fails with k_ESteamAPIInitResult_FailGeneric and message [Steamworks.NET] Failed to initialize CSteamAPIContext

When they rollback to the prior version they do not have any issue

AlexStrook commented 2 months ago

Confirming this, The only way to get steamworks to initialize on Steamdeck is to downgrade to version 2.1.0

JamesMcGhee commented 2 months ago

Latest user I spoke with is using the archive from June 17 2024 The version tags aren't helpful in every case as 20.0.0 is very old and 20.1 caused some issue for the same user

So the method used was to simply check the commit history https://github.com/rlabrecque/Steamworks.NET/commits/master/

then view the code and grab the archive DL link to test them, so if you have an issue using the version tags there is another option for rolling back to an older version

rlabrecque commented 2 months ago

I've got a SteamDeck now so I'll try this out this weekend

kasimir-spellgarden commented 2 months ago

We've been having the same issue and as far as I could research this seems to be an issue Valve created and one of the Steamworks SDK versions is just broken on Steam Deck. I will try and find that post from Valve in the steam forums. For now we've reverted back and everything works again.

rlabrecque commented 2 months ago

Thanks @kasimir-spellgarden !

I believe I found it: https://steamcommunity.com/groups/steamworks/discussions/27/4298194722196382031/

Yeah; it seems like Steamworks SDK's newer than ~1.58 or so do not work on the SteamDeck unless you're on the bleeding edge Proton 😕

kasimir-spellgarden commented 2 months ago

It's unfortunate that they did not test their newest SDK against older Proton versions, especially when we're not allowed to see or change the Proton version for our games. I've uncovered this by changing the error logs produced by InitEx. I made a pull request for the small change :) It took us two days to finally pinpoint the issue as it is not happening on the PC version of our game and we don't test the SteamDeck all the time :D

MigrantP commented 1 month ago

People here are mentioning Proton - is this an issue with native Linux builds?

MihNenad commented 1 month ago

@MigrantP I just tried. It is indeed also an issue with Linux builds. They don't work either with error: _EntryPointNotFoundException: Steaminternal_SteamAPIinit

JamesMcGhee commented 1 month ago

For others reading along you SHOULD NOT use the tags on this repo to pull v20 or whatever ... tags were not used consistently enough for that to be a good idea. If you do you will be using a version that is more than a year old. This means you will have issues with the Initialization function, Authentication endpoints, etc.

Solution

DO NOT USE STEAMWORKS.NET 20.0 OR SIMILAR THAT IS FAR TO OLD

You DO want to use Update to Steamworks SDK 1.59 which you can access via GitHub History https://github.com/rlabrecque/Steamworks.NET/tree/078ed3c7c9b767a42be555b75ea5fb014c067132/com.rlabrecque.steamworks.net

Just click the link below

To save you time and reading ... just click this link https://github.com/rlabrecque/Steamworks.NET/archive/078ed3c7c9b767a42be555b75ea5fb014c067132.zip It will download a zip containing Riley's repo during his 1.59 update before this issue was introduced but after the security patch for initialization and authentication changes

But it says v20.2.0

Ignore the string as it appears in Unity Package Manager ... that is just reading a string in the package.json which wasn't updated very frequently and so basically means nothing 😁 at least for that state of the code. The real info about what code your using is GitHub History. As you can see from the links, the link I gave is the check in Riley did for Steamworks SDK 1.59