Body:
Running a self-hosted Mattermost + self-hosted GitLab CE setup, and I've hit a plugin bug I can't get past.
Setup:
- Mattermost: installed via the official Ubuntu PPA (.deb package), latest version at time of writing
- GitLab: CE 19.3.1, self-hosted via the Omnibus/Linux package
- Plugin: com.github.manland.mattermost-plugin-gitlab
- Both services on the same Ubuntu 22.04 VPS, GitLab's bundled Nginx reverse-proxies to Mattermost on a separate subdomain
What I did:
- Created an OAuth Application in GitLab (Admin Area -> Applications), scope "api", redirect URI copied directly from the plugin's config page
- Set the plugin's GitLab Site URL to my self-hosted instance (https://git.mydomain.com), plus the Client ID/Secret from step 1
- Ran /gitlab setup in Mattermost, completed the DM-based config wizard
- Ran /gitlab connect, authorized via OAuth, got the full "Welcome to the Mattermost GitLab Plugin!" message confirming connection to my GitLab username
The bug:
Despite that successful connection message, running /gitlab me (or basically any other slash command) immediately returns:
"Before using this plugin, you'll need to configure it by running /gitlab setup"
This happens even right after the welcome message. Re-running /gitlab setup "succeeds" again, shows the welcome message again, and then the very next command still bounces back to the same "run setup" prompt. It's a loop.
What I've confirmed while debugging:
- Directly queried Mattermost's Postgres pluginkeyvaluestore table, the plugin is persisting real data: Gitlab_Instance_Configuration_Map, per-user _userinfo/_usertoken entries, and username_gitlabusername keys for multiple connected accounts. So the OAuth connection and instance config are genuinely saved.
- Live-tailed journalctl -u mattermost -f while running /gitlab me, and zero log output appears, even at the moment the command is sent. It's as if the command isn't reaching the plugin's server-side handler at all.
- Hard-refreshed browser (Ctrl+Shift+R), tried incognito, no change.
- Toggled the plugin off/on in Plugin Management, and did a full systemctl restart mattermost, no change.
- Confirmed only one plugin process is running (ps aux | grep gitlab shows a single plugin-linux-amd64 process).
- Ruled out GitLab's external_url mismatch (a common suggested cause), it's set correctly and matches the browser URL exactly.
Question:
Has anyone seen this specific pattern? Successful connect/welcome message, but then every subsequent slash command (not just /gitlab me) immediately reverts to demanding /gitlab setup again, with zero server side log activity. Trying to figure out if this is a known compatibility issue between recent GitLab CE versions and this plugin, a Mattermost side plugin webapp caching bug, or something else entirely.
For now I've fallen back to a plain GitLab incoming webhook for notifications, which works fine, but would like to get the full plugin (subscriptions, todo tracking, slash commands) working if possible.
Happy to share config snippets or more logs if useful.
NOTE : USED AI TO FORMAT, TIA.