mattermost post fails after upgrade - Invalid or missing post in request body

I upgraded mattermost (community) from 5.12 to 5.37 (and now back to 5.26 due to post errors, still have a problem).

after the upgrade i can not send posts (I am able to create channels and add users).



    "id": "api.context.invalid_body_param.app_error",
    "message": "Invalid or missing post in request body.",
    "detailed_error": "",
    "request_id": "dkysso931iro7bug3fn714eyme",
    "status_code": 400

I found out that when i remove parts of the props the post gets 200 response.
nothing changed in the post request build and the release notes only props mention is:
“Direct access to the Props field in the model.Post structure has been deprecated. The available GetProps() and SetProps() methods should now be used. Also, direct copy of the model.Post structure must be avoided in favor of the provided Clone() method.”

@streamer45 / @agnivade Let me know if you’d be familiar with this issue.

1 Like


A couple of questions to debug this issue:

  • Are you able to provide server logs for when this happens?
  • Is the MM instance running plugins?
  • What part of the props do you need to remove in order to make the post work? Could you provide full examples of working and not working request bodies?

The release note you mentioned would should only affect plugins or other custom code interfacing with the API.

1 Like