Using emoji on an instance with the custom emoji feature disabled triggers noisy errors.
Mattermost server details:
Mattermost Version: 5.21.0
Database Schema Version: 5.21.0
Database: mysql
I was able to reproduce the last time by using emoji (for reactions) on the Android app:
Using emojis shouldn't trigger any errors.
The error is triggered on two methods. Here's a sample log entry for each:
GetEmoji:
{
"level": "error",
"ts": 1586534413.1520584,
"caller": "mlog/log.go:175",
"msg": "Custom emoji have been disabled by the system admin.",
"path": "/api/v4/emoji/name/+1",
"request_id": "pqajzykpabbnmco6xosy1dgaby",
"ip_addr": "188.154.179.71",
"user_id": "y3yo89tmttr18qytsnhzgdo33o",
"method": "GET",
"err_where": "GetEmoji",
"http_code": 501,
"err_details": ""
}
SearchEmoji:
{
"level": "error",
"ts": 1586535998.0065868,
"caller": "mlog/log.go:175",
"msg": "Custom emoji have been disabled by the system admin.",
"path": "/api/v4/emoji/search",
"request_id": "pftcu446upg58jzw8i7j1dk34h",
"ip_addr": "88.130.49.2",
"user_id": "rp8196yejigwty5yfhby5e4uzw",
"method": "POST",
"err_where": "SearchEmoji",
"http_code": 501,
"err_details": ""
}
n/a
Thanks, opened a ticket here: https://mattermost.atlassian.net/browse/MM-24115.
When mobile receives notification of a reaction to a post, it calls app/actions/websocket.ts:1067 which in turn calls app/mm-redux/actions/posts.ts:591, where a check for the emoji name is made in a map called systemEmojis. That map is never populated (always empty) and thus the code passes through to the custom emoji call. That triggers the error on the server.
This bug will be passed to mobile team to implement populating the map.
Thank you for investigating and finding the root cause @wiggin77! I'll follow this issue to see when the fix is out 馃檪
A fix for this has been submitted to upcoming Mobile app v1.32 release which is scheduled to be released in June 16th,