"BlueBox Error: Invalid BB session !" comes out of the blue

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

kylyn.magee
Posts: 3
Joined: 21 Aug 2013, 16:35

"BlueBox Error: Invalid BB session !" comes out of the blue

Postby kylyn.magee » 21 Aug 2013, 18:26

This is the error I get...
"1104548 [New I/O client worker #2-4] ERROR sfs2x.client.bitswarm.BitSwarmClient - ## BlueBox Error: Invalid BB session !"

...and if I try to send any message, I get this response...
"BB sending error: can't send data, BlueBox connection is not active"

I do not get a CONNECTION_LOST event when this occurs. It occurs long after the client has successfully connected, logged in, and joined a room, and long before the SmartFox session timeout.

I have been unable to find any mention of why I might be getting this error, save one that suggested it would occur if the client waits too long after connecting before logging in (obviously not the case here unless I need to connect and log in to each SmartFox and BlueBox - I didn't set this up to begin with and I'm not terribly familiar with SFS).

I think that I can handle this error by disconnecting completely and reconnecting (which is the same way I am handling session timeout if the user wishes to continue session), but I don't know how to catch it.

Any thoughts would be much appreciated. -- Kylyn
kylyn.magee
Posts: 3
Joined: 21 Aug 2013, 16:35

Re: "BlueBox Error: Invalid BB session !" comes out of the b

Postby kylyn.magee » 21 Aug 2013, 20:23

I should probably also mention that we're using the latest version of SmartFox and the client is developed for Android.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: "BlueBox Error: Invalid BB session !" comes out of the b

Postby Lapo » 23 Aug 2013, 14:55

Hi,
is this happening in a test environment or in production? And is it something you can reproduce at will?
If so please tell us which steps we should use to se this happening.

It occurs long after the client has successfully connected, logged in, and joined a room, and long before the SmartFox session timeout.

Long after... how much usually?
What server version and Java API version do you use?
Have you checked the server side logs when this error shows up?

Also I would recommend to keep an eye on the AdminTool > BlueBox monitor and check if the User is really present in the system or it's been disconnected / kicked.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
kylyn.magee
Posts: 3
Joined: 21 Aug 2013, 16:35

Re: "BlueBox Error: Invalid BB session !" comes out of the b

Postby kylyn.magee » 23 Aug 2013, 19:30

is this happening in a test environment or in production?

I'm going to say it's a test environment.
And is it something you can reproduce at will?

No, it happens after different time intervals and there are no prerequisite actions, except perhaps connecting, logging in, and joining a room ("Lobby") which occur when the application is launched.
Long after... how much usually?

The session timeout is currently set for 20 minutes. This error has always occurred at least several minutes after logging into SmartFox, any time before timing out, and sometimes not until after timing out and reconnecting one or more times.
What server version and Java API version do you use?

I'm not entirely sure what you're looking for, but the SmartFoxServer version is 2.7.0 and we're using Android (which I guess is Java 5/6), as I mentioned belatedly in my second post.
Have you checked the server side logs when this error shows up?

Here are all of the log messages about the user and session:

Code: Select all

23 Aug 2013 | 14:18:36,010 | INFO | 25933674@qtp-8897174-7 | bitswarm.sessions.DefaultSessionManager | Session created: { Id: 173, Type: BLUEBOX, Logged: No, IP: null ) on Server port: 0 <---> 0
23 Aug 2013 | 14:18:36,946 | INFO | com.smartforserver.v2.controllers.SystemController-1 | v2.api.SFSApi | User login: { Zone: ZoneName }, ( User Name: 30, Id: 166, Priv: 0, Sess: IPAddr ) , Type: unknown
23 Aug 2013 | 14:18:38,099 | INFO | com.smartfoxserver.v2.controllers.SystemController-1 | v2.api.SFSApi | Room joined: ( Room: Lobby, Id: 1, Group: default, isGame: false ), { Zone: ZoneName }, ( User Name: 30, Id: 166, Priv: 0, Sess: 72.9.34.114 ) , asSpect: false
23 Aug 2013 | 14:33:01,568 | INFO | pool-2-thread-2 | bitswarm.sessions.DefaultSessionManager | Session removed: { Id: 173, Type: BLUEBOX, Logged: Yes, IP: IPAddr }
23 Aug 2013 | 14:33:01,568 | INFO | pool-2-thread-2 | v2.api.SFSApi | User disconnected: { Zone: ZoneName }, ( User Name: 30, Id: 166, Priv: 0, Sess: 72.9.34.114 ) , SessionLen: 864622, Type: unknown

...keep an eye on the AdminTool > BlueBox monitor...

After the error occurs, the user is no longer listed in the BlueBox monitor.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: "BlueBox Error: Invalid BB session !" comes out of the b

Postby Lapo » 24 Aug 2013, 07:58

Thanks for the details.
I'm not entirely sure what you're looking for, but the SmartFoxServer version is 2.7.0 and we're using Android (which I guess is Java 5/6), as I mentioned belatedly in my second post.

The fact that your server logs show a Type: unknown string at login time suggests that you are using an older Java API version.
Make sure to grab the latest version from this page:
http://www.smartfoxserver.com/download/sfs2x#p=client

And let us know if it improves the situation.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 27 guests