Opened 5 years ago

Closed 5 years ago

#6906 closed defect (fixed)

Can't connect to some MUC that are in the contact list

Reported by: eMerzh Owned by:
Priority: normal Milestone: 0.15
Component: None Version: 0.14.2
Severity: normal Keywords: muc
Cc: mschmidt@… Blocked By:
Blocking: OS: All

Description

Bug description

Hello , I've some MUCs i use that have a "-" in the name. like darwin-dev@…

Since the version 14.2 i can't connect anymore to this room (in bookmark or with a regular join )

but i can with the version 14.1

Steps to reproduce

Try to join the given room

Software versions

OS version: Arch Linux 2.6.38 GTK version: 2.24.4 PyGTK version: 2.24.0

Attachments (1)

gajim.vc.diff (877 bytes) - added by Dicson 5 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 5 years ago by Dicson

I can not reproduce,works fine for me

comment:2 Changed 5 years ago by eMerzh

can you try to go to darwin-dev at conference.jabber.bmaron.net ? i can't with the last version (and only the last)

comment:3 Changed 5 years ago by asterix

  • Status changed from new to needinfo

no problem for me either with 0.14.2 release.

comment:4 Changed 5 years ago by eMerzh

  • Status changed from needinfo to new

mmh... the problem still occurs and i'm pretty sur it's the update... the error message is : ...This is not a valid room name...

i've tried to connect with another account (google) to the same room (darwin...) and i got a trace back but got connected..

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/idlequeue.py", line 530, in _process_events
    return IdleQueue._process_events(self, fd, flags)
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/idlequeue.py", line 400, in _process_events
    obj.pollin()
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/transports_nb.py", line 414, in pollin
    self._do_receive()
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/transports_nb.py", line 600, in _do_receive
    self._on_receive(received)
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/transports_nb.py", line 614, in _on_receive
    self.on_receive(data)
  File "/usr/lib/python2.7/site-packages/gajim/common/xmpp/dispatcher_nb.py", line 452, in dispatch
    handler['func'](session, stanza)
  File "/usr/lib/python2.7/site-packages/gajim/common/connection_handlers.py", line 1619, in _messageCB
    jid, invite, tim)
  File "/usr/lib/python2.7/site-packages/gajim/common/connection_handlers.py", line 1627, in _on_message_decrypted
    self.dispatch_gc_message(msg, frm, msgtxt, jid, tim)
  File "/usr/lib/python2.7/site-packages/gajim/common/connection_handlers.py", line 1759, in dispatch_gc_message
    msg.getXHTML(), statusCode, displaymarking, captcha))
  File "/usr/lib/python2.7/site-packages/gajim/common/connection.py", line 177, in dispatch
    gajim.ged.raise_event(event, self.name, data)
  File "/usr/lib/python2.7/site-packages/gajim/common/ged.py", line 67, in raise_event
    handler(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/gajim/gui_interface.py", line 988, in handle_event_gc_msg
    displaymarking=array[6], captcha=array[7])
  File "/usr/lib/python2.7/site-packages/gajim/groupchat_control.py", line 859, in on_message
    self.print_old_conversation(msg, nick, tim, None, displaymarking=displaymarking)
  File "/usr/lib/python2.7/site-packages/gajim/groupchat_control.py", line 931, in print_old_conversation
    displaymarking=displaymarking)
  File "/usr/lib/python2.7/site-packages/gajim/chat_control.py", line 846, in print_conversation_line
    displaymarking=displaymarking)
  File "/usr/lib/python2.7/site-packages/gajim/conversation_textview.py", line 1236, in print_conversation_line
    timestamp_str = self.get_time_to_show(tim)
  File "/usr/lib/python2.7/site-packages/gajim/conversation_textview.py", line 1309, in get_time_to_show
    diff_day, {'nb_days': diff_day}, {'nb_days': diff_day})
  File "/usr/lib/python2.7/site-packages/gajim/common/i18n.py", line 101, in ngettext
    text = text % replace_plural
TypeError: %d format: a number is required, not dict

Last edited 5 years ago by eMerzh (previous) (diff)

comment:5 follow-up: Changed 5 years ago by eMerzh

  • Summary changed from Can't connect to some MUC with "-" to Can't connect to some MUC that are in the contact list

Thanks to LubomirR, (he has the same pbm as i have...) he found that the problem is in fact if the muc is in the contact list.

so removing the test about muc in the roster does the trick

I need to comment these lines in src/dialogs.py and src/gui_interface.py :

#        if gajim.contacts.get_contact(self.account, room_jid):
#            ErrorDialog(_('This is not a group chat'),
#                _('%s is not the name of a group chat.') % room_jid)
#            return

About the traceback it seems to be a pbm with translation in fr.po ==>

--- a/po/fr.po  Sun Jun 19 21:19:20 2011 +0200
+++ b/po/fr.po  Tue Jun 21 00:30:07 2011 +0200
@@ -6813,9 +6813,9 @@
 #: ../src/conversation_textview.py:1296
 #, python-format
 msgid "Yesterday"
-msgid_plural "%i days ago"
+msgid_plural "%(nb_days)i days ago"
 msgstr[0] "Hier"
-msgstr[1] "Il y a %i jours"
+msgstr[1] "Il y a %(nb_days)i jours"

comment:6 Changed 5 years ago by x3al

Workaround: View-Show offline contacts, remove room from roster.

comment:7 Changed 5 years ago by eMerzh

yep it works...

comment:8 in reply to: ↑ 5 Changed 5 years ago by Dicson

Replying to eMerzh:

Thanks to LubomirR, (he has the same pbm as i have...) he found that the problem is in fact if the muc is in the contact list.

so removing the test about muc in the roster does the trick

I need to comment these lines in src/dialogs.py and src/gui_interface.py :

#        if gajim.contacts.get_contact(self.account, room_jid):
#            ErrorDialog(_('This is not a group chat'),
#                _('%s is not the name of a group chat.') % room_jid)
#            return

I have this error dialog if:

1 join to Muc

2 minimize this muc to roster

3 try join again from bookmarks


Patch attached

Changed 5 years ago by Dicson

comment:9 Changed 5 years ago by asterix

traceback is fixed in [4f267c122997]

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

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

(In [2b6d2460a2b6]) fix error dialog. Fixes #6906

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

  • Milestone changed from 0.15 to 0.14.3

(In [93a3916f2788]) fix error dialog. Fixes #6906

comment:12 Changed 5 years ago by asterix

  • Milestone changed from 0.14.3 to 0.14.4

comment:13 Changed 5 years ago by Fomin Denis <fominde@…>

  • Milestone changed from 0.14.4 to 0.15

(In [e5d88e75800c]) Fixes #6906 again

comment:14 Changed 5 years ago by Fomin Denis <fominde@…>

(In [0dad513e58f5]) Fix #6906 again. is_groupchat() are not working as it should. it checks whether the gc connected(is_groupchat_connected()).

comment:15 Changed 5 years ago by Fomin Denis <fominde@…>

(In [1628af81d67b]) Fixes #6906 again

comment:16 Changed 5 years ago by Dicson

I think I do wrong commits... I do not know how detect what is muc jid. Maybe search 'conference' in the jid?

comment:17 Changed 5 years ago by Dicson

see #5799

comment:18 Changed 5 years ago by asterix

there is no way to know if it's a groupchat except getting the "conference.xxx.com" part, run a disco query on it. So I this this "simple" is_groupchat test is enough. if we already have it in roster but not connect, Gajim will connect to it and we'll have a strang behaviour, but no crash.

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

(In [1cc46e8181b2]) go back with is_groupchat() to detect groupchats. see #6906

comment:20 Changed 5 years ago by Dicson

It would be nice to forbid the addition room to the roster

comment:21 Changed 5 years ago by asterix

this require to do a disco query when we add a JID. And that doesn't prevent to add them with another client :/

comment:22 Changed 5 years ago by michich

  • Cc mschmidt@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

A Fedora user reported that he's seeing the problem with 0.15 beta2 and that commenting out the lines mentioned in comment 5 is still necessary: https://bugzilla.redhat.com/show_bug.cgi?id=750445

comment:23 Changed 5 years ago by asterix

  • Resolution set to fixed
  • Status changed from reopened to closed

Because he has groupchats in its roster, which it shouldn't.

Note: See TracTickets for help on using tickets.