Search code examples
iosxmppopenfirexmppframework

XMPPFramework and OpenFire server, authentication works, connection hangs


I'm trying to connect to an OpenFire server with the use of the XMPPFramework for iOS. The connection is established, the authentication is done (Forced to Plain), but after the authentication there is an renegotiation package sent, which is NOT responded. I've tried to search on StackOverflow, google, and the OpenFire support, but couldn't find anything of use.

My XML dump (from the app):

2012-07-26 13:07:26:745 iPhoneXMPP[1777:707] iPhoneXMPPAppDelegate: xmppStream:socketDidConnect:
2012-07-26 13:07:26:749 iPhoneXMPP[1777:1c03] SEND: <?xml version='1.0'?>
2012-07-26 13:07:26:750 iPhoneXMPP[1777:1c03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='xmpp.mobile-engineering.nl'>
2012-07-26 13:07:26:981 iPhoneXMPP[1777:1b03] RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="xmpp.mobile-engineering.nl" id="153cc75d" stream1:lang="en" version="1.0"/>
2012-07-26 13:07:27:107 iPhoneXMPP[1777:1c03] RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
2012-07-26 13:07:27:113 iPhoneXMPP[1777:707] iPhoneXMPPAppDelegate: xmppStreamDidConnect:
2012-07-26 13:07:27:116 iPhoneXMPP[1777:707] SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AGhvcHNhAGhvcHNh</auth>
2012-07-26 13:07:27:219 iPhoneXMPP[1777:1b03] RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
2012-07-26 13:07:27:220 iPhoneXMPP[1777:1b03] SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='xmpp.mobile-engineering.nl'>

The last message is a SEND to the server, and there is where it ends. When i ask the XMPPFramework what the state is, i get: STATE_XMPP_OPENING

What I get of the XML dump above is that the authentication succedes. But the next step isn't...

What am i doing wrong here?


Solution

  • I've fixed it with the patch mentioned on the following page: https://github.com/robbiehanson/XMPPFramework/issues/81

    It seems that the framework sends the message, but does not listen for it. I've implemented the patch and i can log on to the OpenFire server now!