yaxim-org / yaxim

yaxim - a lean XMPP/Jabber client for Android
https://yaxim.org
GNU General Public License v3.0
486 stars 238 forks source link

Disconnection reason not (always?) shown #205

Closed Zash closed 6 years ago

Zash commented 6 years ago

While testing, I deleted the account I had Yaxim connected to, and all it said was "Disconnected". Prosody, when deleting an account, closes any open sessions of that account with the condition not-authorized and a textual message along the lines of "Account deleted". Showing the textual message would be nice.

ge0rg commented 6 years ago

Interesting, I just recently deleted an account that still was logged in and got the correct message displayed. It's possible that yaxim's internal error message is updated when your WiFi / 3G connection changes or other related events occur. Maybe it's also due to an automatic reconnect from yaxim.

Zash commented 6 years ago

yaxim 0.9.2 FWIW, I suppose I should test again to be sure

Zash commented 6 years ago

Hm, hard to tell, but it's possible that something flashes by and then gets replaced by "Disconnected".

Zash commented 6 years ago

In debug logs it looks like it says "Connecting to server?" and then the connection is closed.

ge0rg commented 6 years ago

Yes, that sounds like yaxim. There is no easy way to distinguish permanent errors (account deleted) from transient networks (server shutdown, network outage), so yaxim will auto-reconnect after 5 seconds or on the next network change. It should tell you that username/password don't match on next connect, though.

ge0rg commented 6 years ago

Okay, I just tested it. When you delete the account on the server, yaxim will display, for 5 seconds, this message:

stream:error (not-authorized) text: Account deleted

And then it will happily go on reconnecting to the server, which obviously leads to

SASL authentication failed using mechanism PLAIN

The current project infrastructure doesn't allow to improve that in a relevant way, sorry.