Random zone login error

Post here your questions about the Objective-C API for SFS2X

Moderators: Bax, Lapo, A51Integrated

Random zone login error

Postby ashutosh » 16 Dec 2011, 23:37

I have been working on SFS2X for quite some time and my project works fine however I have an issue which is pretty random. I can't login to Zone sometime. It's pretty random, doesn't happen all the times.

This is what I get on my console when I am not able to login to Zone and after this I get onLoginError interup.
Code: Select all
 2011-12-16 15:22:52.147 MyApp[10277:f803] [SFS - INFO]Handling Message: Login: { Message id: 1 }
{Dump: }

   (short) ec: 6
   (utf_string_array) ep: [(

This is what normal Login response looks like:
Code: Select all
2011-12-16 15:22:37.610 MyApp[10254:f803] [SFS - INFO]Handling Message: Login: { Message id: 1 }
{Dump: }

   (short) rs: 1
   (sfs_array) rl:
   (utf_string) zn: MyApp
   (utf_string) un: userName
   (int) id: 38
   (short) pi: 0

And when the error happens, server side I get this error:

Code: Select all
com.smartfoxserver.v2.exceptions.SFSExtensionException: Extension Request refused. Sender is not a User: { Id: 65, Type: DEFAULT, Logged: No, IP: }

Zone Login request:
Code: Select all
[smartFox send:[LoginRequest requestWithUserName:userName password:@"" zoneName:@"MyApp" params:nil]];

I only send zone login request after I get successful onConnection event. Any ideas why this might be happening?

P.S: We have got SFS2X with RC3 and custom login (without DB as for now).
Posts: 21
Joined: 01 Nov 2011, 22:26

Postby Lapo » 20 Dec 2011, 21:26

It is due to a to too long pause between the socket connection of the client and his request to login. This in turn is caused by your server config. I am quite sure that you are running too few threads for the ExtensionController.

All the details here:
http://docs2x.smartfoxserver.com/Advanc ... extensions
...addicted to flash games
User avatar
Site Admin
Posts: 15780
Joined: 21 Mar 2005, 09:50
Location: Italy

Thanks Lapo

Postby ashutosh » 26 Dec 2011, 23:03

I am trying my changes, will update you if something weird happens in couple of days.

Thanks a lot.
Posts: 21
Joined: 01 Nov 2011, 22:26

Return to SFS2X iPhone / iPad / OSX API

Who is online

Users browsing this forum: No registered users and 1 guest