SOLVED: No Custom Emoji Button

Hi everyone,

Summary

yesterday I moved a Mattermost installation from one server to another. And since then I do not have the Custom Emoji Button anymore, even though the option is set correctly in the System Console.

I did quite some checks to see if the database user has all the rights to the imported database ( I regranted him all privileges), furthermore I checked the directory ownership and the directory’s rights of the data and emoji directory. Both are set to 775. I looked through the config.json file and couldn’t find anything suspicious.
Maybe it’s worth to mention, that there are two mattermost server running on the same machine.

I hope someone can help me with figuring out, why users do not have the possibility to add custom emojis.
Thanks,
Nils

Hi @nils-schween,

  1. Make sure the data folder has proper permissions by running this command:
chown -R mattermost:mattermost /opt/mattermost/data
  1. If you are using AWS to store files, ensure that Mattermost can still connect to your S3 bucket
  2. If you still don’t see the files, please post a link to the instructions you followed to migrate the server

Hi @amy.blais,

thank you for your answer.
To the first point: I already checked the permissions of the data folder and its ownership. The permissions are 775. I guess they are correct. To the ownership: in contrast to the standard, the name of my mattermost user and the group name are not identical, i.e. the ownership of the data folder is myname_mattermost:myname. But this is in accord with the systemmd file. So it should not cause any troubles.
To the second point: I am not using AWS.

To the migration of the server: I didn’t follow any particular instructions. Here is what I did: I installed a mattermost server as described in https://docs.mattermost.com/install/install-ubuntu-1604.html. Then I copied the data folder of my old mattermost instance to the new one, I dropped the database of the old one ( it was a mariaDB and I used mysqldump) and imported it into the Mysql Database of the new server. I adjusted the rights of my new installation to the user which I created for it and granted him the privileges to the imported database. And everything works perfectly, but the “Custom Emojis”. The button just doesn’t show up.

What I am looking for are further possibilities to debug. Are there more logs than the journalctl logs? And the mattermost.log file? I don’t know how to track down the error.
Thank you!
Nils

Hi @nils-schween,

Which Mattermost version(s) are you seeing this on? Which logging level did you choose? (Please use DEBUG if not already). Did you copy the config.json as well?

Hi @amy.blais,

once more thank you that your are trying to help me tracking down this mysterious error.
Well, I copied the config.json file and gave it the read and write access for the mattermost user and mattermost group. Maybe, I should stress, that the server is running without any flaws but the missing “Custom Emoji” button. The Mattermost version 5.7.0. ( and after an update 5.7.1). Before moving this Matttermost instance, I did an update from 4.0.0. to 5.7.0.

Yesterday I set the Log Level from “INFO” to “DEBUG” and followed the log. But there was nothing conspicuous. So I am not sure, if I should post a part of it and if yes, which part to post.

Furthermore, I think, that it is may be a good idea to mention, that I am handling the two mattermost instances, running right now on same server, with the help of an nginx proxy. I set two different ports and created to files in /etc/nginx/sites-available and linked them into the sites-enabled folder. May be something goes wrong here.

I am wondering, what would happen, if I deleted the Emoji table and the /data/emoji folder manually. Will Mattermost recreate them?

I do not know what to do next.

Thank you.
Nils

P.S.: A part of the debug log file:

