Closed Bug 1085022 Opened 10 years ago Closed 9 years ago

XMPP fails to handle server-to-server communication errors

Categories

(Chat Core :: XMPP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: aleth)

Details

Attachments

(1 file, 3 obsolete files)

For example, for a gmail.com contact (via syndication) with a ch3kr.net account:

onTransportStatus(STATUS_RECEIVING_FROM)
[18/10/2014 16:57:02] LOG   (@ prpl-jabber: XMPPParser.prototype._logReceivedData resource:///modules/xmpp-xml.jsm:320)
received:
<presence xmlns="jabber:client" type="error" to="c@ch3kr.net" from="n@gmail.com">
 <error xmlns="jabber:client" type="cancel">
  <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
   Server-to-server connection failed: Encrypted server-to-server communication is required but was not offered
  </text>
 </error>
</presence>

[18/10/2014 16:57:02] DEBUG (@ prpl-jabber: XMPPAccountPrototype.onPresenceStanza resource:///modules/xmpp.jsm:909)

Received presence stanza for n@gmail.com
[18/10/2014 16:57:10] LOG   (@ prpl-jabber: Socket.sendString resource:///modules/socket.jsm:255)
Sending:
<message to="n@gmail.com" type="chat" id="10"><body>testing</body></message>
[18/10/2014 16:57:10] DEBUG (@ prpl-jabber: Socket.onTransportStatus resource:///modules/socket.jsm:557)
onTransportStatus(STATUS_SENDING_TO)
[18/10/2014 16:57:12] DEBUG (@ prpl-jabber: Socket.onTransportStatus resource:///modules/socket.jsm:557)
onTransportStatus(STATUS_RECEIVING_FROM)
[18/10/2014 16:57:12] LOG   (@ prpl-jabber: XMPPParser.prototype._logReceivedData resource:///modules/xmpp-xml.jsm:320)
received:
<message xmlns="jabber:client" id="10" type="error" to="c@ch3kr.net/Instantbird" from="n@gmail.com">
 <error xmlns="jabber:client" type="cancel">
  <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
   Server-to-server connection failed: Encrypted server-to-server communication is required but was not offered
  </text>
 </error>
</message>

We can't do anything with such a contact, but the prpl will happily open conversations and appear to send messages without visible error messages.
(In reply to aleth [:aleth] from comment #0)

> the prpl will happily open conversations

This seems a reasonable behavior (as the s2s problem could be temporary).

> and appear to send messages without visible error messages.

Are we currently not handling <message type="error"> at all?
(In reply to Florian Quèze [:florian] [:flo] from comment #1)
> (In reply to aleth [:aleth] from comment #0)
> 
> > the prpl will happily open conversations
> 
> This seems a reasonable behavior (as the s2s problem could be temporary).

A <presence type="error"> stanza should lead to the contact being status=unknown, so I disagree.
Attached patch handleerrors.diff (obsolete) — Splinter Review
This improves things a bit.
Assignee: nobody → aleth
Status: NEW → ASSIGNED
Attachment #8507511 - Flags: review?(florian)
Attached patch handleerrors.diff v2 (obsolete) — Splinter Review
This is a little less lazy.
Attachment #8507511 - Attachment is obsolete: true
Attachment #8507511 - Flags: review?(florian)
Attachment #8507524 - Flags: review?(florian)
Attached patch handleerrors.diff v3 (obsolete) — Splinter Review
Avoid unrelated whitespace changes. Sorry for the bugspam
Attachment #8507524 - Attachment is obsolete: true
Attachment #8507524 - Flags: review?(florian)
Attachment #8507525 - Flags: review?(florian)
Put back early return for errors to avoid typing notifications, as discussed on IRC.
Attachment #8507525 - Attachment is obsolete: true
Attachment #8507525 - Flags: review?(florian)
Attachment #8507792 - Flags: review?(florian)
Attachment #8507792 - Flags: review?(florian) → review?(clokep)
Attachment #8507792 - Flags: review?(clokep) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: