Problem with cl-xmpp

Discussion of Common Lisp

Problem with cl-xmpp

Postby Gopher » Sat Nov 30, 2013 12:07 am

Code: Select all
[1]> (ql:quickload "cl-xmpp")
To load "cl-xmpp":
  Load 1 ASDF system:
    cl-xmpp
; Loading "cl-xmpp"
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
 yes, using code points.
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
 yes, using code points.
;;; Building Closure with CHARACTER RUNES
.
("cl-xmpp")
[2]> (defvar *connection* (xmpp:connect :hostname "jabber.at"))
<?xml version='1.0' ?><stream:stream to='jabber.at' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
UNHANDLED: #<XML-ELEMENT STREAM:STREAM (6attr:0child:0data) #x2120E07E>
UNHANDLED: #<XML-ELEMENT STREAM:FEATURES (0attr:5child:0data) #x212356FE>
*CONNECTION*
[3]> (xmpp:auth *connection* "rcbot" "mypassword" "home")
<iq id="auth2" type="set"><query xmlns="jabber:iq:auth"><username>rcbot</username><password>mypassword</password><resource>home</resource></query></iq>
Name: TEXT
Unable to find error class for NIL.
UNHANDLED: #<XMPP-PROTOCOL-ERROR code:NIL name:NIL #x21264536>

*** - Received error.
The following restarts are available:
ABORT          :R1      Abort main loop
Break 1 [4]>


I know getting help with a specific library is a long shot, but any ideas? I'm tempted to set up a helper demon in another language to handle the xmpp side of things.
Gopher
 
Posts: 18
Joined: Mon Nov 25, 2013 1:01 am

Re: Problem with cl-xmpp

Postby edgar-rft » Sat Nov 30, 2013 4:26 am

I have no specific knowledge about cl-xmpp, but as you already have discovered yourself the "Unable to find error class for NIL." message is not really helpful. If you type :bt (for "backtrace") after the break prompt, then Clisp should print the call stack (the functions that were called before the error), so maybe you can find out where exactly the real error happened:

Code: Select all
Break 1 [4]> :bt

The keywords and commands that can be used in the Clisp break loop are described under:

- edgar
edgar-rft
 
Posts: 157
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: Problem with cl-xmpp

Postby Gopher » Sat Nov 30, 2013 4:58 am

Ok, thanks. I'll try to figure out what this means. If anyone else wants to take a stab at it:

Code: Select all
Break 1 [4]> :bt
<1/182> #<SYSTEM-FUNCTION SHOW-STACK> 3
<2/175> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE>
<3/169> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE>
<4/160> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> 2
<5/157> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-3>
<6/153> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> 2
<7/139> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2>
<8/137> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
<9/97> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP>
<10/94> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1
<11/84> #<SYSTEM-FUNCTION ERROR>
<12/80>
#<COMPILED-FUNCTION
  #:|305 318 (DEFMETHOD RECEIVE-STANZA (# &KEY # ...) ...)-30-1-1-1|>
<13/75>
#<COMPILED-FUNCTION
  #:|305 318 (DEFMETHOD RECEIVE-STANZA (# &KEY # ...) ...)-30-1-1|>
<14/71> #<COMPILED-FUNCTION CL-XMPP::RECEIVE-STANZA-<EMF-1>-1>
<15/69> #<STANDARD-GENERIC-FUNCTION CL-XMPP:RECEIVE-STANZA>
<16/65>
#<COMPILED-FUNCTION
  #:|486 491 (DEFMETHOD %PLAIN-AUTH% (# USERNAME PASSWORD ...) ...)-46-1-1|>
<17/65> #<STANDARD-GENERIC-FUNCTION CL-XMPP::%PLAIN-AUTH%>
<18/65> #<STANDARD-GENERIC-FUNCTION CL-XMPP::%PLAIN-AUTH%>
<19/59>
#<COMPILED-FUNCTION
  #:|465 484 (DEFMETHOD AUTH (# USERNAME PASSWORD ...) ...)-45-1-1-1|>
<20/50>
#<COMPILED-FUNCTION
  #:|465 484 (DEFMETHOD AUTH (# USERNAME PASSWORD ...) ...)-45-1-1|>
<21/43> #<COMPILED-FUNCTION CL-XMPP::AUTH-<EMF-1>-1>
<22/40> #<STANDARD-GENERIC-FUNCTION CL-XMPP:AUTH>
<23/40> #<STANDARD-GENERIC-FUNCTION CL-XMPP:AUTH>
[34] EVAL frame for form (CL-XMPP:AUTH *CONNECTION* "rcbot" "mypassword" "home")
Printed 23 frames
Break 1 [4]>
Gopher
 
Posts: 18
Joined: Mon Nov 25, 2013 1:01 am

Re: Problem with cl-xmpp

Postby edgar-rft » Sat Nov 30, 2013 8:11 am

Just because I was curious I have installed cl-xmpp (SBCL 1.1.13 on Debian 7.1 Wheezy) and found that I can connect to "jabber.org" with no further problems:

Code: Select all
CL-USER> (defvar *connection* (xmpp:connect :hostname "jabber.org"))
<?xml version='1.0' ?><stream:stream to='jabber.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
UNHANDLED: #<XML-ELEMENT STREAM:STREAM (5attr:0child:0data) {100C065B03}>
UNHANDLED: #<XML-ELEMENT STREAM:FEATURES (0attr:2child:0data) {100C069C03}>
#<CL-XMPP:CONNECTION to jabber.org:5222 (open) {100BF32E63}>

CL-USER> (xmpp:auth *connection* "rcbot" "mypassword" "home")
<iq id="auth2" type="set"><query xmlns="jabber:iq:auth"><username>rcbot</username><password>mypassword</password><resource>home</resource></query></iq>
UNHANDLED: #<XMPP-PROTOCOL-ERROR-AUTH code:401 name:NOT-AUTHORIZED {100C27E263}>
#<XMPP-PROTOCOL-ERROR-AUTH code:401 name:NOT-AUTHORIZED {100C27E263}>

Ok, the authorisation was refused, but I got no error. But if I try to connect to "jabber.at" I get exactly the same error as Gopher above:

Code: Select all
CL-USER> (setf *connection* (xmpp:connect :hostname "jabber.at"))
<?xml version='1.0' ?><stream:stream to='jabber.at' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
UNHANDLED: #<XML-ELEMENT STREAM:STREAM (6attr:0child:0data) {1008571593}>
UNHANDLED: #<XML-ELEMENT STREAM:FEATURES (0attr:5child:0data) {1008E17B63}>
*CONNECTION*

CL-USER> (xmpp:auth *connection* "rcbot" "mypassword" "home")
<iq id="auth2" type="set"><query xmlns="jabber:iq:auth"><username>rcbot</username><password>mypassword</password><resource>home</resource></query></iq>
Name: TEXT
Unable to find error class for NIL.
UNHANDLED: #<XMPP-PROTOCOL-ERROR code:NIL name:NIL {100BCA37D3}>

Received error.
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {1004F88063}>)

Backtrace:
  0: ((:METHOD CL-XMPP:RECEIVE-STANZA (CL-XMPP:CONNECTION)) #<CL-XMPP:CONNECTION to jabber.at:5222 (open) {100CAC5683}> :STANZA-CALLBACK CL-XMPP::DEFAULT-STANZA-CALLBACK :DOM-REPR NIL) [fast-method]
  1: ((:METHOD CL-XMPP:AUTH (CL-XMPP:CONNECTION T T T)) #<CL-XMPP:CONNECTION to jabber.at:5222 (open) {100CAC5683}> "rcbot" "mypassword" "home" :MECHANISM :PLAIN :BIND-ET-AL T :SEND-PRESENCE T) [fast-metho..
  2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CL-XMPP:AUTH *CONNECTION* "rcbot" "mypassword" "home") #<NULL-LEXENV>)
  3: (EVAL (CL-XMPP:AUTH *CONNECTION* "rcbot" "mypassword" "home"))
 --more--

Maybe jabber.at uses a protocol (or some details) that are not supported by cl-xmpp? Have you tried other servers than jabber.at?

- edgar
edgar-rft
 
Posts: 157
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: Problem with cl-xmpp

Postby Gopher » Sun Dec 01, 2013 12:02 am

I also tried xmpp.dukgo.com . I'll try jabber.org in a little bit.
Gopher
 
Posts: 18
Joined: Mon Nov 25, 2013 1:01 am

Re: Problem with cl-xmpp

Postby Gopher » Sun Dec 01, 2013 12:21 am

I'm getting the same result as you when I try to connect to jabber.org, but I'm not able to register an account to see if it's actually working past that stage.
Gopher
 
Posts: 18
Joined: Mon Nov 25, 2013 1:01 am


Return to Common Lisp

Who is online

Users browsing this forum: Google [Bot], logxor and 1 guest

cron