PacketParserUtils.parseStreamError() is not aware of optional text element and therefore failes to parse stream error's correctly. Prevents ReconnectionManager from reconnecting.

Description

parseStreamError() simply uses the first element's name as stream error type. But a stream error could contain two or three elements. For example, the conflict stream error could look like this:

In this case the current parseStreamError() method would use "text" as stream error name.

Fix would be to extend the StreamError class with an optional text attribute and check in the START_TAG condition if we have a "text" element or the stream error type by string matching (e.g. "text".equals(name)).

As a side effect, this also prevents ReconnectionManager from reconnecting.

Stream error syntax: http://xmpp.org/rfcs/rfc6120.html#streams-error-syntax
Stream error schema: http://xmpp.org/schemas/streamerror.xsd
Original bug report: https://github.com/Flowdalic/smack/pull/26

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Ignite Forum URL

Components

Fix versions

Affects versions

Priority

Created August 6, 2013 at 10:06 AM
Updated October 28, 2020 at 1:28 PM
Resolved October 9, 2013 at 5:02 PM