our company is running Openfire 4.0.1 together with the Monitoring Service plugin 1.5.0.
I am currently writing a webchat using the Strophe.js Javascript library and am having some issues when querying the message archive. Concretely, I am sending the following IQ stanza, in order to retrieve all messages of the current user according to XEP-0313:
However, Strophe always throws a “badformat” error when parsing the result body. While analyzing the issue, I noticed that this is most likely due to an invalid XML response that is returned by the Monitoring Service plugin. The result of the above mentioned IQ stanza looks as follows:
I have the same issue, after upgrading from version 3.10.2 to 3.10.3, I get a null resulv with invalid XML response. I’m using monitoring plugin 1.4.7 before and after upgrade. So I downgraded again to version 3.10.2 and message archiving works fine otherwise I need to upgrade openfire.
I’m confident that I’ve addressed the issue. The corresponding code changes are in this pull request: OF-1087: Default namespace handling in BOSH. by guusdk · Pull Request #539 · igniterealtime/Openfire · GitHub
Although this is a bug introduced in Openfire, we can work around it by applying a small change (that should be a non-functional change) to the monitoring plugin. This change is part of the PR above.
My goal is to release a fix for this problem in the next release of Openfire, but also release a modified version of the Monitoring plugin that can be used with Openfire 4.0.0 and 4.0.1. Only one of both solutions is required to address the problem.
The impatient can rebuild a new Monitoring plugin based on the PR and deploy the change locally.
thanks very much for your quick response, I guess I’ll just rebuild the plugin for the time being.
By the way I also noted another potential issue when querying a message archive. The XEP-0313 spec states:
To ensure that the client knows when the results are complete, the server MUST send the result after the last message retrieved from the archive. The client can optionally include a ‘queryid’ attribute in their query, which allows the client to match results to their initiating query.
However, it seems as if the iq result is sent before all the archived messages. Can you validate this or should I create a separate thread for this issue?
A new version of the monitoring plugin (1.5.1) is now available for download at Ignite Realtime: Openfire Plugins
As for your question regarding message ordering: I’m not familiar with the XEP-0313 implementation details, but I guess it couldn’t hurt to send the IQ result only after the messages have been transmitted. The existing code is synchronous anyway. I’ve raised [OF-1089] XEP-0313: send IQ result only after messages - Jive Software Open Source for this.
Sorry to bother you, but I’m running Openfire 4.0.2 with Monitoring Service 1.51, and I have, I think, the same issue : when retrieving the archive, the messages are not parsed, leaving me with ‘Forwarded’ and ‘Delayed’ objects only. The namespace of <messages …> appears empty, which I was told is surely the issue : Unable to get messages from history · Issue #139 · otalk/stanza.io · GitHub
Your fix did not correct this properly? Or is this a different issue that needs its own thread?
Your issue is related, indeed. As the original issue has already been closed, I’ve created a new one in our issue tracker: [OF-1132] Monitoring plugin does not add namespace - IgniteRealtime JIRA