Facepunch.Steamworks icon indicating copy to clipboard operation
Facepunch.Steamworks copied to clipboard

SocketManager NetIdentity SteamId is always 0

Open Lyrapuff opened this issue 3 years ago • 11 comments

Hello, I've created a class derived from SocketManager, then created a normal socket via

SteamNetworkingSockets.CreateNormalSocket<Server>(address);

then I did that

public override void OnConnected(Connection connection, ConnectionInfo info)
{
        Console.WriteLine(info.Identity.SteamId.Value);
}

and the output was just 0. Why? How can I get user's steamId? i've also tried doing the same thing in OnConnecting, OnMessage methods, the result was same.

Lyrapuff avatar Jul 03 '20 09:07 Lyrapuff

Did you get this fixed? I'm having the same issue.

m4chado1 avatar Oct 27 '20 14:10 m4chado1

Is there any update on this? @garrynewman For now, wrapping connections with token-based authorization seems like the only option to authorize clients, which is really stupid even for a bandaid.

ghost avatar Nov 10 '20 08:11 ghost

There's an issue in ConnectionInfo line:

public NetIdentity Identity => (NetIdentity) this.address;

I think this is a typo and should be:

public NetIdentity Identity => this.identity;

@garrynewman ^

the data is there I have checked with the debugger.

yuraj11 avatar Jan 07 '21 17:01 yuraj11

Have just found this as well. It's not the only issue with Facepunch SteamNetworkingSockets interface. I give up.

fghl avatar Jun 04 '21 22:06 fghl

Same Problem...

etaxi341 avatar Jul 06 '21 17:07 etaxi341

Got it working. I downloaded the newest build from https://github.com/Facepunch/Facepunch.Steamworks/actions used the net46 folder and combined it with the official dlls from valve.

etaxi341 avatar Jul 07 '21 06:07 etaxi341

Built from master branch and used the debug net standard 2.1 build that was output, latest facepunch steamworks transport for unity's Netcode For GameObjects, and the steamworks sdk 1.57 dlls and this issue is still happening

boxfriend avatar Dec 20 '23 21:12 boxfriend

Built from master branch and used the debug net standard 2.1 build that was output, latest facepunch steamworks transport for unity's Netcode For GameObjects, and the steamworks sdk 1.57 dlls and this issue is still happening

Facepunch Wiki says to use net46, I don't know how relevant that information still is though.

Fel-lek avatar Jan 09 '24 06:01 Fel-lek

THE FIX:

  1. Download the Zip file below
  2. Go to com.community.netcode.transport.facepunch\Runtime\Facepunch (where the package is installed in your Unity project)
  3. replace both files with the downloaded ones.
  4. YOURE GOOD TO GO!

what I did: I downloaded the facepunch.steamworks source code, fixed it and compiled it. you're welcome. Credits to Matze.

Fix SteamID = 0.zip

davidverified avatar Mar 05 '24 19:03 davidverified

THE FIX:

  1. Download the Zip file below
  2. Go to com.community.netcode.transport.facepunch\Runtime\Facepunch (where the package is installed in your Unity project)
  3. replace both files with the downloaded ones.
  4. YOURE GOOD TO GO!

what I did: I downloaded the facepunch.steamworks source code, fixed it and compiled it. you're welcome. Credits to Matze.

Fix SteamID = 0.zip

If you know how to fix it then submit a PR. Nobody should be stupid enough to download a random zip from an account that was created solely to post this zip file

boxfriend avatar Mar 05 '24 19:03 boxfriend

THE FIX:

  1. Download the Zip file below
  2. Go to com.community.netcode.transport.facepunch\Runtime\Facepunch (where the package is installed in your Unity project)
  3. replace both files with the downloaded ones.
  4. YOURE GOOD TO GO!

what I did: I downloaded the facepunch.steamworks source code, fixed it and compiled it. you're welcome. Credits to Matze. Fix SteamID = 0.zip

If you know how to fix it then submit a PR. Nobody should be stupid enough to download a random zip from an account that was created solely to post this zip file

Just scan it on virustotal. Don't see you offering any kind of help here :)

davidverified avatar Mar 05 '24 19:03 davidverified