Scheduled message error: Cannot read properties of undefined (reading 'findIndex')

Summary
Shed draw messages have worked in the past, but now, when trying to send a scheduled message, the message does not seem to be queued to send and the warning ‘Cannot read properties of undefined (reading ‘findIndex’)’ is shown.

Steps to reproduce
I’m using the Mac desktop app. Self-hosted, Mattermost on v11.5.1. I write the message, set it to send as scheduled - nothing happens apart from the warning showing below the unsent message box

Expected behavior
The message is scheduled to send when on the date and time I set.

Observed behavior
This screen grab shows a test scheduled message that has been set for tomorrow at 9 a.m., but you can see the text remains as if it hasn’t been scheduled, and the error message is now visible.

If I check the schedule message log on the server, I get this.

id: gnoijemtkpg3ixxxxxxxxxxxxxx
userid: dnbc6twobxxxxxxxx
channelid: trstrstrsxxxxxxxxxxxxx
message: Test scheduled message
scheduledat: 1774342800000
processedat: 0
errorcode: (empty)

If anyone has any ideas what I can do to fix this, I would very much appreciate it. Thank you.

Thanks for the detailed report! Since the scheduled post is appearing in the server log but the desktop app is throwing findIndex and leaving the draft in place, this looks like a client-side bug rather than expected behavior, so I’d recommend checking the scheduled messages docs here https://docs.mattermost.com/end-user-guide/collaborate/schedule-messages.html and opening a bug report with your desktop app version plus any scheduledposts.type database details, as that appears related to a recent issue we’ve seen.