[Bug]: API connection throws ‘404 Error’ Channel not found after DB migration and update to Mattermost 11
Before you file a bug report
- I have checked the issue tracker and have not found an issue that matches the one I'm filing.
- This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
- This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.uservoice.com/forums/306457-general/.
- This issue reproduces on one of the currently supported server versions.
- I have read the contribution guidelines and the Mattermost Handbook Contribution Guidelines.
Mattermost Server Version
11.1.0
Operating System
Alma Linux 9.6
Steps to reproduce
A ansible playbook using the community.general.mattermost module throws a ‘404 Error’ Channel not found after update to Mattermost 11
Steps to reproduce Update from 10.8.0 on DB MariaDB (migrated via MySQL → PostgreSQL) to Server Version: 11.1.0 Desktop Version: 6.0.1 Database Schema Version: 143 Build Number: 19159932738 Database: postgres
Expected behavior
Expected behavior No changes in urls, channels, ansible code or users. Only Update of Mattermost (and DB migration from mysql to postgres)
Incoming webhook can still be seen in mattermost config, same id as before.
Observed behavior
Mattermost logs are clear, 404 error resource “Channel” not found,
Log Output
{“timestamp”:“2025-11-19 10:53:15.434 +01:00”,“level”:“debug”,“msg”:“Incoming webhook received”,“caller”:“web/webhook.go:61”,“webhook_id”:“XXXXX”,“request_id”:“9ffkdr9e93fb9qggo5scja6j4c”,“payload”:“{“text”:“redacted”,“username”:“semaphore_alarms”,“icon_url”:“[https://docs.ansible.com/favicon.ico\“,\“channel\”:\“Semaphore_Provisioning\”,\“props\”:{\“webhook_display_name\”:\“Alarms\”},\“attachments\”:null,\“type\”:\”\“,\“icon_emoji\”:\”\“,\“priority\”:null](https://docs.ansible.com/favicon.ico%5C%E2%80%9C,%5C%E2%80%9Cchannel%5C%E2%80%9D:%5C%E2%80%9CSemaphore_Provisioning%5C%E2%80%9D,%5C%E2%80%9Cprops%5C%E2%80%9D:%7B%5C%E2%80%9Cwebhook_display_name%5C%E2%80%9D:%5C%E2%80%9CAlarms%5C%E2%80%9D%7D,%5C%E2%80%9Cattachments%5C%E2%80%9D:null,%5C%E2%80%9Ctype%5C%E2%80%9D:%5C%E2%80%9D%5C%E2%80%9C,%5C%E2%80%9Cicon_emoji%5C%E2%80%9D:%5C%E2%80%9D%5C%E2%80%9C,%5C%E2%80%9Cpriority%5C%E2%80%9D:null)}”}
{“timestamp”:“2025-11-19 10:53:15.434 +01:00”,“level”:“debug”,“msg”:“Failed to handle the payload of media type application/json for incoming webhook XXXXX.”,“caller”:“web/context.go:118”,“path”:”/hooks/XXXXX”,“request_id”:“9ffkdr9e93fb9qggo5scja6j4c”,“ip_addr”:“10.76.1.116”,“user_id”:“”,“method”:“POST”,“err_where”:“incomingWebhook”,“http_code”:404,“error”:“incomingWebhook: Failed to handle the payload of media type application/json for incoming webhook XXXXX., HandleIncomingWebhook: Couldn’t find the channel., resource “Channel” not found, id: TeamId=yf1b8u5ry783ipfmqi974e9rdr&Name=Semaphore_Provisioning”}
{“timestamp”:“2025-11-19 10:53:15.434 +01:00”,“level”:“debug”,“msg”:“Received HTTP request”,“caller”:“web/handlers.go:175”,“method”:“POST”,“url”:“/hooks/XXXXX”,“request_id”:“9ffkdr9e93fb9qggo5scja6j4c”,“status_code”:“404”}Additional Information
Tried discussion forum for 7 days without any answers, during that time i have not found any issues with the mattermost install that would explain the 404 error
Source: mattermost/mattermost