{“level”:“debug”,“ts”:1549486313.9214416,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/redirect_location”}
{“level”:“debug”,“ts”:1549486313.983628,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/posts/768wrej4cffyjf7m7jnsqjnwko/reactions”}
{“level”:“debug”,“ts”:1549486315.3645847,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/files/6jk184xsqbnduk3qfby8mgbnoo/preview”}
{“level”:“debug”,“ts”:1549486315.4459167,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/emoji/name/bindabei”}
{“level”:“debug”,“ts”:1549486317.1389172,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486318.0887284,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486318.1288483,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486318.198599,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486318.2298832,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486318.2849278,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486332.6083848,“caller”:“app/email_batching.go:110”,“msg”:“Email batching job ran. 0 user(s) still have notifications pending.”}
{“level”:“debug”,“ts”:1549486339.2522783,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486342.8636494,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486350.761374,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486350.8718364,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels”}
{“level”:“debug”,“ts”:1549486350.8725932,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels/members”}
{“level”:“debug”,“ts”:1549486354.0474448,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486354.1020472,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486354.1823897,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486354.2397785,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486354.298507,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486362.6084046,“caller”:“app/email_batching.go:110”,“msg”:“Email batching job ran. 0 user(s) still have notifications pending.”}
{“level”:“debug”,“ts”:1549486369.6287596,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486370.5399833,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486371.7397945,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486371.7987869,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486377.1304507,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549486383.720822,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486383.8308098,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels”}
{“level”:“debug”,“ts”:1549486383.8312895,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels/members”}
{“level”:“debug”,“ts”:1549486387.9609182,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486387.9836218,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486388.1024904,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486388.1455967,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486388.217537,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/channels/members/me/view”}
{“level”:“debug”,“ts”:1549486392.608404,“caller”:“app/email_batching.go:110”,“msg”:“Email batching job ran. 0 user(s) still have notifications pending.”}
{“level”:“debug”,“ts”:1549486395.0745063,“caller”:“app/web_conn.go:149”,“msg”:“websocket.read: closing websocket for userId=3xtkcg1wafys3mnfjk6bz1hd5e error=read tcp 127.0.0.1:8066->127.0.0.1:42810: i/o timeout”}
{“level”:“debug”,“ts”:1549486395.725799,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/websocket”}
{“level”:“debug”,“ts”:1549486395.7351317,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/plugins/webapp”}
{“level”:“debug”,“ts”:1549486395.7487931,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels/members”}
{“level”:“debug”,“ts”:1549486395.7487926,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels”}

Hi @nils-schween,

Tips from a community member:

We’d recommend you to rename /data/emoji instead of deleting it to test what will happen (allows you to move it back in case it doesn’t help). Thanks for the log output. It might be interesting to see the log output during Mattermost’s start. Also, configuration values of EnableCustomEmoji would be appreciated.

Hi @amy.blais,

I stopped the mattermost server, renamed the /data/emoji folder and dropped the Emoji Table in the Database ( I had dumped it before, so that I could recreate after testing). I started the server again, but not “Custom Emoji” Button. I stopped the server again, and created an empty /data/emoji/ folder with the correct rights and ownership. I started the server again, and no “Custom Emoji” Button. Meanwhile I checked the database and saw that the Emoji Table was reacreated after I had created the empty /data/emoji folder.
Unfortunately, renaming and recreating did not show any effect.
I restored the the old /data/emoji folder and imported the dropped Emoji table. Now everything is back to its old state.

Here the values of all config.json entries related to emojis:
cat /opt/myname_mattermost/config/config.json | grep -ie “emoji”
“EnableCustomEmoji”: true,
“EnableEmojiPicker”: true,
“RestrictCustomEmojiCreation”: “all”,

And, as requested, the start up log of the mattermost server in debug mode:

