Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the XML-Stream CPAN distribution.

Report information
The Basics
Id: 17484
Status: resolved
Priority: 0/
Queue: XML-Stream

People
Owner: dapatrick [...] cpan.org
Requestors: hayter [...] usc.edu
kwilliams [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in:
  • 1.23
  • 1.23_01



Subject: XML::Stream error after auth with ejabberd server
Net-XMPP-1.0 XML-Stream-1.22 This is perl, v5.8.6 built for i686-linux Linux gaz 2.6.11-gentoo-r4 #1 Tue Mar 29 18:32:27 PST 2005 i686 Intel(R) Pentium(R) M processor 1.80GHz GenuineIntel GNU/Linux the examples/client.pl program has some sort of problem with ejabberd. the last few lines from debug are below, the full trace is attached, hostname of server changed to 'host.name.changed' to protect the innocent. not quite sure where to start looking for the problem. the bot account is working serverside (tested with Psi). ... XMPP::Conn: AuthSASL: We authed! XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='host.name.changed' from='gaz.localdomain' xml:lang='en' >) XML::Stream: Read: buff(<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4195037885' from='host.name.changed' version='1.0' xml:lang='en'>) XML::Stream: _handle_root: sid(4195037885) sax(XML::Stream::Parser=HASH(0x83fd6f4)) tag(stream:stream) att( xmlns:stream http://etherx.jabber.org/streams xmlns jabber:client version 1.0 from host.name.changed id 4195037885 xml:lang en ) Can't use an undefined value as a HASH reference at /usr/lib/perl5/site_perl/5.8.6/XML/Stream.pm line 1165.
Subject: xmpp_client-ejabberd.log
XML::Stream: new: hostname = (gaz.localdomain) XML::Stream: SetCallBacks: tag(node) func(CODE(0x84ff3e0)) XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x866a5a4)) XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x866a544)) XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x866a4e4)) XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns="urn:ietf:params:xml:ns:xmpp-tls"]) func(CODE(0x866c54c)) XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns="urn:ietf:params:xml:ns:xmpp-sasl"]) func(CODE(0x866c660)) XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x8666900)) XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x86685b4)) XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x86665c4)) XMPP::Conn: Connect: host(gir.usc.edu:5222) namespace(jabber:client) XMPP::Conn: Connect: timeout(10) XML::Stream: Connect: type(tcpip) XML::Stream: Connect: Got a connection XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gir.usc.edu' from='gaz.localdomain' xml:lang='en' >) XML::Stream: Read: buff(<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2721367672' from='gir.usc.edu' version='1.0' xml:lang='en'>) XML::Stream: _handle_root: sid(newconnection) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(stream:stream) att( xmlns:stream http://etherx.jabber.org/streams xmlns jabber:client version 1.0 from gir.usc.edu id 2721367672 xml:lang en ) XML::Stream: Read: buff(<stream:features><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></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features>) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(stream:features) att( ) XML::Stream: Node: _handle_element: check( -1 ) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(starttls) att( xmlns urn:ietf:params:xml:ns:xmpp-tls ) XML::Stream: Node: _handle_element: check( 0 ) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(starttls) XML::Stream: Node: _handle_close: check( 1 ) XML::Stream: Node: _handle_close: check2( 0 ) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanisms) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl ) XML::Stream: Node: _handle_element: check( 0 ) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanism) att( ) XML::Stream: Node: _handle_element: check( 1 ) XML::Stream: Node: _handle_cdata: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(DIGEST-MD5) XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(DIGEST-MD5) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanism) XML::Stream: Node: _handle_close: check( 2 ) XML::Stream: Node: _handle_close: check2( 1 ) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanism) att( ) XML::Stream: Node: _handle_element: check( 1 ) XML::Stream: Node: _handle_cdata: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(PLAIN) XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(PLAIN) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanism) XML::Stream: Node: _handle_close: check( 2 ) XML::Stream: Node: _handle_close: check2( 1 ) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(mechanisms) XML::Stream: Node: _handle_close: check( 1 ) XML::Stream: Node: _handle_close: check2( 0 ) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(register) att( xmlns http://jabber.org/features/iq-register ) XML::Stream: Node: _handle_element: check( 0 ) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(register) XML::Stream: Node: _handle_close: check( 1 ) XML::Stream: Node: _handle_close: check2( 0 ) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(stream:features) XML::Stream: Node: _handle_close: check( 0 ) XML::Stream: Node: _handle_close: check2( -1 ) XML::Stream: Process: block(0) XMPP::Conn: Connect: connection made XML::Stream: SetCallBacks: tag(node) func(CODE(0x866a55c)) XMPP::Conn: AuthSASL: shiney new auth XML::Stream: Send: (<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'></auth>) XMPP::Conn: AuthSASL: haven't authed yet... let's wait. XMPP::Conn: Process: timeout(1) XML::Stream: Read: buff(<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9IjQwMDUyNjI0NjMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(challenge) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl ) XML::Stream: Node: _handle_element: check( -1 ) XML::Stream: Node: _handle_cdata: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(bm9uY2U9IjQwMDUyNjI0NjMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=) XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(bm9uY2U9IjQwMDUyNjI0NjMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(challenge) XML::Stream: Node: _handle_close: check( 0 ) XML::Stream: Node: _handle_close: check2( -1 ) XML::Stream: Send: (<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>YXV0aHppZD0idGVzdGJvdEBnaXIudXNjLmVkdSIsY2hhcnNldD11dGYtOCxjbm9uY2U9ImU4NTNlYjg0NzEwOTljMjUyNjIxYzkzNzc4MWQ1MmViIixkaWdlc3QtdXJpPSIvIixuYz0wMDAwMDAwMSxub25jZT0iNDAwNTI2MjQ2MyIscW9wPWF1dGgscmVzcG9uc2U9MjU3NTYwNzA0NzgyNjA2YjUxZDM2ZmYxNTk1ODdhYjAsdXNlcm5hbWU9InRlc3Rib3Qi</response>) XML::Stream: Process: block(0) XMPP::Conn: AuthSASL: haven't authed yet... let's wait. XMPP::Conn: Process: timeout(1) XML::Stream: Read: buff(<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cnNwYXV0aD0zNzE2YzFkYTJlMTBlMzEwZWU2MTgyMTE4YzI5ODc5Nw==</challenge>) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(challenge) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl ) XML::Stream: Node: _handle_element: check( -1 ) XML::Stream: Node: _handle_cdata: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(cnNwYXV0aD0zNzE2YzFkYTJlMTBlMzEwZWU2MTgyMTE4YzI5ODc5Nw==) XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x86711dc)) cdata(cnNwYXV0aD0zNzE2YzFkYTJlMTBlMzEwZWU2MTgyMTE4YzI5ODc5Nw==) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(challenge) XML::Stream: Node: _handle_close: check( 0 ) XML::Stream: Node: _handle_close: check2( -1 ) XML::Stream: Send: (<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'></response>) XML::Stream: Process: block(0) XMPP::Conn: AuthSASL: haven't authed yet... let's wait. XMPP::Conn: Process: timeout(1) XML::Stream: Read: buff(<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>) XML::Stream: Node: _handle_element: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(success) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl ) XML::Stream: Node: _handle_element: check( -1 ) XML::Stream: Node: _handle_close: sid(2721367672) sax(XML::Stream::Parser=HASH(0x86711dc)) tag(success) XML::Stream: Node: _handle_close: check( 0 ) XML::Stream: Node: _handle_close: check2( -1 ) XML::Stream: Process: block(0) XMPP::Conn: AuthSASL: We authed! XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gir.usc.edu' from='gaz.localdomain' xml:lang='en' >) XML::Stream: Read: buff(<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2721367672' from='gir.usc.edu' version='1.0' xml:lang='en'>) XML::Stream: _handle_root: sid(2721367672) sax(XML::Stream::Parser=HASH(0x83fd70c)) tag(stream:stream) att( xmlns:stream http://etherx.jabber.org/streams xmlns jabber:client version 1.0 from gir.usc.edu id 2721367672 xml:lang en ) Can't use an undefined value as a HASH reference at /usr/lib/perl5/site_perl/5.8.6/XML/Stream.pm line 1165.
Changing delete($self->{SIDS}->{$currsid}); to delete($self->{SIDS}->{$currsid}) unless $currsid eq $sid; about line 1160 seems to fix the problem
From: n.hamaker [...] ic-s.nl
Confirming bug. It still has not been fixed. I get the error message using Net::Jabber when connecting to the jabber.xs4all.nl server and a MacOSX iChat/Jabber server.
--- /usr/local/groundwork/lib/perl5/site_perl/5.8.8/XML/Stream.pm 2007-05-02 10:22:46.000000000 +0200 +++ /root/Stream.pm.old 2007-05-02 10:24:25.000000000 +0200 @@ -1158,13 +1158,11 @@ { $self->{SOCKETS}->{$self->{SIDS}->{$currsid}->{sock}} = $sid; $self->{SOCKETS}->{*STDIN} = $sid; } - # delete($self->{SIDS}->{$currsid}); - # 08.04.05(Fri) slipstream@yandex.ru for compapility with ejabberd since it reuses stream id - delete($self->{SIDS}->{$currsid}) unless ($currsid eq $sid); + delete($self->{SIDS}->{$currsid}); if (exists($self->GetRoot($sid)->{version}) && ($self->GetRoot($sid)->{version} ne "")) { while(!$self->ReceivedStreamFeatures($sid))
Subject: Re: [rt.cpan.org #17484] XML::Stream error after auth with ejabberd server
Date: Wed, 2 May 2007 13:27:38 -0400
To: bug-Net-XMPP [...] rt.cpan.org
From: "Eric Hacker" <hacker [...] cpan.org>
On 5/2/07, Niels Hamaker via RT <bug-Net-XMPP@rt.cpan.org> wrote: Show quoted text
> > Queue: Net-XMPP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17484 > > > Confirming bug. It still has not been fixed. I get the error message > using Net::Jabber when connecting to the jabber.xs4all.nl server and a > MacOSX iChat/Jabber server. >
I took a look at the patch. It appears to apply to XML::Stream, which is a separate distribution from Net::XMPP or Net::Jabber. I do not have author rights to XML::Stream. The author, reatmon, seems to have abandoned all his projects. You are welcome to sign up at pause.perl.org to become an author and request the rights to make these changes yourself. I will not be able to do that anytime soon, if ever. I plan on moving my application to POE::Component::Client::Jabber at some point in the future. I also don't have access to close tickets in rt.cpan.org. I've asked for help and received no response. So I'm not going to use it for bug reports, though I haven't found an alternative yet. Regards, -- Eric Hacker, CISSP aptronym (AP-troh-NIM) noun A name that is especially suited to the profession of its owner I _can_ leave well enough alone, but my criteria for well enough is pretty darn high.
Subject: Re: [rt.cpan.org #17484] XML::Stream error after auth with ejabberd server
Date: Wed, 2 May 2007 13:27:38 -0400
To: bug-Net-XMPP [...] rt.cpan.org
From: "Eric Hacker" <hacker [...] cpan.org>
On 5/2/07, Niels Hamaker via RT <bug-Net-XMPP@rt.cpan.org> wrote: Show quoted text
> > Queue: Net-XMPP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17484 > > > Confirming bug. It still has not been fixed. I get the error message > using Net::Jabber when connecting to the jabber.xs4all.nl server and a > MacOSX iChat/Jabber server. >
I took a look at the patch. It appears to apply to XML::Stream, which is a separate distribution from Net::XMPP or Net::Jabber. I do not have author rights to XML::Stream. The author, reatmon, seems to have abandoned all his projects. You are welcome to sign up at pause.perl.org to become an author and request the rights to make these changes yourself. I will not be able to do that anytime soon, if ever. I plan on moving my application to POE::Component::Client::Jabber at some point in the future. I also don't have access to close tickets in rt.cpan.org. I've asked for help and received no response. So I'm not going to use it for bug reports, though I haven't found an alternative yet. Regards, -- Eric Hacker, CISSP aptronym (AP-troh-NIM) noun A name that is especially suited to the profession of its owner I _can_ leave well enough alone, but my criteria for well enough is pretty darn high.
Subject: Re: [rt.cpan.org #17484] XML::Stream error after auth with ejabberd server
Date: Wed, 2 May 2007 13:27:38 -0400
To: bug-Net-XMPP [...] rt.cpan.org
From: "Eric Hacker" <hacker [...] cpan.org>
On 5/2/07, Niels Hamaker via RT <bug-Net-XMPP@rt.cpan.org> wrote: Show quoted text
> > Queue: Net-XMPP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17484 > > > Confirming bug. It still has not been fixed. I get the error message > using Net::Jabber when connecting to the jabber.xs4all.nl server and a > MacOSX iChat/Jabber server. >
I took a look at the patch. It appears to apply to XML::Stream, which is a separate distribution from Net::XMPP or Net::Jabber. I do not have author rights to XML::Stream. The author, reatmon, seems to have abandoned all his projects. You are welcome to sign up at pause.perl.org to become an author and request the rights to make these changes yourself. I will not be able to do that anytime soon, if ever. I plan on moving my application to POE::Component::Client::Jabber at some point in the future. I also don't have access to close tickets in rt.cpan.org. I've asked for help and received no response. So I'm not going to use it for bug reports, though I haven't found an alternative yet. Regards, -- Eric Hacker, CISSP aptronym (AP-troh-NIM) noun A name that is especially suited to the profession of its owner I _can_ leave well enough alone, but my criteria for well enough is pretty darn high.
Subject: Authorization fails, "Can't use an undefined value as a HASH reference"
When I do the following: my $Connection = Net::Jabber::Client->new(); my $status = $Connection->Connect(hostname=>$server) or die "Can't connect: $!"; my @result = $Connection->AuthSend(username=>$username, password=>$password, resource=>$resource, ); I get the error: Can't use an undefined value as a HASH reference at /Library/Perl/5.8.6/XML/Stream.pm line 1165. at /Library/Perl/5.8.6/XML/Stream.pm line 1165 XML::Stream::OpenStream('XML::Stream=HASH(0xc32d58)', '5ae5ea8b') called at /Library/Perl/5.8.6/Net/XMPP/Protocol.pm line 1999 Net::XMPP::Protocol::AuthSASL('Net::Jabber::Client=HASH(0xc4c054)') called at /Library/Perl/5.8.6/Net/XMPP/Protocol.pm line 1809 Net::XMPP::Protocol::AuthSend('Net::Jabber::Client=HASH(0xc4c054)') called at /Users/u0048513/bin/jabber.pl line 34 Line 34 of jabber.pl is the $Connection->AuthSend(...) line. Using the debugger on XML::Stream, it looks like $self->GetRoot($sid) is returning undef - indeed, the only entry in $self->{SIDS} at this point is 'default'. Not sure what that means.
I forgot to add: I'm using version 2.0 of Net::Jabber and 1.22 of XML::Stream. Both look like they're the latest versions. Perl is v5.8.8 built for darwin-thread-multi-2level . -Ken
I've checked in a fix based on Peter Sinnott's comment.  Feel free to clone and test from http://github.com/dap/XML-Stream. I will close this ticket as resolved one week from now if I don't see any more comments.
This is a duplicate of #17484 which has been fixed in the latest development release of XML::Stream (1.23_01).