Not logged in. · Lost password · Register
Forum: agsXMPP RSS
The Roster event handlers are not being fired
Avatar
rheuser #1
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: Roster not being sent
Alex,

I have another problem that has me baffled.  I am sure that it is my own mistake but I am lost about where to look

I created a test client that worked well against the OpenFire server.  Now I want to build the real code, so, I put all of the code for establishing the connection, signing on and receiving roster items and presence into a separate class.  The problem is that the OnRosterStart, OnRosterItem and OnRosterEnd event handlers are never getting fired.  So, I get no roster.  According to the XmppConnectionState a Session Started and I get the OnLogin event fired.

Do you have any idea what I might have done wrong or even where to look for the problem?

Regards,
Dick Heuser

I just found the following in my ErrorLog:

Error 2008-08-28 13:48:15.000000 - Fidgt for WM Professional - V1.0.8241.3 - Model: X1i - Platform Version: 5.2
Error: NullReferenceException
Response: at Fidgt_for_WM_Professional.ContactManager.xmppCon_OnIq()
at agsXMPP.XmppClientConnection.StreamParserOnStreamElement()
at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement()
at agsXMPP.Xml.StreamParser.EndTag()
at agsXMPP.Xml.StreamParser.Push()
at agsXMPP.XmppConnection.SocketOnReceive()
at agsXMPP.net.BaseSocket.FireOnReceive()
at agsXMPP.net.ClientSocket.EndReceive()
at System.Net.LazyAsyncResult.InvokeCallback()
at WorkerThread.doWork()
at WorkerThread.doWorkI()
at WorkItem.doWork()
at System.Threading.Timer.ring()
This post was edited on 2008-08-29, 10:51 by rheuser.
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
what is the value of the AutoRoster property?
Do you have a log of the session?
Software Developer
AG-Software
Avatar
rheuser #3
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
I just found the following in my ErrorLog:

Error 2008-08-28 13:48:15.000000 - Fidgt for WM Professional - V1.0.8241.3 - Model: X1i - Platform Version: 5.2
Error: NullReferenceException
Response: at Fidgt_for_WM_Professional.ContactManager.xmppCon_OnIq()
at agsXMPP.XmppClientConnection.StreamParserOnStreamElement()
at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement()
at agsXMPP.Xml.StreamParser.EndTag()
at agsXMPP.Xml.StreamParser.Push()
at agsXMPP.XmppConnection.SocketOnReceive()
at agsXMPP.net.BaseSocket.FireOnReceive()
at agsXMPP.net.ClientSocket.EndReceive()
at System.Net.LazyAsyncResult.InvokeCallback()
at WorkerThread.doWork()
at WorkerThread.doWorkI()
at WorkItem.doWork()
at System.Threading.Timer.ring()
Avatar
rheuser #4
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: IQ
I put a debug stop in the IQ routine and found that I am getting an error there:

{<iq xmlns="jabber:client" type="error" from="localhost" to="fidgtuser30@localhost/OpenFireWindowsMobileClient" id="agsXMPP_3"><query xmlns="jabber:iq:agents" /><error type="cancel" code="501"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>}

How can I figure out what is being reject with the 501, feature not implemented?  This exact code works OK in my test routine.
Avatar
rheuser #5
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: log
This is my log leading up to the error - 501