{“level”:“info”,“ts”:1549874189.3560343,“caller”:“app/app.go:237”,“msg”:“Server stopped”}
{“level”:“info”,“ts”:1549874411.3610606,“caller”:“utils/i18n.go:78”,“msg”:“Loaded system translations for ‘de’ from ‘/opt/hgbutze_mattermost/i18n/de.json’”}
{“level”:“info”,“ts”:1549874411.3611588,“caller”:“app/app.go:143”,“msg”:“Server is initializing…”}
{“level”:“debug”,“ts”:1549874411.361195,“caller”:“utils/html.go:30”,“msg”:“Parsing server templates at /opt/hgbutze_mattermost/templates”}
{“level”:“info”,“ts”:1549874411.362768,“caller”:“sqlstore/supplier.go:207”,“msg”:“Pinging SQL master database”}
{“level”:“debug”,“ts”:1549874411.3921201,“caller”:“sqlstore/preference_store.go:41”,“msg”:“Deleting any unused pre-release features”}
{“level”:“debug”,“ts”:1549874411.3945224,“caller”:“jobs/schedulers.go:29”,“msg”:“Initialising schedulers.”}
{“level”:“info”,“ts”:1549874411.7277234,“caller”:“commands/server.go:82”,“msg”:“Current version is 5.7.0 (5.7.1/Fri Feb 1 08:43:17 UTC 2019/ad3ddac9b935fb842ca4301f69266ffb87ec8c86/none)”}
{“level”:“info”,“ts”:1549874411.7278051,“caller”:“commands/server.go:83”,“msg”:“Enterprise Enabled: false”}
{“level”:“info”,“ts”:1549874411.7278283,“caller”:“commands/server.go:84”,“msg”:“Current working directory is /opt/hgbutze_mattermost”}
{“level”:“info”,“ts”:1549874411.7279158,“caller”:“commands/server.go:85”,“msg”:“Loaded config file from /opt/hgbutze_mattermost/config/config.json”}
{“level”:“info”,“ts”:1549874411.728119,“caller”:“filesstore/localstore.go:33”,“msg”:“Able to write files to local storage.”}
{“level”:“info”,“ts”:1549874411.7297485,“caller”:“app/plugin.go:130”,“msg”:“Starting up plugins”}
{“level”:“info”,“ts”:1549874414.5943766,“caller”:“app/server.go:166”,“msg”:“Starting Server…”}
{“level”:“info”,“ts”:1549874414.5945168,“caller”:“app/server.go:226”,“msg”:“Server is listening on [::]:8066”}
{“level”:“debug”,“ts”:1549874414.599957,“caller”:“api4/plugin.go:20”,“msg”:“EXPERIMENTAL: Initializing plugin api”}
{“level”:“debug”,“ts”:1549874414.600547,“caller”:“app/email_batching.go:74”,“msg”:“Email batching job starting. Checking for pending emails every 30 seconds.”}
{“level”:“info”,“ts”:1549874414.600595,“caller”:“app/web_hub.go:75”,“msg”:“Starting 8 websocket hubs”}
{“level”:“debug”,“ts”:1549874414.6006944,“caller”:“web/web.go:27”,“msg”:“Initializing web routes”}
{“level”:“debug”,“ts”:1549874414.6007116,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 1 is starting with goroutine 3734”}
{“level”:“debug”,“ts”:1549874414.6008236,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 0 is starting with goroutine 3733”}
{“level”:“debug”,“ts”:1549874414.600909,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 2 is starting with goroutine 3735”}
{“level”:“debug”,“ts”:1549874414.6009316,“caller”:“utils/subpath.go:59”,“msg”:“No rewrite required for static assets”,“path”:"/static/"}
{“level”:“debug”,“ts”:1549874414.6009138,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 6 is starting with goroutine 3739”}
{“level”:“debug”,“ts”:1549874414.6009755,“caller”:“web/static.go:26”,“msg”:“Using client directory at /opt/hgbutze_mattermost/client”}
{“level”:“debug”,“ts”:1549874414.601004,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 7 is starting with goroutine 3740”}
{“level”:“debug”,“ts”:1549874414.6010497,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 5 is starting with goroutine 3738”}
{“level”:“debug”,“ts”:1549874414.6010964,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 3 is starting with goroutine 3736”}
{“level”:“debug”,“ts”:1549874414.6035306,“caller”:“app/web_hub.go:412”,“msg”:“Hub for index 4 is starting with goroutine 3737”}
{“level”:“info”,“ts”:1549874414.6058104,“caller”:“sqlstore/post_store.go:1286”,“msg”:“Post.Message supports at most 16383 characters (65535 bytes)”}
{“level”:“debug”,“ts”:1549874414.6316621,“caller”:“app/email_batching.go:74”,“msg”:“Email batching job starting. Checking for pending emails every 30 seconds.”}
{“level”:“info”,“ts”:1549874414.676912,“caller”:“jobs/workers.go:68”,“msg”:“Starting workers”}
{“level”:“debug”,“ts”:1549874414.6769533,“caller”:“sqlstore/session_store.go:227”,“msg”:“Cleaning up session store.”}
{“level”:“info”,“ts”:1549874414.6770053,“caller”:“commands/server.go:266”,“msg”:“Sending systemd READY notification.”}
{“level”:“debug”,“ts”:1549874414.677013,“caller”:“sqlstore/command_webhook_store.go:88”,“msg”:“Cleaning up command webhook store.”}
{“level”:“debug”,“ts”:1549874414.677129,“caller”:“sqlstore/tokens_store.go:72”,“msg”:“Cleaning up token store.”}
{“level”:“debug”,“ts”:1549874414.6772213,“caller”:“jobs/jobs_watcher.go:39”,“msg”:“Watcher Started”}
{“level”:“debug”,“ts”:1549874414.67728,“caller”:“migrations/worker.go:44”,“msg”:“Worker started”,“worker”:“Migrations”}
{“level”:“info”,“ts”:1549874414.6773245,“caller”:“jobs/schedulers.go:72”,“msg”:“Starting schedulers.”}
{“level”:“debug”,“ts”:1549874414.6810791,“caller”:“jobs/schedulers.go:167”,“msg”:“Next run time for scheduler MigrationsScheduler: 2019-02-11 09:41:14.680974 +0100 CET m=+63.487891771”}
{“level”:“debug”,“ts”:1549874418.4677734,“caller”:“web/handlers.go:50”,“msg”:“GET - /login”}
{“level”:“debug”,“ts”:1549874419.1450047,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/config/client”}
{“level”:“debug”,“ts”:1549874419.1465063,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/license/client”}
{“level”:“debug”,“ts”:1549874419.1677806,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/plugins/webapp”}
{“level”:“debug”,“ts”:1549874433.1886218,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/websocket”}
{“level”:“debug”,“ts”:1549874433.2355554,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/plugins/webapp”}
{“level”:“debug”,“ts”:1549874433.2362404,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels”}
{“level”:“debug”,“ts”:1549874433.2363687,“caller”:“web/context.go:84”,“msg”:“Invalid or expired session, please login again.”,“path”:"/api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels",“request_id”:“bfew6dzbd7r18mgiueec7chqmo”,“ip_addr”:“83.137.191.1”,“user_id”:"",“method”:“GET”,“err_where”:"",“http_code”:401,“err_details”:“UserRequired”}
{“level”:“debug”,“ts”:1549874433.2365782,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels/members”}
{“level”:“debug”,“ts”:1549874433.2366788,“caller”:“web/context.go:84”,“msg”:“Invalid or expired session, please login again.”,“path”:"/api/v4/users/me/teams/313ecjjg3tgui8qpo77qkfo5zh/channels/members",“request_id”:“sgfcstwz1tyimm96mti7zarido”,“ip_addr”:“83.137.191.1”,“user_id”:"",“method”:“GET”,“err_where”:"",“http_code”:401,“err_details”:“UserRequired”}
{“level”:“debug”,“ts”:1549874433.2368047,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/users/me/teams/unread”}
{“level”:“debug”,“ts”:1549874433.2369072,“caller”:“web/context.go:84”,“msg”:“Invalid or expired session, please login again.”,“path”:"/api/v4/users/me/teams/unread",“request_id”:“mh577ek93fncxrixxa1ixstity”,“ip_addr”:“83.137.191.1”,“user_id”:"",“method”:“GET”,“err_where”:"",“http_code”:401,“err_details”:“UserRequired”}
{“level”:“debug”,“ts”:1549874433.2371564,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/channels/z7xy456577gi5keyy89ioqexco/posts”}
{“level”:“debug”,“ts”:1549874433.2372751,“caller”:“web/context.go:84”,“msg”:“Invalid or expired session, please login again.”,“path”:"/api/v4/channels/z7xy456577gi5keyy89ioqexco/posts",“request_id”:“ndtrmxh7k7gpxykyoc9sx75h5a”,“ip_addr”:“83.137.191.1”,“user_id”:"",“method”:“GET”,“err_where”:"",“http_code”:401,“err_details”:“UserRequired”}
{“level”:“debug”,“ts”:1549874433.3740442,“caller”:“app/web_conn.go:147”,“msg”:“websocket.read: client side closed socket userId=”}
{“level”:“debug”,“ts”:1549874433.7245283,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/logout”}
{“level”:“debug”,“ts”:1549874434.6048982,“caller”:“web/handlers.go:50”,“msg”:“GET - /”}
{“level”:“debug”,“ts”:1549874437.603696,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/config/client”}
{“level”:“debug”,“ts”:1549874437.60427,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/license/client”}
{“level”:“debug”,“ts”:1549874437.629027,“caller”:“web/handlers.go:50”,“msg”:“GET - /api/v4/plugins/webapp”}
{“level”:“debug”,“ts”:1549874444.631978,“caller”:“app/email_batching.go:110”,“msg”:“Email batching job ran. 0 user(s) still have notifications pending.”}
{“level”:“debug”,“ts”:1549874455.0002499,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}
{“level”:“debug”,“ts”:1549874461.022048,“caller”:“web/handlers.go:50”,“msg”:“POST - /api/v4/users/status/ids”}

