Bug 354130 - Telepathy can't connect to a Jabber account anymore
Summary: Telepathy can't connect to a Jabber account anymore
Status: RESOLVED UNMAINTAINED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: accounts-kcm (show other bugs)
Version: 15.08.2
Platform: Other Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-20 14:52 UTC by tromzy
Modified: 2024-09-18 18:12 UTC (History)
31 users (show)

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


Attachments
Ugly hack to disable oauth2 authentication (breaks google accounts, fixes xmpp) (784 bytes, patch)
2016-04-05 14:35 UTC, Fabian Henze
Details
google+xmpp (677 bytes, patch)
2016-10-17 14:30 UTC, lzet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tromzy 2015-10-20 14:52:51 UTC
I can't connect to the XMPP / jabber protocol on my workplace's local network. It used to work, now when I configure it and try to go "Online", none of my contacts show up, nothing happens, and there is no information message. Also, when I click "Configure", it crashes Plasma, so I have to delete the account and create a new one.

Reproducible: Always

Steps to Reproduce:
1.Configure a Jabber account
2.Try to connect
3.The "Connecting" icon spins forever and nothing happens.

Actual Results:  
The "Connecting" icon spins forever and nothing happens.

Expected Results:  
It should connect, I should be able to see contacts and join chat room.

Arch Linux.
Comment 1 Jens 2015-10-25 23:28:13 UTC
Same issue here, both on Arch Linux and Kubuntu (15.10).

Telepathy fails to connect to jabber server
and sometimes variously:
- system tray icon spins continuously
- one or more 'connection error' notification messages are given
- multiple password entry windows (regardless of password in kwallet)

Connection seems to fail on trying to authenticate with X-OAUTH2, 
as per below.
------------
10/25/15 23:21:27.567460 - [wocky] _end_element_ns: Received stanza
* features xmlns='http://etherx.jabber.org/streams'
    * c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='0JaIQr5AdmD0DlL4P1HNXRuruO0='
    * register xmlns='http://jabber.org/features/iq-register'
    * mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
        * mechanism
            "PLAIN"
        * mechanism
            "DIGEST-MD5"
        * mechanism
            "X-OAUTH2"
        * mechanism
            "SCRAM-SHA-1"
10/25/15 23:21:27.567583 - [gabble/authentication] gabble_server_sasl_channel_start_auth_async (server-sasl-channel.c:836): Starting authentication
10/25/15 23:21:27.605623 - [gabble/authentication] gabble_server_sasl_channel_start_mechanism_with_data (server-sasl-channel.c:548): Starting X-OAUTH2 authentication with 2 bytes of initial data
10/25/15 23:21:27.605822 - [wocky] _write_node_tree: Serializing tree:
* auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' xmlns:wocky-zb='http://www.google.com/talk/protocol/auth' wocky-zb:client-uses-full-bind-result='true' mechanism='X-OAUTH2'
    "AAA="
