Bug 284480 - spinning wheel indicating when an account is connecting sometimes spins forever
Summary: spinning wheel indicating when an account is connecting sometimes spins forever
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: contactlist (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
: 289269 291209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-19 17:07 UTC by David Edmundson
Modified: 2012-07-06 12:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2011-10-19 17:07:23 UTC
Not sure if this a bug in the GlobalPresence class or the code using it.
Comment 1 David Edmundson 2011-10-19 20:03:05 UTC
Further inspection showed my local-xmpp account to remain in "connecting" mode permanently, so it was kinda doing the right thing..
Comment 2 Martin Klapetek 2011-10-27 15:22:56 UTC
I think we should set a timeout like 60s and then stop it with some error (perhapes an error icon instead of the wheel?).
Comment 3 chris 2011-11-21 21:32:03 UTC
I saw this when adding a second MSN account. First account was fine. Second account spins forever and never connects.
Comment 4 Martin Klapetek 2011-12-18 14:17:47 UTC
*** Bug 289269 has been marked as a duplicate of this bug. ***
Comment 5 Martin Klapetek 2011-12-21 13:00:19 UTC
I propose this solution:

 - after 30 or 60 seconds check if there is any account in connecting state. 
 --- If so, try setting it offline and back online. 
 ------ Try this 2 or 3 times, if it won't connect, just disable it and inform the user.
 --- If there is no account in connecting state, simply stop the spinning wheel and either show a yellow warning triangle that not all accounts are on the chosen presence or simply ignore it and just stop the wheel.

What do you think?
Comment 6 Daniele E. Domenichelli 2011-12-21 18:58:33 UTC
Can we move this where the global presence is handled?
We could have a signal there to say that some account started to connect and another to say that all accounts finished connecting
Comment 7 Martin Klapetek 2011-12-21 19:02:06 UTC
That's exactly how it works right now. But apparently this doesn't solve anything as your account can be stucked in connecting forever (like David reported) and it can also happen when you are already connected, but are stucked in simply changing presence. Therefore my proposed solution.
Comment 8 David Edmundson 2011-12-21 19:09:10 UTC
Before we go about proposing solutions we need to identify the cause of the problem.

I've also seen this wheel spin when no accounts thought they were actually doing anything.

I personally think TpQt4 sometimes forgets to emit "changingPresence" when something can't connect. but it's also possible there are a few scenarios that all cause the same issue.

It may turn out Martin's idea makes sense, but we need to identify the causes first, we may be masking a problem not solving it.
Comment 9 David Edmundson 2011-12-21 19:23:28 UTC
Everyone add this line to global-presence in onChangingPresence()

     Q_FOREACH(const Tp::AccountPtr &account, m_enabledAccounts->accounts()) {
+        kDebug() << account->displayName() << account->isChangingPresence();

In my case it's shows that isChangingPresence is true.

mc-tool for this account shows:
   Automatic: available (2) ""
     Current:  (0) ""
   Requested: available (2) "Online"

so it's not at the presence requested, but Accounts KCM (and Empathy) both show it as connected and online.
Comment 10 David Edmundson 2011-12-21 19:23:55 UTC
-In my case it's shows that isChangingPresence is true.
+In my case it's shows that isChangingPresence is true for my IRC account.
Comment 11 Martin Klapetek 2012-01-10 22:48:27 UTC
*** Bug 291209 has been marked as a duplicate of this bug. ***
Comment 12 David Edmundson 2012-01-19 20:03:04 UTC
Git commit 6510aa20ece700d845a9a984a0f84205e0374e3a by David Edmundson.
Committed on 19/01/2012 at 20:58.
Pushed by davidedmundson into branch 'master'.

Use connectionStatus for the spinner rather than changingPresence.

REVIEW: 103738

M  +3    -3    global-presence-chooser.cpp
M  +1    -1    global-presence-chooser.h

http://commits.kde.org/telepathy-contact-list/6510aa20ece700d845a9a984a0f84205e0374e3a
Comment 13 David Edmundson 2012-02-23 01:32:02 UTC
I've not heard any complaints since I made that patch so I'm closing this.