Once more thank you.
Nils

Hi, @nils-schween

“RestrictCustomEmojiCreation”: “all”,

This means that the creation of custom emoji is allowed for all users as mentioned in the Custom Emoji but since you are running 5.7.0, the configuration is pulled from the database as mentioned in the Restrict Custom Emoji Creation:

In this case, can you access the database, run the following command, and provide the output?
SELECT * FROM Roles\G
SELECT * FROM Systems WHERE Name = "EmojisPermissionsMigrationComplete"\G
SELECT * FROM Users WHERE Email="<email>"\G

Meanwhile, I am interested to know if you can access the custom emoji page directly from the browser. Can you please navigate to the page directly and verify if you can see it? In my case here, it is set to Mattermost

I’d like to try and understand if the functionality is completely missing from the deployment or merely just the button here:

Hi @dannymohammad,

thank you for your answer and your suggestions. As requested, I checked if I can access the custom emoji page directly. And yes, I can. But the blue “Add Custom Emoji” Button is also missing. I created a screenshot for you:
custom_emoji

I retrieved the information you asked for from the database:
SELECT * FROM Roles\G
*************************** 1. row ***************************
Id: 3smjtfy6zt8gtdwhibe9m1kfwh
Name: team_admin
DisplayName: authentication.roles.team_admin.name
Description: authentication.roles.team_admin.description
CreateAt: 1547759566735
UpdateAt: 1547759566735
DeleteAt: 0
Permissions: remove_user_from_team manage_team import_team manage_team_roles manage_channel_roles manage_others_webhooks manage_slash_commands manage_others_slash_commands manage_webhooks delete_post delete_others_posts
SchemeManaged: 1
BuiltIn: 1
*************************** 2. row ***************************
Id: 44zcxgrwwind5giiydireacyxh
Name: system_user
DisplayName: authentication.roles.global_user.name
Description: authentication.roles.global_user.description
CreateAt: 1547759566712
UpdateAt: 1547759566712
DeleteAt: 0
Permissions: create_direct_channel create_group_channel permanent_delete_user create_team
SchemeManaged: 1
BuiltIn: 1
*************************** 3. row ***************************
Id: 9e8ruogt47r4ib1j5jdy98hthy
Name: channel_user
DisplayName: authentication.roles.channel_user.name
Description: authentication.roles.channel_user.description
CreateAt: 1547759566755
UpdateAt: 1547759566755
DeleteAt: 0
Permissions: read_channel add_reaction remove_reaction manage_public_channel_members upload_file get_public_link create_post use_slash_commands manage_private_channel_members delete_post edit_post
SchemeManaged: 1
BuiltIn: 1
*************************** 4. row ***************************
Id: cf5aggq4qjfdxnn3d8i4iu7sxe
Name: system_admin
DisplayName: authentication.roles.global_admin.name
Description: authentication.roles.global_admin.description
CreateAt: 1547759566696
UpdateAt: 1547759566696
DeleteAt: 0
Permissions: assign_system_admin_role manage_system manage_roles manage_public_channel_properties manage_public_channel_members manage_private_channel_members delete_public_channel create_public_channel manage_private_channel_properties delete_private_channel create_private_channel manage_system_wide_oauth manage_others_webhooks edit_other_users edit_others_posts manage_oauth invite_user delete_post delete_others_posts create_team add_user_to_team list_users_without_team manage_jobs create_post_public create_post_ephemeral create_user_access_token read_user_access_token revoke_user_access_token remove_others_reactions list_team_channels join_public_channels read_public_channel view_team read_channel add_reaction remove_reaction upload_file get_public_link create_post use_slash_commands remove_user_from_team manage_team import_team manage_team_roles manage_channel_roles manage_slash_commands manage_others_slash_commands manage_webhooks edit_post
SchemeManaged: 1
BuiltIn: 1
*************************** 5. row ***************************
Id: i8aunfkm9j8iddt8ux79gk1j3c
Name: channel_admin
DisplayName: authentication.roles.channel_admin.name
Description: authentication.roles.channel_admin.description
CreateAt: 1547759566762
UpdateAt: 1547759566762
DeleteAt: 0
Permissions: manage_channel_roles
SchemeManaged: 1
BuiltIn: 1
*************************** 6. row ***************************
Id: jt7njsekcfdodkoijc8nsyppzc
Name: team_post_all_public
DisplayName: authentication.roles.team_post_all_public.name
Description: authentication.roles.team_post_all_public.description
CreateAt: 1547759566727
UpdateAt: 1547759566727
DeleteAt: 0
Permissions: create_post_public
SchemeManaged: 0
BuiltIn: 1
*************************** 7. row ***************************
Id: m8reegx4rby4imnciibf1u84go
Name: team_post_all
DisplayName: authentication.roles.team_post_all.name
Description: authentication.roles.team_post_all.description
CreateAt: 1547759566720
UpdateAt: 1547759566720
DeleteAt: 0
Permissions: create_post
SchemeManaged: 0
BuiltIn: 1
*************************** 8. row ***************************
Id: nhjbtrpiw78fp8rwkke9b3qcdw
Name: system_post_all
DisplayName: authentication.roles.system_post_all.name
Description: authentication.roles.system_post_all.description
CreateAt: 1547759566742
UpdateAt: 1547759566742
DeleteAt: 0
Permissions: create_post
SchemeManaged: 0
BuiltIn: 1
*************************** 9. row ***************************
Id: roqhauqozi83fxna9ryfbi8f4w
Name: system_post_all_public
DisplayName: authentication.roles.system_post_all_public.name
Description: authentication.roles.system_post_all_public.description
CreateAt: 1547759566748
UpdateAt: 1547759566748
DeleteAt: 0
Permissions: create_post_public
SchemeManaged: 0
BuiltIn: 1
*************************** 10. row ***************************
Id: waka463j1bg58po6zoffkqg4yy
Name: team_user
DisplayName: authentication.roles.team_user.name
Description: authentication.roles.team_user.description
CreateAt: 1547759566703
UpdateAt: 1547759566703
DeleteAt: 0
Permissions: list_team_channels join_public_channels read_public_channel view_team create_public_channel manage_public_channel_properties delete_public_channel create_private_channel manage_private_channel_properties delete_private_channel invite_user add_user_to_team
SchemeManaged: 1
BuiltIn: 1
*************************** 11. row ***************************
Id: xnrose16sf83dp6nxj4sqo713a
Name: system_user_access_token
DisplayName: authentication.roles.system_user_access_token.name
Description: authentication.roles.system_user_access_token.description
CreateAt: 1547759566688
UpdateAt: 1547759566688
DeleteAt: 0
Permissions: create_user_access_token read_user_access_token revoke_user_access_token
SchemeManaged: 0
BuiltIn: 1
11 rows in set (0,00 sec)

