Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6995 closed defect (fixed)

InvalidFormat: Invalid character in resource.

Reported by: jbebel Owned by:
Priority: normal Milestone: 0.15
Component: None Version: 0.14.4
Severity: normal Keywords:
Cc: Blocked By:
Blocking: OS: All


Bug description

Over time, I occasionally see the following error in Gajim:

Traceback (most recent call last):

File "/usr/share/gajim/src/common/xmpp/", line 533, in _process_events

return IdleQueue?._process_events(self, fd, flags)

File "/usr/share/gajim/src/common/xmpp/", line 394, in _process_events


File "/usr/share/gajim/src/common/xmpp/", line 414, in pollin


File "/usr/share/gajim/src/common/xmpp/", line 600, in _do_receive


File "/usr/share/gajim/src/common/xmpp/", line 614, in _on_receive


File "/usr/share/gajim/src/common/xmpp/", line 452, in dispatch

handlerfunc?(session, stanza)

File "/usr/share/gajim/src/common/", line 256, in _DiscoverInfoGetCB

if self.commandInfoQuery(con, iq_obj):

File "/usr/share/gajim/src/common/", line 374, in commandInfoQuery

jid = helpers.get_full_jid_from_iq(iq_obj)

File "/usr/share/gajim/src/common/", line 867, in get_full_jid_from_iq

return parse_jid(str(iq_obj.getFrom()))

File "/usr/share/gajim/src/common/", line 103, in parse_jid

return prep(*decompose_jid(jidstring))

File "/usr/share/gajim/src/common/", line 169, in prep

raise InvalidFormat?, _('Invalid character in resource.')

InvalidFormat?: Invalid character in resource.

I have a log file, but as it sometimes takes a while for it to show up, the log file is quite substantial. I don't see the actual traceback anywhere in the log, so I can't narrow down when the events actually occur. Any suggestions on how to determine relevant events in the log file would be accepted.

Steps to reproduce

I rarely see it happen. Mostly I find several instances of the error when I return to my computer, and with no timestamp on the error, I don't know when.

Software versions

OS version: Ubuntu 10.04
GTK version: 2.20.1
PyGTK version: 2.17.0

Change History (7)

comment:1 Changed 5 years ago by asterix

The easiest way would be to add a "print str(iq_obj)" in Gajim sources, just before line 374 in /usr/share/gajim/src/common/

comment:2 Changed 5 years ago by jbebel

Well, I added that line, but it didn't seem to print anything right when the error occurred. After the error occurred, I disconnected, and then it printed 4 lines. One of them included a resource which looked like this: "•͡˘㇁•͡˘CC56DB03" The id was "iChat_5760C17D"

After logging back in, that user does not appear online, although he does in gmail, looking at the same account. Is this an invalid resource? If so, it should probably be handled better.

comment:3 Changed 5 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.15
  • Resolution set to fixed
  • Status changed from new to closed

(In [85c130b04f55]) print warning instead of traceback when we get a commands request from an invalid JID. Fixes #6995

comment:4 Changed 5 years ago by asterix

It's indeed an invalid resource. It contains the '㇁' char (0x31C1), which is in A1 table of stringprep

comment:5 Changed 5 years ago by Yann Leboulanger <asterix@…>

(In [3e4932e1d12f]) print warning instead of traceback when we get a commands request from an invalid JID. Fixes #6995

comment:6 Changed 5 years ago by jbebel

FYI, I spoke to the owner of the account in question. He says the strange characters are the machine name of his Mac. Apparently iChat uses the machine name for part of the resource. That sounds like a bug in iChat for allowing a machine name of invalid characters to become part of the resource.

comment:7 Changed 5 years ago by asterix

yes indeed. If you can report that to iChat, that would be nice

Note: See TracTickets for help on using tickets.