10/25/15 23:21:27.657155 - [wocky] auth_failed: wocky-sasl-auth.c:274: Authentication failed!: Disconnected
10/25/15 23:21:27.657259 - [gabble/authentication] gabble_server_sasl_channel_fail (server-sasl-channel.c:959): auth failed: WOCKY_AUTH_ERROR_CONNRESET (#7): Disconnected
10/25/15 23:21:27.657362 - [gabble/connection] connector_error_disconnect (connection.c:1764): Interactive authentication error, reason 2, dbus error org.freedesktop.Telepathy.Error.ConnectionLost
Comment 2 sourcemaker 2015-11-12 22:19:54 UTC
Same here on ArchLinux
Comment 3 tromzy 2015-11-13 08:29:00 UTC
Not fixed in KDE Applications 15.08.3 (Arch Linux too).
Comment 4 Dmitry 2015-11-19 13:54:23 UTC
The same here on ArchLinux. I'm connecting to the server as my_account@domain.com and the relevant ejabberd log say:

@ejabberd_listener:accept: Accepted connection <my_ip>:56404 -> <server_ip>:5222
@ejabberd_c2s:wait_for_feature_request: Failed authentication for @domain.com from <my_ip>

It looks the client lacks account in jabber id on connect.
Comment 5 somnium 2015-11-28 23:03:51 UTC
I can confirm that this happens to me as well. I try to set up a jabber account but it cannot connect. The error message is that authentication fails, maybe password is incorrect. But the password is correct.
Comment 6 somnium 2015-11-29 11:21:56 UTC
I can confirm the bevavior of comment 4. The debug log of my ejabberd-server shows the following line:

[info] ({socket_state,p1_tls,{tlssock,#Port<0.29185>,#Port<0.29186>},<0.517.0>}) Failed authentication for @[DOMAIN] from [IP ADDRESS]

I anonymized the domain and ip address. So the id is missing. I'm using Arch Linux btw.
Comment 7 somnium 2015-12-20 11:00:13 UTC
The problem still persists in KDE Applications 15.12 on Arch Linux. I am not able to connect via XMPP/Jabber.
Comment 8 kde 2015-12-20 14:15:16 UTC
Also exists on Kubuntu 15.10 (and it's a regression from 15.04), with KDE Frameworks 5.15.0 and Telepathy 15.08.2. Anyone here who can build KDE Telepathy and bisect the change which broke this?
Comment 9 Dmitry 2015-12-20 14:46:30 UTC
I'm shocked! Critical bug about broken a part of main main functionality still unconfirmed for two months!
Comment 10 sourcemaker 2015-12-23 15:40:22 UTC
I've given up trying to use KTP. 
Welcome back Kopete!
Comment 11 Krisztián Szegi 2016-02-13 19:12:40 UTC
Same problem. And additionally, in a plasma5 environment, it (also) uses gnome-keyring (it had me set up a new default keyring) but I also see a new entry with the corresponding password under "accounts" in kde's wallet manager after creating the Jabber account. After several attempts, there were entries with for example the server name (talk.google.com) which I definitely not typed in as password. I removed the Jabber account, removed all relevant entries from wallet manager, created the account from scratch, and still no luck. But now, I have only one password maps entry under accounts in wallet manager, with id "7".
Something around password managing smells fishy.
Please look into it

My setup:
OpenSUSE Tumbleweed 20160209-0
(Maybe) relevant packages
telepathy-kde : 0.9.0-16.1
telepathy-gabble : 0.18.3-1.6
ktp-auth-handler : 15.12.1-19.1
ktp-accounts-kcm : 15.12.1-19.2
Comment 12 tromzy 2016-02-17 09:17:18 UTC
Still not fixed in telepathy 15.12.2.
Comment 13 Fabian Henze 2016-04-05 14:35:42 UTC
Created attachment 98255 [details]
Ugly hack to disable oauth2 authentication (breaks google accounts, fixes xmpp)

The attached patch fixes the problem for me. Unfortunately it's just a really ugly workaround, which breaks google accounts.

But if this fixes it for other users as well, someone with more kde telepathy knowledge might be able to figure out what's wrong.
Comment 14 somnium 2016-04-24 19:14:55 UTC
This problem is still not fixed with KDE Applications 16.04 on Arch Linux.
Comment 15 eseifert 2016-04-28 10:02:59 UTC
I'm seeing the same issue on Gentoo Linux. Login to XMPP only fails if I try to save the password. Log in works without saving the password to kwallet.

telepathy-qt: 0.9.6.1
telepathy-gabble: 0.18.3
ktp-auth-handler: 15.12.3
ktp-accounts-kcm: 15.12.3
Comment 16 somnium 2016-04-29 08:07:14 UTC
The strange thing on openSuse Tumbleweed is, that ktp uses gnome-keyring. When I set up an xmpp account, a password prompt for the gnome-keyring is shown. I don't know, if this has anything to do with this issue. There is definitly an issue in ktp-auth-handler. I cloned the repo and will take a look. Maybe I will come up with an solution.
Comment 17 tony den haan 2016-06-02 14:06:16 UTC
Same here, if i'm lucky i get prompted for password again. Pidgin works, so i know it's not the server.
Comment 18 tony den haan 2016-06-02 14:10:23 UTC
kopete and empathy also claim authentication failed. Could they be failing to use starttls properly?
Comment 19 Vadim Dyadkin 2016-07-29 12:44:33 UTC
I have the same problem in Gentoo. Ktp works with jabberd2 but not with ejabberd. Psi works with both. Patch from comment 13 solves the problem with ejabberd.
Comment 20 tromzy 2016-08-31 14:36:45 UTC
The big is fixed in Telepathy 16.08 on Archlinux.
Comment 21 somnium 2016-08-31 19:17:57 UTC
I cannot confirm, that this bug is fixed. It is still occuring on Archlinux with KDE Applications 16.08.
Comment 22 tromzy 2016-09-01 07:33:20 UTC
Weird. To make it work I had to go to "Configure" -> "Advanced" and enter a second time the server address. Did you try that ? Entering it only at first setup did not work.
Comment 23 somnium 2016-09-02 14:31:24 UTC
This is still not working. It is the same on openSUSE Tumbleweed. I use a ejabberd server an the password is not sent to the server like explained in this bug report. Please reopen this report or I need to create a new one.
Comment 24 tromzy 2016-09-02 14:33:22 UTC
Apparently not totally solved.
Comment 25 tony den haan 2016-10-04 15:06:32 UTC
could it be because our server requires logging in as user@domain.com?
Comment 26 lzet 2016-10-17 14:30:47 UTC
Created attachment 101602 [details]
google+xmpp
Comment 27 k3a 2016-10-23 10:43:09 UTC
If you are managing your own ejabberd server, you can disable "X-OAUTH2" by
disable_sasl_mechanisms: ["X-OAUTH2"]

or read OAuth docs
https://docs.ejabberd.im/developer/ejabberd-api/oauth/
Comment 28 Felix 2017-01-02 10:49:54 UTC
I am facing the same issue: Telepathy cannot connect to the ejabberd service. It looks to me like the fallback to the PLAIN authentication method never takes place. However, I am not competent enough to judge whether this error is in ktp-auth-handler or gabble. Let me know if you need any debug output.
Comment 29 Dmitry 2017-02-16 08:00:20 UTC
This is what I see now in the server log when I'm trying to connect to ejabberd:

2017-02-16 10:55:13.743 [info] <0.961.0>@ejabberd_listener:accept:333 (#Port<0.85220>) Accepted connection <client_ip>:45668 -> <server_ip>:5222
2017-02-16 10:55:13.828 [info] <0.13203.19>@ejabberd_c2s:wait_for_feature_request:723 ({socket_state,fast_tls,{tlssock,#Port<0.85220>,#Port<0.85221>},<0.13202.19>}) Failed authentication for <user>@<domain> from <client_ip>: Invalid token

I've tried to remove and configure the jabber connection again, tried with and without "require ssl" option.
Both ends are running ArchLinux, efabberd 17.01, kde telepathy 16.12.2.
Comment 30 Dmitry 2017-02-17 10:38:24 UTC
(In reply to k3a from comment #27)
> If you are managing your own ejabberd server, you can disable "X-OAUTH2" by
> disable_sasl_mechanisms: ["X-OAUTH2"]
> 
> or read OAuth docs
> https://docs.ejabberd.im/developer/ejabberd-api/oauth/

This one helped me! Thank you k3a!
Comment 31 Murz 2017-04-14 12:40:28 UTC
Confirm this problem on Kubuntu 16.10 and also on fresh Kubuntu 17.04 with KDE 5.9 and kde-telepathy 15.08.3, telepathy-gabble 0.18.3-3

disable "X-OAUTH2" by 'disable_sasl_mechanisms: ["X-OAUTH2"]' solves the problem on my own ejabberd server, but I use public jabber server and can't connect to it.

Seems that if "X-OAUTH2" auth fail - Telepathy don't try next auth mechanism, but stop trying and return error with wrong password. Maybe we can quickly fix this logic problem?
Comment 32 Martin Klapetek 2017-04-15 20:09:47 UTC
If someone can provide me with a tested patch, I'm happy
to review and merge it.
Comment 34 Justin Zobel 2022-11-18 04:30:40 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 35 Bug Janitor Service 2022-12-03 05:17:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 36 Bug Janitor Service 2022-12-18 05:15:20 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 37 Nelson Fonseca 2023-04-16 17:47:00 UTC
Hi There,

The error persists even with the last version recently updated. The following details of my Arch Linux version and the telepathy packages that I have installed:

Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.11-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-2400 CPU @ 3.10GHz
Memory: 31.3 GiB of RAM
Graphics Processor: AMD BARTS
Manufacturer: Apple Inc.
Product Name: iMac12,2
System Version: 1.0

❯ yay -Qs telepathy
local/telepathy-accounts-signon 2.1-3
local/telepathy-farstream 0.6.2-7
local/telepathy-gabble 0.18.4-4 (telepathy)
local/telepathy-glib 0.24.2-2
local/telepathy-haze 0.8.1-1 (telepathy)
local/telepathy-idle 0.2.2-1 (telepathy)
local/telepathy-kde-accounts-kcm 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-approver 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-auth-handler 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-call-ui 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-common-internals 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-contact-list 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-contact-runner 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-desktop-applets 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-filetransfer-handler 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-integration-module 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-send-file 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-kde-text-ui 22.12.3-1 (kde-applications kde-network telepathy-kde)
local/telepathy-logger 0.8.2-5
local/telepathy-logger-qt 17.09.0-1
local/telepathy-mission-control 5.16.6-2
local/telepathy-morse 0.1.0-3
local/telepathy-qt 0.9.8-2
local/telepathy-salut 0.8.1-7 (telepathy)

ERRORS:
- There was a problem while trying to connect nelsinchi@kdetalk.net - An unknown error was encountered (org.freedesktop.DBus.Error.Failed), please report this
- There was a problem while trying to connect google8 - An unknown error was encountered (org.freedesktop.DBus.Error.Failed), please report this

KSystemlog:
4/16/23 12:39 PM	plasmashell	ktp-common-internals: Current presence changed: "offline" ""
4/16/23 12:39 PM	plasmashell	ktp-common-internals: Requested presence changed: "available" ""
4/16/23 12:39 PM	plasmashell	ktp-common-internals: Presence changing: true
4/16/23 12:39 PM	plasmashell	ktp-common-internals: Account "gabble/jabber/google_2dim_8" enabled: true
4/16/23 12:39 PM	plasmashell	ktp-common-internals: Account "gabble/jabber/ktp_2dkde_2dtalk_2dim_7" enabled: true
4/16/23 12:39 PM	plasmashell	ktp-models: Creating a new Account from account: Tp::Account(0x5557b508a8c0)
4/16/23 12:39 PM	plasmashell	ktp-models: Account not already in model. Create new Account from account: Tp::Account(0x5557b508a8c0)
4/16/23 12:39 PM	plasmashell	ktp-models: Creating a new Account from account: Tp::Account(0x5557b834d690)
4/16/23 12:39 PM	plasmashell	ktp-models: Account not already in model. Create new Account from account: Tp::Account(0x5557b834d690)


Thanks a lot for the support!
Comment 38 Christoph Cullmann 2024-09-18 18:12:47 UTC
Dear user, unfortunately Telepathy is no longer maintained.

Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat.