From jfranz at bsdprojects.net Mon Sep 10 16:16:51 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Mon, 10 Sep 2007 18:16:51 +0200 Subject: [cl-xmpp-devel] bug? Message-ID: <20070910161651.GA15726@penrose.bsdprojects.net> Hi, foremost thanks for cl-xmpp! I'm new to CL and am pleased to see there is already an XMPP lib. However, I experienced a problem on the first try, see below. The session and backtrace is in http://paste.lisp.org/display/47523 Any help is welcome. % sbcl --version SBCL 1.0.9 CL-USER> (defvar *connection* (xmpp:connect :hostname "jabber.org")) when called with arguments (#S(CL-XMPP::SLOW-STREAM :TARGET #)). [Condition of type SIMPLE-ERROR] Regards, j. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: From david at lichteblau.com Mon Sep 10 16:47:41 2007 From: david at lichteblau.com (David Lichteblau) Date: Mon, 10 Sep 2007 18:47:41 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910161651.GA15726@penrose.bsdprojects.net> References: <20070910161651.GA15726@penrose.bsdprojects.net> Message-ID: <20070910164741.GA8553@radon> Quoting Johann Franz (jfranz at bsdprojects.net): > Hi, foremost thanks for cl-xmpp! I'm new to CL and am pleased to see > there is already an XMPP lib. Which version of cl-xmpp did you test? While it is true that I never implemented RUNES::XSTREAM/CLOSE, possibly causing a follow-up error if something else goes wrong, the stacktrace in your paste does not seem to match what cl-xmpp CVS does. d. From jfranz at bsdprojects.net Mon Sep 10 17:24:21 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Mon, 10 Sep 2007 19:24:21 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910164741.GA8553@radon> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> Message-ID: <20070910172421.GB15726@penrose.bsdprojects.net> On Mon, Sep 10, 2007 at 06:47:41PM +0200, David Lichteblau wrote: > Which version of cl-xmpp did you test? This is whatever version is in http://common-lisp.net/project/cl-xmpp/cl-xmpp_latest.tar.gz, which is being fetched by asdf-install. Thanks, I've tried CVS right now and the error magically disappeared. Maybe update the snapshot on common-lisp.net? Regards, j. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: From jfranz at bsdprojects.net Mon Sep 10 21:45:36 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Mon, 10 Sep 2007 23:45:36 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910164741.GA8553@radon> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> Message-ID: <20070910214536.GC15726@penrose.bsdprojects.net> Seems this isn't out of the woods yet. With the CVS checkout I still get the error, this time with (xmpp:auth *connection* "username" "password" "resource") http://paste.lisp.org/display/47540 Any idea? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: From david at lichteblau.com Mon Sep 10 22:01:36 2007 From: david at lichteblau.com (David Lichteblau) Date: Tue, 11 Sep 2007 00:01:36 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910214536.GC15726@penrose.bsdprojects.net> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> Message-ID: <20070910220136.GB8553@radon> Quoting Johann Franz (jfranz at bsdprojects.net): > Seems this isn't out of the woods yet. > With the CVS checkout I still get the error, this time with > (xmpp:auth *connection* "username" "password" "resource") > > http://paste.lisp.org/display/47540 The error basically means "end of file". I do not usually work on CL-XMPP, so I do not have a username and password for any server to try what happens at the end of a successful conversation. But if you get this error in AUTH, it most certainly means that you waited too long between CONNECT and AUTH, so the server timed out and closed the socket (or are using an older *connection* object, which can happen easily when using defvar instead of defparameter by accident). If you still get the error in any other situation, try adding this at the end of cl-xmpp/cxml.lisp: (in-package :xmpp) (defmethod runes::xstream/close ((stream slow-stream)) (close (slow-stream-target stream))) You will then get a CXML:WELL-FORMEDNESS-VIOLATION instead of the "no applicable method" error. From jfranz at bsdprojects.net Mon Sep 10 22:34:55 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Tue, 11 Sep 2007 00:34:55 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910220136.GB8553@radon> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> <20070910220136.GB8553@radon> Message-ID: <20070910223455.GD15726@penrose.bsdprojects.net> On Tue, Sep 11, 2007 at 12:01:36AM +0200, David Lichteblau wrote: > The error basically means "end of file". > > I do not usually work on CL-XMPP, so I do not have a username and > password for any server to try what happens at the end of a successful > conversation. If you have a Jabber account already you can also use the very same account with different priority (given you have spare time and will of course). > But if you get this error in AUTH, it most certainly means that you > waited too long between CONNECT and AUTH, so the server timed out and > closed the socket (or are using an older *connection* object, which can > happen easily when using defvar instead of defparameter by accident). Wish this was true, but I checked and it doesn't seem to be the problem. > If you still get the error in any other situation, try adding this at > the end of cl-xmpp/cxml.lisp: > > (in-package :xmpp) > (defmethod runes::xstream/close ((stream slow-stream)) > (close (slow-stream-target stream))) > > You will then get a CXML:WELL-FORMEDNESS-VIOLATION instead of the "no > applicable method" error. This gives a SIMPLE-ERROR (XML-NOT-WELL-FORMED from the server) Well, thank you so far, David. Sorry that I can't be of any further help code-wise as I'm new to all this. Regards, j. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: From david at lichteblau.com Mon Sep 10 23:42:23 2007 From: david at lichteblau.com (David Lichteblau) Date: Tue, 11 Sep 2007 01:42:23 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910223455.GD15726@penrose.bsdprojects.net> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> <20070910220136.GB8553@radon> <20070910223455.GD15726@penrose.bsdprojects.net> Message-ID: <20070910234222.GC8553@radon> Quoting Johann Franz (jfranz at bsdprojects.net): > This gives a SIMPLE-ERROR (XML-NOT-WELL-FORMED from the server) Ah, that is an unrelated issue. Recent versions of cxml default to non-canonical output, which always writes an XML declaration an the beginning of the document. Since CL-XMPP creates a new sink for each stanza (not quite sure why) it ends up writing XML declarations in the middle of the stream. Please try the attached patch. (The patch also removes cxml.lisp.) -------------- next part -------------- A non-text attachment was scrubbed... Name: remove-cxml-dot-lisp.diff Type: text/x-diff Size: 1686 bytes Desc: not available URL: From jfranz at bsdprojects.net Tue Sep 11 00:32:32 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Tue, 11 Sep 2007 02:32:32 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070910234222.GC8553@radon> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> <20070910220136.GB8553@radon> <20070910223455.GD15726@penrose.bsdprojects.net> <20070910234222.GC8553@radon> Message-ID: <20070911003232.GE15726@penrose.bsdprojects.net> On Tue, Sep 11, 2007 at 01:42:23AM +0200, David Lichteblau wrote: > Please try the attached patch. (The patch also removes cxml.lisp.) OK, now I get The bounding indices 0 and 2 are bad for a sequence of length 1. [Condition of type SB-KERNEL:BOUNDING-INDICES-BAD-ERROR] http://paste.lisp.org/display/47549 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: From david at lichteblau.com Tue Sep 11 01:25:54 2007 From: david at lichteblau.com (David Lichteblau) Date: Tue, 11 Sep 2007 03:25:54 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070911003232.GE15726@penrose.bsdprojects.net> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> <20070910220136.GB8553@radon> <20070910223455.GD15726@penrose.bsdprojects.net> <20070910234222.GC8553@radon> <20070911003232.GE15726@penrose.bsdprojects.net> Message-ID: <20070911012554.GD8553@radon> Quoting Johann Franz (jfranz at bsdprojects.net): > The bounding indices 0 and 2 are bad for a sequence of length 1. > [Condition of type SB-KERNEL:BOUNDING-INDICES-BAD-ERROR] Sorry about that. You also need need cxml from CVS. From jfranz at bsdprojects.net Tue Sep 11 03:10:42 2007 From: jfranz at bsdprojects.net (Johann Franz) Date: Tue, 11 Sep 2007 05:10:42 +0200 Subject: [cl-xmpp-devel] bug? In-Reply-To: <20070911012554.GD8553@radon> References: <20070910161651.GA15726@penrose.bsdprojects.net> <20070910164741.GA8553@radon> <20070910214536.GC15726@penrose.bsdprojects.net> <20070910220136.GB8553@radon> <20070910223455.GD15726@penrose.bsdprojects.net> <20070910234222.GC8553@radon> <20070911003232.GE15726@penrose.bsdprojects.net> <20070911012554.GD8553@radon> Message-ID: <20070911031042.GF15726@penrose.bsdprojects.net> On Tue, Sep 11, 2007 at 03:25:54AM +0200, David Lichteblau wrote: > Sorry about that. You also need need cxml from CVS. OK, with cl-xmpp and cxml from CVS + your patch it works for my account at jabber.ccc.de I can authenticate, send messages, et cetera! With jabber.org though I get Document not well-formed: Bad nesting. "stream:stream" / (:EOF) [Condition of type CXML:WELL-FORMEDNESS-VIOLATION] http://paste.lisp.org/display/47552 This is a known issue with ejabberd I guess? ( http://common-lisp.net/pipermail/cl-xmpp-devel/2007-March/000067.html ) Regards, j. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: