Adium

Opened 15 years ago

Closed 12 years ago

#1874 closed defect (fixed)

After 409 Conflict error, it's impossible to join the same Jabber group chat

Reported by: fenner@fenron.com Owned by: evands
Milestone: Adium 1.3 Component: Service/XMPP (Jabber)
Version: Severity: major
Keywords: WasOn1.5 Cc:
Patch Status:

Description

If you try to join a Jabber group chat using a "Handle" that already exists in the chat, you will get a '409 conflict' error from the Jabber server. Adium reports this properly, but once this error has been received, it's no longer possible to join that chat room (e.g., after picking a different handle) - no error is reported, and no chat window appears. Joining other rooms on the same server works, as does joining rooms on different servers.

(What I'm running calls itself 0.9svn, which isn't in the Version: list)

Change History (16)

comment:1 Changed 15 years ago by Peter Hosey

Version: 0.851.0svn

comment:2 Changed 15 years ago by fenner@…

Here is some info from the debug log. When first trying to join the chat and getting the conflict error:

Creating chatWithName:blah@conference.psg.com onAccount:<ESGaimJabberAccount: 0x6037a00>:2:fenner@jabber.psg.com chatCreationInfo:{handle = Bill; room = blah; server = "conference.psg.com"; }
[AIChat: 3e96b0 initForAccount]
chatWithName:blah@conference.psg.com onAccount:<ESGaimJabberAccount: 0x6037a00>:2:fenner@jabber.psg.com added <<<AIChat: 0x3e96b0>:<new>>> [<NSCFSet: 0x372440> (<AIChat: 0x3e96b0>:<new>)]
gaim openChat:<AIChat: 0x3e96b0>:blah@conference.psg.com.0 for blah@conference.psg.com.0
Creating a chat.
Danger, Will Robinson! password is in the proto_info but can't be found in {handle = Bill; room = blah; server = "conference.psg.com"; }
In the event of an emergency, your GHashTable may be used as a flotation device...
(Libgaim: jabber) Sending (ssl): <presence to='blah@conference.psg.com/Bill'><x xmlns='http://jabber.org/protocol/muc'/></presence>
(Libgaim: jabber) Recv (ssl)(344): <presence from='blah@conference.psg.com/Bill' to='fenner@jabber.psg.com/Adium' type='error'><x xmlns='http://jabber.org/protocol/muc'/><error code='409' type='cancel'><conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Nickname is already in use by another occupant</text></error></presence>
adiumGaimNotifyMessage: type: 0
Error joining chat blah@conference.psg.com/Bill
Error joining chat blah@conference.psg.com/Bill
409: Conflict 

(A nice to have would be to have the error dialog display the <text> too, since it says what the *real* error is, but that's a different problem)

The second time I try to join, when the room simply silently fails, the debug log says:

Creating chatWithName:blah@conference.psg.com onAccount:<ESGaimJabberAccount: 0x6037a00>:2:fenner@jabber.psg.com chatCreationInfo:{handle = Bill; room = blah; server = "conference.psg.com"; }

P.S. Feel free to set target to 1.5, since this is group chat for sure

comment:3 Changed 15 years ago by David Smith

Milestone: Adium X 1.5

Thanks for the logs :) Should make it much easier to track down. I agree, though, that it's best suited for 1.5

comment:4 Changed 15 years ago by Peter Hosey

Summary: After 409 Conflict error, it's impossible to join another Jabber group chatAfter 409 Conflict error, it's impossible to join the same Jabber group chat

fixed summary.

comment:5 Changed 13 years ago by Andreas Monitzer

field_haspatch: 0
Patch Status: None
pending: 0

I investigated the cause, and concluded that it's a very complicated design bug in Adium.

This is the important code:

		//Create a new chat
		chat = [AIChat chatForAccount:account];
		[chat setName:name];
		[chat setIdentifier:identifier];
		[chat setIsGroupChat:YES];
		[openChats addObject:chat];
		AILog(@"chatWithName:%@ identifier:%@ onAccount:%@ added <<%@>> [%@]",name,identifier,account,chat,openChats);
		
		if (chatCreationInfo) [chat setStatusObject:chatCreationInfo
											 forKey:@"ChatCreationInfo"
											 notify:NotifyNever];
		
		[chat setStatusObject:[NSNumber numberWithBool:YES]
					   forKey:@"AlwaysShowUserList"
					   notify:NotifyNever];
		
		//Inform the account of its creation
		if (![account openChat:chat]) {
			[openChats removeObject:chat];
			AILog(@"chatWithName: Immediately removed <<%@>> [%@]",chat,openChats);
			chat = nil;
		}
		
		AILog(@"chatWithName %@ created --> %@",name,chat);

Note that the chat gets added to openChats immediately after the -openChat: message is sent. However, in libpurple, it doesn't work that way. You first request joining a chat, and then on success, libpurple creates the chat by itself by calling

(struct _PurpleConversationUiOps).create_conversation(PurpleConversation *conv);

If that callback doesn't get called, the join wasn't successful. This means that there's no way to tell immediatly after sending the -openChat: whether the operation was successful. Further, there's no callback when joining the chat didn't succeed, since libpurple just displays a generic notice as feedback, so the object can't even be removed afterwards on failure.

comment:6 Changed 13 years ago by Evan Schoenberg

I think the proper solution is a ui op which is called when a conversation can not be created. This would pass back the account, the name of the chat which was trying to be joined, and perhaps the other fields initially passed which might include a ui_data field for the ui's use.

comment:7 Changed 13 years ago by Chris Forsythe

Keywords: WasOn1.5 added
Milestone: Adium X 1.5Good idea for "later"

As the group chat SoC 2007 project completed successfully, we no longer require a group chat milestone. As such, I'm going to move all of these over to Good Idea for "later". Process these normally, reassign as needed to the new 1.x milestones created last night.

comment:8 Changed 13 years ago by erik006

priority: normalhigh
Severity: normalmajor

This is a major show-stopper if you're using jabber. This really should be addressed. It ties in with ticket #7388. Andreas sent his analysis of this bug to the devl-list in the summer, although i'm not sure if it contains any more info than that in his comment above. May be worth checking out.

Erik

comment:9 Changed 13 years ago by erik006

Resolution: duplicate
Status: newclosed

comment:10 Changed 13 years ago by Andreas Monitzer

Duplicate of which ticket?

comment:11 Changed 13 years ago by erik006

Resolution: duplicate
Status: closedreopened

I think I accidently closed this ticket, while meaing to close another. This definitely should be open.

Erik

comment:12 in reply to:  description Changed 13 years ago by Bill Fenner

Replying to fenner@research.att.com:

My email address has changed; if a trac admin wouldn't mind changing the reporter to fenner@… I'd appreciate being able to keep track of the status of this bug.

comment:13 Changed 13 years ago by Evan Schoenberg

Reporter: changed from fenner@… to fenner@…

comment:14 in reply to:  8 Changed 13 years ago by Robert

Milestone: Good idea for "later"Adium X 1.3

Replying to erik006:

This is a major show-stopper if you're using jabber. This really should be addressed. [...] Erik

comment:15 Changed 12 years ago by Evan Schoenberg

Owner: changed from nobody to Evan Schoenberg
Status: reopenednew

comment:16 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [23232]) im.pidgin.pidgin 2.4.2mtn @ b28057d6ade7c221b0616c3b02e86659e2d8b10b which adds a chat-join-failed signal. We then make use of it to know when joining a group chat fails (currently only works for jabber chats) and remove our reference to the corresponding AIChat. Fixes #1874. Fixes #7388.

Note: See TracTickets for help on using tickets.