mysql> SELECT * FROM Systems WHERE Name = “EmojisPermissionsMigrationComplete”\G
*************************** 1. row ***************************
Name: EmojisPermissionsMigrationComplete
Value: true
1 row in set (0,00 sec)

mysql> SELECT * FROM Users WHERE Email="my_email@myprovider.de"\G
*************************** 1. row ***************************
Id: qjoc4j5p7pbtur34sym4ifz1yc
CreateAt: 1508298203222
UpdateAt: 1548970014364
DeleteAt: 0
Username: myUserName
Password: $2a$10$6Zlu5c3DBDcqER/Hc2byMegfRgPyBoIRwG.pd61sd6WRChXINpo2m
AuthData: NULL
AuthService:
Email: my_email@myprovider.de
EmailVerified: 1
Nickname:
FirstName:
LastName:
Position:
Roles: system_user system_admin
AllowMarketing: 0
Props: {}
NotifyProps: {“channel”:“true”,“desktop”:“all”,“desktop_sound”:“true”,“email”:“true”,“first_name”:“false”,“mention_keys”:“myUserName,@myUserName”,“push”:“mention”}
LastPasswordUpdate: 1523883374207
LastPictureUpdate: 0
FailedAttempts: 0
Locale: de
MfaActive: 0
MfaSecret:
Timezone: {“automaticTimezone”:"",“manualTimezone”:"",“useAutomaticTimezone”:“true”}
1 row in set (0,00 sec)

