Is the Collabora Code Mattermost plugin working properly?

I’m using Mattermost 9.11.7 and 10.0.1 separately.

I recently learned about Collabora Code and installed it on a VM in the same network.

I installed the Collabora Mattermost plugin version 1.10.

  • Symptom: The “Edit” button appears, but changes aren’t saved after editing.

  • Error 1: unencoded WOPISrc warning

    • Log message: WRN WOPISrc validation error: unencoded WOPISrc […] in URL […] WOPISrc must be URI-encoded.
    • Details: When the Mattermost plugin calls the Collabora Online editor, it passes the WOPISrc URL parameter containing file information without URL encoding (Percent-encoding).
  • Error 2: Invalid or missing JSON … LastModifiedTime warning

    • Log message: WRN Invalid or missing JSON in WOPI::PutFile HTTP_OK response. Expected json object with a LastModifiedTime value
    • Details: When the Collabora Online server tries to save the edited file back to the Mattermost server (WOPI PutFile request), the Mattermost server (plugin) sends a success (HTTP OK) response, but the response body doesn’t include the LastModifiedTime information (file’s last modification time) in JSON format as required by WOPI specifications.
  • Error 3: StorageManager’s lastModifiedTime doesn’t match… error

    • Log message: ERR StorageManager’s lastModifiedTime […] doesn’t match that of SaveManager’s […]
    • Details: An inconsistency in file modification time information has occurred internally within Collabora.

This is my situation… Is there anyone using this with relatively recent or latest versions of Mattermost? If so, I’d appreciate some help.

Stay healthy and happy always!

This won’t help this issue, but I’d upgrade to 9.11.11 and 10.0.4 (if not to 10.5.2) to get latest bug and security fixes. Version archive - Mattermost documentation

Have you looked at the issues for the plugin GitHub · Where software is built Not a lot of recent activity there, but I did see a mention of some issues that were resolved by moving from a Docker deployment to a VM deployment.

Take a look at GitHub - coltoneshaw/mattermost-collabra-demo I’ve used it a few times to demo the Collabara plugin. There may be some info that’ll help. It is absolutely possible that more recent versions of Mattermost introduced a change that nobody’s noticed yet… a lot of Mattermost instances are running surprisingly old versions (if it ain’t broke, don’t fix it!) and maybe the folks using Collabara just haven’t noticed yet.

I’ve already checked the plugin’s issue tab on GitHub.

Unfortunately, while there are some issues raised by users, there has been no official feedback, and even the pull requests submitted by the community haven’t been merged. It seems that the official plugin is no longer compatible with recent versions of Mattermost.

I’ve made considerable efforts to fix the issue myself — including rebuilding the plugin with URL encoding fixes and various other attempts — but since I’m not a developer, I’ve hit a wall and couldn’t make further progress.

That’s why I’m posting here in the hope that someone might be able to help.

I still hope the Collabora team will update the plugin officially, but it seems like they’re no longer interested in maintaining it.

I’ll ask and see if we can’t get this looked at.

2 Likes

If the Mattermost team could work on resolving this issue, it would be a tremendous help to many users.
Thank you.

ps.)

log -
Mar 28 10:31:36 code coolwsd[8338]: wsd-08338-08351 2025-03-28 10:31:36.476698 +0900 [ websrv_poll ] WRN WOPISrc validation error: unencoded WOPISrc [https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c] in URL: /browser/ded56d8ff7/cool.html?WOPISrc=https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c| wsd/RequestDetails.cpp:37

Mar 28 10:31:36 code coolwsd[8338]: wsd-08338-08351 2025-03-28 10:31:36.476772 +0900 [ websrv_poll ] WRN WOPISrc validation error: unencoded WOPISrc [https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c] in URL: /browser/ded56d8ff7/cool.html?WOPISrc=https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c| wsd/RequestDetails.cpp:37

Analysis of the WOPISrc Validation Error

The error messages shown in your logs come from the Collabora Online server (coolwsd process):

WRN WOPISrc validation error: unencoded WOPISrc [https://matter2.aaaaa.aaaaaplugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c] in URL: /browser/ded56d8ff7/cool.html?WOPISrc=https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c

Core Issue Identified

The fundamental problem is a missing URL encoding in the communication between the Mattermost plugin and Collabora Online:

  1. Protocol Requirements: The WOPI (Web Application Open Platform Interface) protocol specification requires that the WOPISrc parameter be properly URL-encoded (percent-encoded).
  2. Current Implementation Problem: The Mattermost Collabora plugin (v1.10) is passing the raw, unencoded URL directly as a parameter:
/browser/ded56d8ff7/cool.html?WOPISrc=https://matter2.aaaaa.aaaaa/plugins/com.collaboraonline.mattermost/wopi/files/tc7fht6pnb8b8f9dn65eequy9c
  1. Expected Format: The properly encoded URL should look like:
/browser/ded56d8ff7/cool.html?WOPISrc=https%3A%2F%2Fmatter2.aaaaa.aaaaa%2Fplugins%2Fcom.collaboraonline.mattermost%2Fwopi%2Ffiles%2Ftc7fht6pnb8b8f9dn65eequy9c

Where special characters like : and / are encoded as %3A and %2F respectively.
4. Validation Enforcement: The error is being triggered in the Collabora codebase at wsd/RequestDetails.cpp:37, which is likely performing validation on incoming requests.

Root Cause

This is a code-level defect in the Mattermost Collabora plugin (v1.10):

  1. The plugin’s code is not using proper URL encoding functions when constructing the request URL with the WOPISrc parameter.
  2. This appears to be a compatibility issue that’s manifesting with newer Mattermost versions possibly due to changes in how the plugin interfaces with the updated Mattermost API.

Just for transparency, Collabara developed that plugin, not Mattermost. I’ve reached out to them and to a developer who worked on it at one point. Hopefully, they’ll see the value of fixing it.

I understand well that the Mattermost Collabora plugin was not created by Mattermost. As mentioned in my first reply, it was created by the Collabora team, but it seemed they are no longer maintaining this plugin.

I would be glad if they showed interest in this plugin again and fixed it after receiving your contact.

Thank you.

Some 2c from my side.

We’re using the Collabora Plugin version 1.2.0 with the latest Mattermost 10.6.1 and an up-to-date Debain based Collabora standalone WOPI server. Works without any issues. The WOPI connections are made thru the NGINX proxy also used for Mattermost.

The only thing missing is, that we cannot create new files from within Mattermost, but that’s not a real issue. Editing / viewing files works, also collaborative editing on a file. Updates are stored to the file in Mattermost.

For us this is a great solution.

If I recall this correctly, I build version 1.2.0 from the github repo on my own, which also enabled the file permission settings etc. I’ll try to find the binaries, if you’re interested & could post them in a DM on community.mattermost.com (@jprusch)
I can also provide a redacted collabora wopi config from our server.

Best regards

JP

Hello,

I have been trying to apply the Collabora plugin in the latest version of Mattermost, but despite significant effort, I’ve been unsuccessful (the file editing feature exists in Mattermost, but changes aren’t saved when editing and saving).

To solve this issue, I’ve attempted to build it myself, but since I’m not a developer, I’ve repeatedly failed and that’s why I’m asking for help.

If you could share the 1.2.0 binary that you built, I would be extremely grateful.

You would be an enormous help to me. I will send you a DM on community.mattermost.com.

Thank you very much!

Hi,
I created a tgz from our installed, working plugin (1.2.0)

Nothing guaranteed, feel free to play around with it.

2 Likes

Just got a confirmation from @EricKim that the plugin is working on his side.

1 Like