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

SteamUser callbacks not triggering #1018

Closed
Jaeder42 opened this issue Sep 12, 2021 · 7 comments
Closed

SteamUser callbacks not triggering #1018

Jaeder42 opened this issue Sep 12, 2021 · 7 comments

Comments

@Jaeder42
Copy link

When I run the example code, the SteamUser.LoggedOnCallback do not trigger.
Neither 1 or 5.

@yaakov-h
Copy link
Member

Can you run Sample 3 (DebugLog) and share the output?

@Jaeder42
Copy link
Author

Jaeder42 commented Sep 13, 2021

Connecting to Steam...
MyListener - ServerList: Resolving server list
MyListener - ServerList: Server list provider had no entries, will query SteamDirectory
MyListener - ServerList: Resolved 200 servers
MyListener - ServerList: Next server candidiate: 155.133.252.39:27017 (Tcp)
MyListener - db4e917b19694753be72af1d39feb913/TcpConnection: Connecting to 155.133.252.39:27017...
MyListener - db4e917b19694753be72af1d39feb913/TcpConnection: Connected to 155.133.252.39:27017
MyListener - db4e917b19694753be72af1d39feb913/EnvelopeEncryptedConnection: Got encryption request. Universe: Public Protocol ver: 1
MyListener - db4e917b19694753be72af1d39feb913/EnvelopeEncryptedConnection: Encryption result: OK
Connected to Steam! Logging in 'jaeder42'...
MyListener - db4e917b19694753be72af1d39feb913/NetFilterEncryptionWithHMAC: Unable to decrypt incoming packet: NetFilterEncryption was unable to decrypt packet: HMAC from server did not match computed HMAC.
MyListener - db4e917b19694753be72af1d39feb913/TcpConnection: Unexpected exception propogated back to NetLoop: System.IO.IOException: Unable to decrypt incoming packet
 ---> System.Security.Cryptography.CryptographicException: NetFilterEncryption was unable to decrypt packet: HMAC from server did not match computed HMAC.
   at SteamKit2.CryptoHelper.SymmetricDecryptHMACIV(Byte[] input, Byte[] key, Byte[] hmacSecret) in SteamKit2.dll:token 0x6000452+0xd6
   at SteamKit2.NetFilterEncryptionWithHMAC.ProcessIncoming(Byte[] data) in SteamKit2.dll:token 0x600018c+0x0
   --- End of inner exception stack trace ---
   at SteamKit2.NetFilterEncryptionWithHMAC.ProcessIncoming(Byte[] data) in SteamKit2.dll:token 0x600018c+0x46
   at SteamKit2.EnvelopeEncryptedConnection.OnNetMsgReceived(Object sender, NetMsgEventArgs e) in SteamKit2.dll:token 0x6000176+0x9
   at SteamKit2.TcpConnection.NetLoop() in SteamKit2.dll:token 0x60001a4+0xa3
MyListener - db4e917b19694753be72af1d39feb913/TcpConnection: Socket exception occurred while reading packet: System.IO.IOException: Connection lost while reading packet header.
 ---> System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.BinaryReader.InternalRead(Int32 numBytes) in System.Private.CoreLib.dll:token 0x6005d5d+0x3b
   at System.IO.BinaryReader.ReadUInt32() in System.Private.CoreLib.dll:token 0x6005d4e+0x0
   at SteamKit2.TcpConnection.ReadPacket() in SteamKit2.dll:token 0x60001a5+0x4
   --- End of inner exception stack trace ---
   at SteamKit2.TcpConnection.ReadPacket() in SteamKit2.dll:token 0x60001a5+0x2a
   at SteamKit2.TcpConnection.NetLoop() in SteamKit2.dll:token 0x60001a4+0x5c
Disconnected from Steam

@xPaw
Copy link
Member

xPaw commented Sep 13, 2021

Fixed by #1006

@yaakov-h
Copy link
Member

Which commit are you building from, and what .NET runtime are you using?

It could be #1006 as @xPaw mentioned, or some kind of network shenanigans.

@Jaeder42
Copy link
Author

Latest commit, but I am running .NET 6.0 (preview), might be the issue

@yaakov-h
Copy link
Member

I can't reproduce this on Preview 7.

Can you please share the output of dotnet --info?

@yaakov-h
Copy link
Member

If this is indeed #1006 (which is quite likely) then it should now be fixed in v2.4.0-Beta.1.

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

No branches or pull requests

3 participants