And to provide you with the complete picture, I took a screenshot of the missing “Custom Emoji Button” and the corresponding page in the System Console.
menu_without_custom_emoji

system_console_emoji

I hope, that these information are helpful in solving this problem. Thank you once more for your help.
I really appreciate it,
Nils

P.S.: Sorry for posting 3x times, as a new user I am not allowed to put more than one image in a post.

Hi @dannymohammad,

thank you very much for your post. I took a look at the output of
SELECT * FROM Roles\G
and compared it to the other Mattermost Instance running on my server. I saw that in the system_user’s list of permissions the “manage_emojis” permission was missing and in the system_admin’s list of permission “manage_emojis manage_others_emojis” was also missing.

I fixed this with the following SQL Statements:
UPDATE Roles SET Permissions = CONCAT(Permissions, ' manage_emojis') WHERE Name="system_user";
UPDATE Roles SET Permissions = CONCAT(Permissions, ' manage_emojis manage_others_emojis') WHERE Name="system_admin";

Reconsidering this problem, I think that it occured because of updating directly from Mattermost Version 4.0.0 to 5.7.0. As @dannymohammad pointed out the permissions are (since Version 4.9.0) set inside the Database and not in the config.json anymore. And during my update the permissions were not put in the database. And withouth the permisisons, no one was allowed to create Custom Emojis, hence no “Custom Emoji Button”.

