InitCrypto fails

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

Moderators: Lapo, Bax

--F--
Posts: 1
Joined: 24 Apr 2021, 14:03

InitCrypto fails

Postby --F-- » 24 Apr 2021, 14:09

InitCrypto fails on Unity 2019.4.24 with error:

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.


Code: Select all

ConfigData cfg = new ConfigData();
cfg.Host = "demo.smartfox.com";
cfg.Port = 9933;
cfg.HttpPort = 8080;
cfg.HttpsPort = 8443;
cfg.Zone = Zone;


It doesn't log to smartfox server so I think It is a unity client api error which I don't have access.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: InitCrypto fails

Postby Bax » 26 Apr 2021, 08:09

(moved to the appropriate forum section)

What version of the C# API are you using?
Paolo Bax
The SmartFoxServer Team
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: InitCrypto fails

Postby Lapo » 26 Apr 2021, 08:14

Hi,
can you show us the full stack trace of the client side error?

Have you double checked that the SSL certificate you have deployed works correctly? (i.e. checking by pointing your browser)
Also, can you please check that you don't have server side errors, when this happens?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Sudarshan
Posts: 3
Joined: 20 Dec 2022, 05:48

Re: InitCrypto fails

Postby Sudarshan » 20 Dec 2022, 05:55

Message: ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

Code: Select all

                       Stacktrace: System.Buffer.BlockCopy (System.Array src, System.Int32 srcOffset, System.Array dst, System.Int32 dstOffset, System.Int32 count) (at <2e531ccb5a634d41a5f338e40371c5fd>:0)
Sfs2X.Util.ByteArray.WriteBytes (System.Byte[] data, System.Int32 ofs, System.Int32 count) (at <facfabb65458430294cb5e9a75ea8519>:0)
Sfs2X.Util.CryptoInitializer.OnHttpResponse (System.String rawData) (at <facfabb65458430294cb5e9a75ea8519>:0)
Sfs2X.Util.CryptoInitializer+<Run>d__5.MoveNext () (at <facfabb65458430294cb5e9a75ea8519>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e0b801613d424beca89c0145453da4be>:0)


we are also getting this nonfatal exception on calling this method

Code: Select all

StartCoroutine(smartFox.InitCrypto());
.
what might be the reason? the issue is intermittent and we are getting this nonfatal at a very high frequency from the production app.

The unity we are using is 2019.2.14f1.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: InitCrypto fails

Postby Lapo » 20 Dec 2022, 08:51

Hi Sudarshan,
it would be best if you could start a new post and provide more details about this issue.
In particular:
- SFS2X version in use
- Unity API version in use
- a description of how the problem is triggered and the steps to reproduce it.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Sudarshan
Posts: 3
Joined: 20 Dec 2022, 05:48

Re: InitCrypto fails

Postby Sudarshan » 20 Dec 2022, 11:08

Created a ew post here
viewtopic.php?f=20&t=29559

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 31 guests