powered by Jive Software

Instant room causing 404

I am using Smack 4.2 RC3 to develop an Android application, and testing against Open Fire. If I create a persistent room, things seem to work as expected (other users can join the room and chat). However if I create the room “instant” then other users are able to see the room listed on the server when they query, however they get 404 error when attempting to join. Note that the room creator is able to join and send a groupchat without error.

To create the instant room for simplicity, we are using

MultiUserChat.MucCreateConfigFormHandle.makeInstant()

Below is the message exchange which seems to line up properly with http://xmpp.org/extensions/xep-0045.html#createroom-instant

The only thing that seemed off is the unavailable presence.

Please let me know if something else looks wrong in the message exchange below. And if you think the error may be in my code (maybe I missing some necessary step?), in Smack, or perhaps in Open Fire.

Thanks,

-Brian

01-28 22:27:13.779 22223-23505/testapp I/System.out: 22:27:13 SENT (0): ANDROID-990004820495921

01-28 22:27:14.039 22223-23506/testapp I/System.out: 22:27:14 RECV (0): ANDROID-990004820495921

01-28 22:27:14.049 22223-23505/testapp I/System.out: 22:27:14 SENT (0):

01-28 22:27:14.119 22223-23506/testapp I/System.out: 22:27:14 RECV (0):

01-28 22:27:14.119 22223-23505/testapp I/System.out: 22:27:14 SENT (0):

01-28 22:27:14.179 22223-23506/testapp I/System.out: 22:27:14 RECV (0):

01-28 22:27:14.199 22223-23505/testapp I/System.out: 22:27:14 SENT (0): ANDROID-990004820495921ANDROID-990004820495921

01-28 22:27:14.299 22223-23506/testapp I/System.out: 22:27:14 RECV (0): ANDROID-990004820495921

01-28 22:27:14.309 22223-23505/testapp I/System.out: 22:27:14 SENT (0):

01-28 22:27:14.389 22223-23506/testapp I/System.out: 22:27:14 RECV (0):

01-28 22:27:14.389 22223-23506/testapp I/System.out: 22:27:14 RECV (0): ANDROID-990004820495921

01-28 22:27:14.469 22223-23506/testapp I/System.out: 22:27:14 RECV (0):

However if I create the room “instant” then other users are able to see the room listed on the server when they query, however they get 404 error when attempting to join. Note that the room creator is able to join and send a groupchat without error.
Can you try a different server implementation instead of Openfire? For example Tigase, ejabberd or Prosody? Just so that we can rule out that it’s an Openfire issue.

The only thing that seemed off is the unavailable presence.

Care to elaborate?

Flow wrote:

Can you try a different server implementation instead of Openfire? For example Tigase, ejabberd or Prosody? Just so that we can rule out that it’s an Openfire issue.

Everything seems to work fine (the issue in not experienced) using a public ejabbard server (jabber.at).

However I do see the issue with both of the private Open Fire servers I’ve been testing with. I will try soon to dig through the Open Fire logs, unless you have other suggestions.

Care to elaborate?

If you look in the message log above, you’ll see “unavailable” is sent in the presence messages sent from Smack to the server/room. I was not sure if that was intended or if it should be available. When I attempted to force it to available using MucEnterConfiguration.Builder, then an IllegalArguementException was thrown.

Here is the log from Adium failing to join with 404 error:

21:11:47: contactsFromNamesSeparatedByCommas: onAccount:<ESPurpleJabberAccount:3131a40 1>:test2@demo.server.com

21:11:47: contactsArray is (null)

21:11:47: Creating chatWithName:sun1@conference.demo.server.com onAccount:<ESPurpleJabberAccount:3131a40 1>:test2@demo.server.com chatCreationInfo:{

room = sun1;

server = “conference.demo.server.com”;

}

21:11:47: chatWithName sun1@conference.demo.server.com identifier (null) existing --> (null)

21:11:47: [AIChat: 1c4920 initForAccount]

21:11:47: chatWithName:sun1@conference.demo.server.com identifier:(null) onAccount:<ESPurpleJabberAccount:3131a40 1>:test2@demo.server.com added <<<AIChat: 0x6180001c4920>:>> [{(

<AIChat: 0x6180001c4920>:

)}] [{

room = sun1;

server = “conference.demo.server.com”;

}]

21:11:47: purple openChat:<AIChat: 0x6180001c4920>:sun1@conference.demo.server.com.1 for sun1@conference.demo.server.com.1

21:11:47: Creating a chat with name sun1@conference.demo.server.com (Creation info: {

handle = “riley”;

room = sun1;

server = “conference.demo.server.com”;

}).

21:11:47: PurpleConversation *convLookupFromChat(AIChat *, id):619: No last message found for history on <AIChat: 0x6180001c4920>:sun1@conference.demo.server.com.1

21:11:47: Danger, Will Robinson! password is in the proto_info but can’t be found in {

handle = “riley”;

room = sun1;

server = “conference.demo.server.com”;

}

21:11:47: In the event of an emergency, your GHashTable may be used as a flotation device…

21:11:47: (Libpurple: jabber) Sending (ssl) (test2@demo.server.com/brmacpr):

21:11:47: chatWithName sun1@conference.demo.server.com created --> <AIChat: 0x6180001c4920>:sun1@conference.demo.server.com.1

21:11:47: (Libpurple: jabber) Recv (ssl)(400):

21:11:47: [<AIChat: 0x6180001c4920>:sun1@conference.demo.server.com.1 dealloc]

21:11:47: adiumPurpleNotifyMessage: type: 0

Error joining chat sun1@conference.demo.server.com/riley

Error joining chat sun1@conference.demo.server.com/riley

404: Item Not Found

21:11:47: Posting Growl notification: Event ID: Interface_ErrorMessageReceived, listObject: (null), chat: (null), description: Error joining chat sun1@conference.demo.server.com/riley

404: Item Not Found

21:11:51: Getting accountActionMenuItems for <ESPurpleJabberAccount:3131a40 1>:test2@demo.server.com

21:11:51: (Libpurple: jabber) jabber_actions: have pep: YES

21:11:51: Getting accountActionMenuItems for <ESPurpleJabberAccount:3133570 2>:bleeyt@jabber.at

21:11:51: (Libpurple: jabber) jabber_actions: have pep: YES

If you look in the message log above, you’ll see “unavailable” is sent in the presence messages sent from Smack to the server/room. I was not sure if that was intended or if it should be available.
Your log actually contains a sequence of two joins and one leave. I can only guess that you probably run into the “if (joined) { leave() }” code path of MultiUserChat.join(MucEnterConfiguration) for some reason.

When I attempted to force it to available using MucEnterConfiguration.Builder, then an IllegalArguementException was thrown.

That’s actually an bug in the code. But you don’t need to force it, it correctly sends the available presence already.

Your log actually contains a sequence of two joins and one leave. I can only guess that you probably run into the “if (joined) { leave() }” code path of MultiUserChat.join(MucEnterConfiguration) for some reason.

Yes, I was doing a create() and then a join() using smack. Removing the join() seems to correct the issue. Thanks!