Expand my Community achievements bar.

SOLVED

Same User Twice

Avatar

Level 3

Is there any way to merge a user with an existing login that exist for the same user. If I log in to a room and exit without disconnecting gracefully, and re-enter again with the same auth token I get a new user listed with number 1, 2.... etc added to the display name. Is there any way to configure this behavior so that a user re-entering with the same token is merged or replaces the original user?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi Barry,

We are looking into this - It's a little trickier than I'd hoped, but this

may be possible for the release-after-next. We're thinking of adding a new

RoomSetting, allowDuplicateUserIDs - this defaults to true, and if set to

false, a second user coming in with a duplicate userID will kick out the

original user.

nigel

View solution in original post

13 Replies

Avatar

Former Community Member

Hi There,

Do you see 2 users at the same time? Or just the new user, but with the "2" or whathaveyou appended to it?

  nigel

Avatar

Level 4

If it makes you feel any better we see the same thing all the time. I have

an outstanding bug to me to write a hack to fix this behavior in our system

-Eric

Avatar

Level 4

To elaborate what happens to us is this.

User esteimle enters a room to start a video chat. It takes too long to

connect or he does not see the other party join the room. Instead of

exiting nicely he closes the flash window, or reloads the page. Now he

wants to get back into that room so he makes another attempt to join the

room, only this time he is added by LCCS as esteimle-1. Except esteimle is

still in the room so now I have esteimle and esteimle-1 and they are both

streaming the same audio and camera. So now everything is a mess, there's

echo and dual cameras. It gets worse if the other person did the same thing

because then I have 2 duplicate camera and audio streams. Even worse if the

users get mad about this behavior and exits and rejoins now we have esteimle

esteimle-1 and esteimle-2.

My plan when I get to it is to just write something that watches the user

list and boots old duplicate users. In my laziness though I wish there was

just a setting I could set that would stop this behavior

-Eric

Avatar

Level 3

Hi Nigel,

What Eric describes below is also what I see. I believe I have seen up to 7 instances of the same user in the room at one time when testing.

username, username1, username2 etc...

My preferred behavior would be that if a user re-enters with the same displayName/authToken that the server would just merge that user with the one that already exists in the room... and that the user would be just called "username".

Thanks,

Barry

Avatar

Level 3

Hi Eric,

Did you ever figure out a way to merge the two users in the same session?

Thanks,

Barry

Avatar

Former Community Member

In these cases, do the extra users ever leave the room? I'd love to get a

repro case for this - it seems as though the service doesn't realize that

the user has disconnected at all... It also seems to be related to

audio/video streaming happening at the time (does it ever happen when no

streaming is occurring?). I've repro'd the case where the user and his

stream stays around for a little longer than usual, but eventually it always

goes away (usually less than a minute).

nigel

Avatar

Level 3

Hi Nigel,

I'll try to get a reproducible case. I believe I have seen it when there are no audio/video streams.

Barry

Avatar

Level 3

Saw this problem again this week. It happened twice when I was using the debug flash player v10.2 with Firefox both times. It seemed like it happened when the Flash player crashed and when I restarted the browser I came in as the same user with the number appended. It actually happened twice, so the user now had the number 3 appended when I looked at the room with the Room Console.

What would fix this problem for me would be if there was an option to boot out the first instance of the user if the same user enters a second time, so instead of creating a second instance of the same user I would have the option of the first instance being booted out and the second instance becoming the real user with the correct username(no appended numbers attached).

The reason this issue breaks some of my code is because I have to target users for private audio/video sessions. If I target them using their user id, it will not work because the user id has changed to the version with he number appended to the end.

Any ideas for a workaround. I've confirmed that this problem definitely still happens.

Thanks,

Barry

Avatar

Level 3

An update on this issue is that it happens for me when the flash player crashes regardless of whether the users is broadcasting audio or video at the time of the crash. I see it today when the debug version of Flash 10.3 crashed a couple of times. The client where the crash happened was idle at the time, and when I re-enter the room as the same client I get the number 2 appended to the username.

Avatar

Level 3

I also see this issue occur frequently, mostly when the client terminates the application irregularly.

This is very confusing to the user, has there been a method posted to avoid this?

Avatar

Level 3

There are two possible workarounds for this.

One would be to

  1. Initially log into the room as the room owner for every client login.
  2. The owner could check to see if this client is already in there by getting the user list and boot out the existing instance.
  3. Logout from the room owner session and log back in again as the "real" client.

Another solution would be to use the server api to check the user list and retract the user if they are already in the room. This could be kind of messy because it would involve some handshaking between your client and server.

I am seeing this problem a lot more frequently now because the debug version of Flash 10.3 that I'm using seems to crash very frequently on both Firefox and IE. Any crash of the Flash Player causes the problem to happen.

If it was possible to add a boolean param to ConnectSessionContainer that allows to either

1. boot out the existing session or

2. create a second session for the user

That would be the idea solution. Is it possible that this could be added in the next release of the API or is a workaround the best way to fix this problem for now?

Thanks,

Barry

Avatar

Correct answer by
Former Community Member

Hi Barry,

We are looking into this - It's a little trickier than I'd hoped, but this

may be possible for the release-after-next. We're thinking of adding a new

RoomSetting, allowDuplicateUserIDs - this defaults to true, and if set to

false, a second user coming in with a duplicate userID will kick out the

original user.

nigel

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----