Thank you guys very much for your help.
Nils

2 Likes

Hello, @nils-schween

You are most welcome! I am glad that the SQL command helped to provide a hint to us to look into the specific manage_emojis and the manage_emojis manage_others_emojis. It is a good troubleshooting to compare something which is broken with something that is working to see the difference and work our way from there. Nevertheless, I am happy that the functionality is back on your system. Feel free to let us know if you bump into any other issues along the way. Thanks!

Hi

I got same problem as that when I upgrade to 5.25 from 5.12.4.
First I try to follow your instruction but It’s not work to me.

After that I try to compare something different from my backup data.
“create_emojis delete_emojis delete_others_emojis” was also missing from permission_list of role table.

I put “create_emojis delete_emojis delete_others_emojis” with the following SQL Statements:

UPDATE Roles SET Permissions = CONCAT(Permissions, ' create_emojis delete_emojis delete_others_emojis') WHERE Name="system_admin";

UPDATE Roles SET Permissions = CONCAT(Permissions, ' create_emojis delete_emojis') WHERE Name="system_user";

then restart your service.

It’s work.

Thank you for your post. It’s hint to resolve this. Thanks.

1 Like

Hello, @Jun_556677

Great sharing! I am certain that it will help other users who may run into the same problem. :+1:

After upgrading mattermost server to 7.5.1 from 5.37.10, the “Custom Emoji” functionality is not displayed in the menu. I have executed all the above sql commands, but no use.
Does anyone have an idea on this problem? Thanks.

Hi luanne and welcome to the Mattermost forums!

Can you confirm that the “Enable Custom Emoji” setting is set to true in your System Console → Site Configuration → Emoji?

Do you see any errors in your mattermost.log file since your server has started?

The “Enable Custom Emoji” setting is already set to true and no special errors:

{"timestamp":"2022-12-02 00:38:29.820 +08:00","level":"error","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:79","plugin_id":"com.mattermost.apps","wrapped_extras":"pathplugins/com.mattermost.apps/server/dist/plugin-linux-amd64pid8698errorsignal: terminated"}
{"timestamp":"2022-12-02 00:38:29.955 +08:00","level":"error","msg":"RPC call OnDeactivate to plugin failed.","caller":"plugin/client_rpc_generated.go:33","plugin_id":"com.mattermost.apps","error":"connection is shut down"}
{"timestamp":"2022-12-02 00:38:30.379 +08:00","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}
{"timestamp":"2022-12-02 00:38:30.388 +08:00","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}
{"timestamp":"2022-12-02 00:38:30.424 +08:00","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}

I can access the custom emoji page directly. (e.g. https://{our_domain}/{team_name}/emoji)
It’s just that the button is not shown in the menu.

It might also be a client or browser cache issue.
Are you using one of the desktop client apps and if so, in what version? Make sure to update to the latest version.
Also in case this has changed since 5.37.10 (cannot remember what it looked like there), are you sure you’re trying to access it via the “right” way?

grafik

Can you share a screenshot of what it looks like on your end, please?

If you’re using a browser or already have the latest desktop app running, can you please try to flush your caches by pressing CTRL-SHIFT-r (or CMD-Shift-r) for a full reload?

1 Like

Thank you very much, it still in the menu by clicking the three dots for 5.37.10.
But for 7.5.1 (traditional Chinese language) with the setting description is “clicking the three dots above the channel sidebar”, so I thought it was still in the same position. Although I once suspected that there was a change of position, but I didn’t expect it to be in the emoji picker. Thank you again!