InitCrypto fails

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

InitCrypto fails

Postby AndyMartin458 » 02 Jul 2019, 16:05

We've been using HTTPS with smartfox for about a year now. We recently updated to Unity 2018.4.2 . At first my computer was failing to connect. I went to the server and reimported the SSL cert. After that, my computer was able to connect. My colleague's computer is still failing to connect however.

On the client, the error we're getting is "object reference is not set to an instance of an object" which is the contents of "errorMessage"

Here is the error on the server.

16:00:58,074 WARN [SocketReader] binary.BinaryIoHandler - java.lang.IllegalStateException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.IllegalStateException
Message: Session does not support encryption
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.protocol.binary.DefaultPacketEncrypter.execute(DefaultPacketEncrypter.java:42)
com.smartfoxserver.v2.protocol.binary.DefaultPacketEncrypter.decrypt(DefaultPacketEncrypter.java:22)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler.handlePacketData(BinaryIoHandler.java:410)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler.handleRead(BinaryIoHandler.java:197)
com.smartfoxserver.v2.protocol.SFSIoHandler.onDataRead(SFSIoHandler.java:143)
com.smartfoxserver.bitswarm.core.SocketReader.readTcpData(SocketReader.java:336)
com.smartfoxserver.bitswarm.core.SocketReader.readIncomingSocketData(SocketReader.java:220)
com.smartfoxserver.bitswarm.core.SocketReader.run(SocketReader.java:171)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: InitCrypto fails

Postby Lapo » 03 Jul 2019, 07:01

Hi,
I don't think this issue has anything to do with SmartFoxServer or the client side API.
It seems like the problem is your colleague's machine settings, somehow. Is he running a firewall? If so that might be the cause of the problem. I'd suggest to turn it off temporarily before testing again.

It has happened in the past that people were not able to connect until they removed their firewall entirely :shock: I hope this is not the case.

Other than that I cannot think of another possible cause. What I would suggest is to try your game client on a third machine and see what happens, and if you want we can try it too if you send us a download link. You can use a PM, if you prefer.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

Re: InitCrypto fails

Postby AndyMartin458 » 03 Jul 2019, 14:49

Hi Lapo. I sent a build to you. Let me know if it says "Securely Connected".
User avatar
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

Re: InitCrypto fails

Postby AndyMartin458 » 08 Jul 2019, 18:45

The issue had to do with ProxyEnable being set to 1 in the registry settings. This is apparently an issue with Mono: https://github.com/mono/mono/issues/10030

A quick fix is to set ProxyEnable to 0.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 28 guests