SFS - WARN :You are not joined in any rooms

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

Moderators: Lapo, Bax

rodolfo
Posts: 1
Joined: 10 Sep 2013, 13:58

SFS - WARN :You are not joined in any rooms

Postby rodolfo » 10 Sep 2013, 16:42

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
User avatar
Lapo
Site Admin
Posts: 19818
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 10 Sep 2013, 19:11

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
Lapo
--
gotoAndPlay()
...addicted to flash games
jcnes
Posts: 3
Joined: 18 Sep 2013, 21:14

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

Postby jcnes » 26 Sep 2013, 16:26

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
Attachments
SmartfoxLeaveRoomBugSample.zip
(3.63 KiB) Downloaded 157 times
User avatar
Lapo
Site Admin
Posts: 19818
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 27 Sep 2013, 08:40

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
Lapo

--

gotoAndPlay()

...addicted to flash games
jcnes
Posts: 3
Joined: 18 Sep 2013, 21:14

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

Postby jcnes » 28 Oct 2013, 15:23

Hi,
Was your team able to replicate the issue?

Thanks,
John
User avatar
Lapo
Site Admin
Posts: 19818
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 28 Oct 2013, 15:37

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
Lapo

--

gotoAndPlay()

...addicted to flash games
jcnes
Posts: 3
Joined: 18 Sep 2013, 21:14

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

Postby jcnes » 28 Oct 2013, 16:03

Great, thanks for the update!
loafer
Posts: 7
Joined: 13 Dec 2011, 17:10

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

Postby loafer » 11 Dec 2013, 02:16

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
loafer
Posts: 7
Joined: 13 Dec 2011, 17:10

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

Postby loafer » 15 Dec 2013, 08:12

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.
loafer
Posts: 7
Joined: 13 Dec 2011, 17:10

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

Postby loafer » 15 Dec 2013, 08:16

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.
User avatar
Lapo
Site Admin
Posts: 19818
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 15 Dec 2013, 12:04

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
Lapo

--

gotoAndPlay()

...addicted to flash games
loafer
Posts: 7
Joined: 13 Dec 2011, 17:10

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

Postby loafer » 16 Dec 2013, 00:34

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
User avatar
Lapo
Site Admin
Posts: 19818
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 16 Dec 2013, 10:01

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
Lapo

--

gotoAndPlay()

...addicted to flash games
loafer
Posts: 7
Joined: 13 Dec 2011, 17:10

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

Postby loafer » 17 Dec 2013, 18:17

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.

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 2 guests