Summary
Feature Flag “AppsEnabled” not recognized/not working
Steps to reproduce
We are using the latest version of self-hosted Mattermost
Mattermost Version: 6.2.1
Database Schema Version: 6.2.1
We added export MM_FEATUREFLAGS_AppsEnabled=true to the .bashrc file, and it looks like it gets loaded as environment variable into the system. Unfortunately, in Mattermost > System Console > FeatureFlags > AppsEnabled is still marked as false.
We followed this guide (Writing a Mattermost app in JavaScript) to enable custom apps on our instance. We already installed the “Apps” Plugin, but it doesn’t seem to have enabled the /apps slash command, which is needed to install a custom app (if I am following the guide correctly). I guess this is due to the feature flag not being enabled.
Expected behavior
FeatureFlag AppsEnabled should be true
I took these steps before I added the environment variable (MM_FEATURE…) to the system. Maybe it helps to remove the Apps Plugin again, and then install it again. But I can’t find an option to disable it.
Under System Console > Plugins > Plugins Management > Installed Plugins it also says
Apps (com.mattermost.apps - 0.7.0)
Plugin disabled by feature flag - Settings
This plugin is not enabled
@turbopasi What deployment method are you using? Could it be the case that your MM server runs as a different user as the one that own the .bashrc file?
So we added the environment variable for the mattermost user as well and did a full restart. It also prints true for echo $MM_FEATUREFLAGS_AppsEnabled. Still, the feature flag in the system console says ‘false’ . It feels like it has something to do with the user but can’t put my finger on it.
Just to be sure, I added the variable under .bashrc and at /etc/environment . Still the flag AppsEnabled is still false in the System Console.
Hi,
it might be worth to add that we’ve updated our Mattermost and database schema version to 6.3.1, which unfortunately didnt solve this issue.
If there’d be a way for the staff to connect and inspect our instance, we’d be happy to help out with some temporary logins
Are you using systemd to manage your Mattermost server? If so, could you please try setting the environment variable in the service file by adding Environment=MM_FEATUREFLAGS_AppsEnabled=true to it?
Thanks @Hanzei for your help and suggestions. Adding the environment variable inside the service file finally did the trick. Might be worth considering to add a little note in the docs, right ? (Or maybe there is already and I just couldn’t find it !?)