<Debug>
<PhoneModel>X1i</PhoneModel>
<PlatformVersion>5.2</PlatformVersion>
<Time>2008-08-28_13:59:06</Time><Note>Fidgt is starting - Fidgt for Windows Mobile - Version 1.0.8241.3</Note>
<Time>2008-08-28_13:59:16</Time>Logon requested; Connect Server:donniepinkston.net Username:fidgtuser30 Password:password30
<Time>2008-08-28_13:59:16</Time>On Connection State Changed to - Connecting
<Time>2008-08-28_13:59:17</Time>Connection State: Connecting
<Time>2008-08-28_13:59:17</Time>On Connection State Changed to - Connected
<Time>2008-08-28_13:59:17</Time>On Write XML: <stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<Time>2008-08-28_13:59:18</Time>On Read XML: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="localhost" xml:lang="en" version="1.0" id="3437ea31" >
<Time>2008-08-28_13:59:18</Time>On Read XML: <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>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
<Time>2008-08-28_13:59:18</Time>On Write XML: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
<Time>2008-08-28_13:59:18</Time>On Read XML: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
<Time>2008-08-28_13:59:18</Time>On Connection State Changed to - Authenticated
<Time>2008-08-28_13:59:18</Time>On Write XML: <stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<Time>2008-08-28_13:59:18</Time>On Read XML: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="localhost" xml:lang="en" version="1.0" id="3437ea31" >
<Time>2008-08-28_13:59:18</Time>On Read XML: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
<Time>2008-08-28_13:59:18</Time>On Connection State Changed to - Binding
<Time>2008-08-28_13:59:18</Time>On Write XML: <iq id="agsXMPP_1" type="set" to="localhost"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>OpenFireWindowsMobileClient</resource></bind></iq>
<Time>2008-08-28_13:59:19</Time>On Read XML: <iq xmlns="jabber:client" type="result" from="localhost" to="localhost/3437ea31" id="agsXMPP_1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>fidgtuser30@localhost/OpenFireWindowsMobileClient</jid></bind></iq>
<Time>2008-08-28_13:59:19</Time>On Connection State Changed to - Binded
<Time>2008-08-28_13:59:19</Time>On Connection State Changed to - StartSession
<Time>2008-08-28_13:59:19</Time>On Write XML: <iq id="agsXMPP_2" type="set" to="localhost"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
<Time>2008-08-28_13:59:45</Time>On IQ From: localhost To: localhost/3437ea31 Type: result
<Time>2008-08-28_13:59:45</Time>Childnodes: agsXMPP.Xml.Dom.NodeList
<Time>2008-08-28_13:59:45</Time>On Read XML: <iq xmlns="jabber:client" type="result" from="localhost" to="fidgtuser30@localhost/OpenFireWindowsMobileClient" id="agsXMPP_2"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
<Time>2008-08-28_13:59:45</Time>On Connection State Changed to - SessionStarted
<Time>2008-08-28_13:59:45</Time>OnLoginSessionStarted
<Time>2008-08-28_13:59:45</Time>On Write XML: <iq id="agsXMPP_3" type="get" to="localhost"><query xmlns="jabber:iq:agents" /></iq>
<Time>2008-08-28_13:59:45</Time>On Write XML: <iq id="agsXMPP_4" type="get"><query xmlns="jabber:iq:roster" /></iq>
<Time>2008-08-28_14:00:09</Time>On IQ From: localhost To: fidgtuser30@localhost/OpenFireWindowsMobileClient Type: result
<Time>2008-08-28_14:00:09</Time>Childnodes: agsXMPP.Xml.Dom.NodeList
<Time>2008-08-28_14:00:09</Time>On Read XML: <iq xmlns="jabber:client" type="error" from="localhost" to="fidgtuser30@localhost/OpenFireWindowsMobileClient" id="agsXMPP_3"><query xmlns="jabber:iq:agents" /><error type="cancel" code="501"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
<Time>2008-08-28_14:02:54</Time>On IQ From: localhost To: fidgtuser30@localhost/OpenFireWindowsMobileClient Type: error
<Time>2008-08-28_14:02:54</Time>Childnodes: agsXMPP.Xml.Dom.NodeList
<Time>2008-08-28_14:02:54</Time>On Write XML: 
<Time>2008-08-28_14:02:55</Time>On Read XML: <iq xmlns="jabber:client" type="result" to="fidgtuser30@localhost/OpenFireWindowsMobileClient" id="agsXMPP_4"><query xmlns="jabber:iq:roster"><item jid="ggspurr@yahoo.localhost" name="ggspurr" subscription="to"><group>My Digital Life</group></item><item jid="jamie_allen@yahoo.localhost" name="jamie_allen" subscription="to"><group>My Digital Life</group></item><item jid="madolynheuser@yahoo.localhost" name="madolynheuser" subscription="to"><group>Family</group></item><item jid="madolyn.heuser\40gmail.com@gtalk.localhost" name="madolyn.heuser" subscription="to" /><item jid="mheuser\40cadorian.com@aim.localhost" name="Madolyn Heuser" subscription="to"><group>Family</group></item><item jid="kernel1983\40gmail.com@gtalk.localhost" name="KJ" subscription="to" /><item jid="cryomax@yahoo.localhost" name="cryomax" subscription="to"><group>My Digital Life</group></item><item jid="jonesja42@yahoo.localhost" name="jonesja42" subscription="to"><group>Family</group></item><item jid="eduardo.sciammarella\40gmail.com@gtalk.localhost" name="eduardo.sciammarella@gmail.com" subscription="to" /><item jid="seussgangsta@aim.localhost" name="" subscription="to"><group>Co-Workers</group></item><item jid="gtalk.localhost" name="Google Talk Transport" subscription="both"><group>Transports</group></item><item jid="mrjahomey@yahoo.localhost" name="mrjahomey" subscription="to"><group>Family</group></item><item jid="donnie.pinkston\40gmail.com@gtalk.localhost" name="Donnie Pinkston" subscription="to" /><item jid="yahoo.localhost" name="Yahoo! Transport" subscription="both"><group>Transports</group></item><item jid="aim.localhost" name="AIM Transport" subscription="both"><group>Transports</group></item><item jid="madolynh@yahoo.localhost" name="madolynh" subscription="to"><group>Family</group></item><item jid="mattli\40gmail.com@gtalk.localhost" name="mattli@gmail.com" subscription="to" /><item jid="donniepinkston@yahoo.localhost" name="donniepinkston" subscription="to"><group>jabber_yt</group></item></query></iq>
<Time>2008-08-28_14:03:18</Time>OnError
This post was edited on 2012-12-14, 12:21 by Alex.
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
this are the Agents, agents were common in the old Jabber days. Set AutoAgents to false to login without agents, but this is no problem, the server replies correct with not implemented.

agsXMPP requests and retrieves the roster correct. Maybe you app is crashing for any reason before agsXMPP raises the roster events, because I see an OnError in your log.
Software Developer
AG-Software
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS