errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.13k stars 616 forks source link

MUC not working #117

Closed zahnp4sta closed 11 years ago

zahnp4sta commented 11 years ago

i cant connect muc, because CHATROOM_PRESENCE is not parsed correctly.

:(presence xmlns="jabber:client" to="a/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="./bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="./bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="./bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to=",/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Join room X INFO:(presence xmlns="jabber:client" to="X/bot")(c xmlns="http://jabber.org/protocol/caps" node="http://hipchat.com/client/bot" ver="v1.1.0" /)(x xmlns="http://jabber.org/protocol/muc" /)(/presence) INFO:Plugin activation done. ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="5" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="/bot" id="6" type="error")(error code="400" type="modify")(jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="7" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="8" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="9" type="error")(error code="400" type="modify")(jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="10" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="11" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="12" type="error")(error code="400" type="modify")(jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="13" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="14" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="15" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="16" type="error")(error code="400" type="modify")(jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="17" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="18" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="19" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="20" type="error")(error code="400" type="modify")(jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="21" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="22" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="23" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence) ERROR:Presence Error: (presence xmlns="jabber:client" to="zahnb0t@xx.xx.xx.xx/JabberBot" from="X/bot" id="24" type="error")(error code="404" type="cancel")(remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /)(/error)(/presence)

zoni commented 11 years ago

What is the value of CHATROOM_PRESENCE in your config.py? I suspect you've got a string there, rather than a tuple, so it will see each character in your CHATROOM_PRESENCE as a separate room to join.

(That , on the end in the example config is significant. If you have only one room to join, you need to keep that , at the end so python makes it a tuple and not a string.)

zahnp4sta commented 11 years ago

Hey,

thanks for your response. I have a tuple and there is a , the end. But its still not working.

zoni commented 11 years ago

Hmmm. Which version of Err are you running? Did you install from pypi or are you running the latest directly from git?

Is there any chance you could supply your config.py (with password blanked out, of course :))? Feel free to email me on zoni@zoni.nl if you'd rather not have it be entirely public.

zoni commented 11 years ago

I've made a little bit of progress with this so far. This is happening with Python2.7, but not with Python 3.2 (Or any other version of 3.x, I'm willing to bet.)

I haven't traced the issue down to it's root yet, though.

zoni commented 11 years ago

Hi guys,

A fix is in the pipeline. Until then, you can also work around this issue manually by changing your config.py slightly. In your CHATROOM_PRESENCE, make all strings unicode strings instead, like so:

CHATROOM_PRESENCE = (u'room@conference.domain.tld',)