Page 1 of 1

SFS - WARN :You are not joined in any rooms

Posted: 10 Sep 2013, 16:42
by rodolfo
I'm having an issue with the sdk 1.1.8 for iOS.

Steps to reproduce:
1. I joined a room
2. I received an onRoomJoin, successfully.
3. I attempt to leave the room. The joinedRooms array doesn't show any rooms, while lastJoinedRoom has the room variable. I send a LeaveRoomRequest and I get the "[SFS - WARN] You are not joined in any rooms" and the player is not leaving the room.
4. If I try to join the room again, the server will give an error saying that I already joined the room

Re: SFS - WARN :You are not joined in any rooms

Posted: 10 Sep 2013, 19:11
by Lapo
Hi,
part of what you are saying is expected.
The lastJoinedRoom will always point to the last Room that was joined, even if you have left it. It is in any case the last room you have joined :)
The joinedRooms array should contain 1 Room when you join and no Rooms when you leave.

What is not clear in your report is if these states are found before or after the LeaveRoomRequest is sent.

I would recommend to turn on the debug flag of the SmartFox client object and copy/paste the whole transcript here, so we can see the exchanges with the server.

Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 26 Sep 2013, 16:26
by jcnes
Hi, I noticed this same issue. I've made a simple little test app where you can see the issue in action. Due to restrictions on attachment size, I can't attach the entire Xcode project, so I just attached AppDelegate.h, AppDelegate.m and SmartFoxConfig.xml. You should be able to create a new XCode project and replace the appropriate files with the ones attached. You'll have to change the IP in SmartFoxConfig.xml to point to one of your own servers, it's currently pointing to localhost. Once it's built, check the output window in Xcode for the expected vs. actual behavior. Let me know if it doesn't build for you.

Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 27 Sep 2013, 08:40
by Lapo
Thanks, the files you have sent are sufficient for us to test the problem.
We'll check the problem and let you know asap.

cheers

Re: SFS - WARN :You are not joined in any rooms

Posted: 28 Oct 2013, 15:23
by jcnes
Hi,
Was your team able to replicate the issue?

Thanks,
John

Re: SFS - WARN :You are not joined in any rooms

Posted: 28 Oct 2013, 15:37
by Lapo
Yes, we're working on a new release. It will take some more time because we're releasing an ARC only update, and XCode5 has also introduced new errors that don't show up in the previous version.
It should be out in mid November but we might be able to send you a pre release to save you some time. Drop us an email next week and we'll see what we can do.
If you email us please just put a reference to this thread.

Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 28 Oct 2013, 16:03
by jcnes
Great, thanks for the update!

Re: SFS - WARN :You are not joined in any rooms

Posted: 11 Dec 2013, 02:16
by loafer
Have these updates been made for Xcode 5?

XCode 4 and 5, yes.

I am using the latest sfs2x release and latest obj framework and I am unable to send requests to update room variables with this same error.

Can you double check the version by printing it out in the console at run time?
Use this:

Code: Select all

NSLog(@"Version : %@", [sfs version]);

Where sfs is the name of your API instance.

Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 15 Dec 2013, 08:12
by loafer
I am using Xcode 4.5. I made sure I am using the latest SFS release on Dec 5, 2013. per your request, the output is: SFS Version : 1.3.0

I have an SFS controller that has some helper methods:

Code: Select all

- (void)setRoomVariableWithName:(NSString *)varName withValue:(id)value inRoom:(NSString *)roomId
{
    SFSRoomVariable * roomVar = [[SFSRoomVariable alloc] initWithName:varName value:value type:-1];
    NSArray * roomVars = [NSArray arrayWithObject:roomVar];
    [self setRoomVariables:roomVars inRoom:roomId];
}

- (void)setRoomVariables:(NSArray *)roomVariables inRoom:(NSString *)roomId
{
    SFSRoom * room = [self.client getRoomByName:roomId];
   
    [self.client send:[SetRoomVariablesRequest requestWithRoomVariables:roomVariables room:room]];
}


I call that method like this:

Code: Select all


NSNumber * index = [NSNumber numberWithInt:newIndex];
[[ZORASFSController instance] setRoomVariableWithName:@"nature" withValue:[index stringValue] inRoom:@"a3_1"];



And I get this warning every time:
[SFS - WARN] You are not joined in the target room.

If i update this via an extension and then have the extension dispatch to users in the room, the client receives the update that the room vars were updated. It seems to be related to the iOS library not thinking I am in the room as opposed to the device actually being connected.

I get successful RoomJoin logs:

Code: Select all

 ZORASFSController.onRoomJoin: [Room: a3_1, Id: 7, GroupId: a3_rg_1]


And the admin tool shows my user in that room as well.

Any thoughts? I seem to remember have an issue like this back in the day when it wasn't a compiled framework. I think i had to edit the actual sfs library to handle these failures or if this warning happened, I had it reload the joined room list or something. But that was awhile ago, and may have been for user variables, not room variables.

Re: SFS - WARN :You are not joined in any rooms

Posted: 15 Dec 2013, 08:16
by loafer
One other thing that may or not be an issue is that because of how we use sfs, room names are dynamic. So on init, the extension queries the dbase for the event we are doing and it creates all the rooms and persistent room variables we need, creates all that and then the app connects after this is done. This seems to work fine for everything else, but didn't know if it was something that might cause the issue.

Re: SFS - WARN :You are not joined in any rooms

Posted: 15 Dec 2013, 12:04
by Lapo
One other thing that may or not be an issue is that because of how we use sfs, room names are dynamic.

I am not sure about what you mean by that?
The fact that you are reading the name of the Room from a DB before creating it, is not a problem.

However if you need to change the Room's name later you will need to use the appropriate API call. (See SFSApi class, there's a specific method)

We'll run an extra test for your report and let you know.
Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 16 Dec 2013, 00:34
by loafer
I just wanted to point out that all of the rooms are created by the extension and nothing is static in the zone file. Didn't know if that impacted anything on the los library side

Re: SFS - WARN :You are not joined in any rooms

Posted: 16 Dec 2013, 10:01
by Lapo
I have tested setting Room Variables and have found no problems.

Can you please explain the steps to reproduce this issue?
What I tested is:

1. Connect
2. Login
3. Join Room
4. Set RoomVariables

Thanks

Re: SFS - WARN :You are not joined in any rooms

Posted: 17 Dec 2013, 18:17
by loafer
i'll try and send over an example setup.

But those are my same exact steps. and as i've mentioned, I can see the user logged in with the admin tool and the extension updating a room variable fires back to that same user that a room var was updated.