Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
jeffKotula #1
Member since Aug 2011 · 12 posts
Group memberships: Members, Premium
Show profile · Link to this post
Subject: Error handler not being called
With the receive-XML error handler I can tell I'm getting the following:

<error xmlns="urn:ietf:params:xml:ns:xmpp-streams">
  <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-streams" />
  <text xmlns="urn:ietf:params:xml:ns:xmpp-streams" xml:lang="en-US">Stream Not Authenticated</text>
</error>

However, none of the other callbacks is being called. I would've expected the generic on error or stream error callbacks to be called.

(Why the stream is not authenticating in this case is a separate issue...)
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this should raise an OnStreamError. When you post the complete Xml I can check again.

Alex
Avatar
jeffKotula #3
Member since Aug 2011 · 12 posts
Group memberships: Members, Premium
Show profile · Link to this post
Here's an example from my debug output (mix of sent and received xml, with my event handlers indicated by []). I produce this by sending a message immediately after calling connect without waiting for the SendPresenceHandler, which I generally take to mean "Ready for messaging":

[SendXmlHandler event]
<message to="jeffkotula@mrp.vrad.com/con" xmlns="jabber:client">
  <body>howdy</body>
</message>

[SendXmlHandler event]
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="mrp.vrad.com" version="1.0" >

[ReceiveXmlHandler event]
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="mrp.vrad.com" xml:lang="en-us" id="2833749a-9eac-49fb-b3c3-4e88f6eb30fa" xmlns="jabber:client" version="1.0" >

[ReceiveXmlHandler event]
<stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <auth xmlns="http://jabber.org/features/iq-auth" />
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
  </mechanisms>
</stream:features>

[StreamFeaturesHandler event]
[SendXmlHandler event]
<auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth>

[ReceiveXmlHandler event]
<error xmlns="urn:ietf:params:xml:ns:xmpp-streams">
  <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-streams" />
  <text xmlns="urn:ietf:params:xml:ns:xmpp-streams" xml:lang="en-US">Stream Not Authenticated</text>
</error>


[ReceiveXmlHandler event]
</stream:stream>

[SendXmlHandler event]
</stream:stream>

[CloseHandler event]
[ErrorHandler event]
This post was edited on 2012-12-14, 12:12 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
your test makes not much sense, because it sends the message before the xml stream got opened.

I have no problems to cause the OnStreamError event when I get the following xml:
  1. <stream:error xmlns:stream="http://etherx.jabber.org/streams">
  2.  <invalid-namespace xmlns="urn:ietf:params:xml:ns:xmpp-streams" />
  3. </stream:error>

in your debug you don't have the stream prefix on the error element which is weird.
Which server software are you testing against?

Alex
This post was edited on 2011-09-08, 21:44 by Alex.
Avatar
jeffKotula #5
Member since Aug 2011 · 12 posts
Group memberships: Members, Premium
Show profile · Link to this post
Coversant.
Avatar
Alex #6
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I can investigate this problem further in detail when you want.
I need a full socket trace (eg. Wireshark) of a session then. When you run a socket trace you should connect with StartTls set to false.

Alex
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: MatriX RSS