Bug 301330 - Connecting to the same xmpp account using the same resource you will disconnect one of them
Summary: Connecting to the same xmpp account using the same resource you will disconne...
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: accounts-kcm (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR minor
Target Milestone: 0.6-next
Assignee: Telepathy Bugs
URL:
Keywords:
: 304270 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-07 07:49 UTC by Daniele E. Domenichelli
Modified: 2013-03-24 12:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele E. Domenichelli 2012-06-07 07:49:04 UTC
We use "kde-telepathy" as resource, so if you configure the same account on 2 different machines, only one can be connected at the same time, unless the user specifies it manually.
Perhaps could be ok if our target was just "computers", but since plasma active is taking kde to tablets, it will be a lot more likely that a user have 2 different devices configured.
The error says "There was a problem while trying to connect xxxx@xxxxx.xx - Somewhere there is another client connecting with your account and your current connection is lost"

I see 3 ways to fix it:
1) Make the error more explicit (for example explaining how to avoid that by setting a different resource), but probably would be too technical, and users tend to ignore errors.
2) Use another default, but keeping "kde-telepathy" as prefix, as this will allow us one day to display a cool icon for the contact using our client (for example kde-telepathy@<the first 6 chars of the hash of the hostname> as suggested by Martin)
3) Use kde-telepathy by default, intercept this error and fix it when it is needed (either automatically or requesting the user if he wants to fix it) adding @something (see previous option)
Comment 1 Daniele E. Domenichelli 2012-07-30 08:33:04 UTC
*** Bug 304270 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2012-07-30 09:36:08 UTC
I don't have this error (Facebook or Gtalk) with two accounts with the same resource name.

Does it depend on the server?

Can people look at what Adium/PSI/Kopete/Empathy/etc. do for the resource ID, and comment in this bug.

In terms of code it's a simple fix one we've decided what to do.
Comment 3 David Edmundson 2012-07-30 10:27:59 UTC
I do get this error on KDETalk, so it must be that GMail and Facebook don't check resource-IDs.
Comment 4 David Edmundson 2012-07-30 10:36:09 UTC
PSI uses hostname directly as resource ID

Kopete uses "Kopete"  - and has the same problem. Even worse as both resources keep fighting for it and both keep disconnecting erroring all the time.

FWIW Kopete has the error string "There was an error in the protocol stream: There was a conflict in the information received. Replaced by new connection"
Comment 5 David Edmundson 2013-03-24 12:18:33 UTC
Git commit 9f729f93f41686e6dc161ddf415ceebe1284cf19 by David Edmundson.
Committed on 24/03/2013 at 02:51.
Pushed by davidedmundson into branch 'master'.

Make our resourceID more unique

Currently some jabber servers don't allow users to connect from two places with the same resource ID.
This appends the first 6 digits of the hash of their hostname to our current default resource ID

REVIEW: 109686

M  +10   -2    plugins/gabble/gabble-account-ui.cpp

http://commits.kde.org/telepathy-accounts-kcm/9f729f93f41686e6dc161ddf415ceebe1284cf19