mattermost / mattermost/mattermost-plugin-github
Failure to connect to Github account with Gitlab omnibus install
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 179
- Forks
- 180
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
I upgraded to mattermost team edition 5.19.1 based on previous feedback :)
and configured everything as described in the instructions. However, I am unable to complete the connection process after running /github connect and following the instructions. I believe there is a configuration/permission issue in the gitlab omnibus installation. I am now using mattermost packaged with Gitlab 12.8.5. At first I received an error saying I did not have permission to edit the root.html file:
{"level":"error","ts":1583878625.1969664,"caller":"web/static.go:26","msg":"Failed to update assets subpath from config","error":"failed to update root.html with subpath /: open /opt/gitlab/embedded/service/mattermost/client/root.html: permission denied","errorVerbose":"open /opt/gitlab/embedded/service/mattermost/client/root.html: permission denied\nfailed to update root.html with subpath /\ngithub.com/mattermost/mattermost-server/v5/utils.UpdateAssetsSubpath\n\tgithub.com/mattermost/mattermost-server/v5@/utils/subpath.go:117\ngithub.com/mattermost/mattermost-server/v5/utils.UpdateAssetsSubpathFromConfig\n\tgithub.com/mattermost/mattermost-server/v5@/utils/subpath.go:162\ngithub.com/mattermost/mattermost-server/v5/web.(*Web).InitStatic\n\tgithub.com/mattermost/mattermost-server/v5@/web/static.go:25\ngithub.com/mattermost/mattermost-server/v5/web.New\n\tgithub.com/mattermost/mattermost-server/v5@/web/web.go:39\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/server.go:77\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/server.go:53\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v0.0.5/command.go:826\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v0.0.5/command.go:914\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v0.0.5/command.go:864\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/root.go:15\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/main.go:30\nruntime.main\n\truntime/proc.go:203\nruntime.goexit\n\truntime/asm_amd64.s:1357"}
Then I found this post https://gitlab.com/gitlab-org/omnibus-gitlab/issues/4548
After following these instructions (for a separate domain) I still can't connect (it just get a timeout after a long while) and I am getting the following error in the mattermost log:
{"level":"error","ts":1583879642.866345,"caller":"config/file.go:241","msg":"failed to reload file on change","path":"/var/opt/gitlab/mattermost/config.json","error":"failed to unmarshal config with env overrides: parsing error at line 1, character 1: unexpected end of JSON input","errorVerbose":"parsing error at line 1, character 1: unexpected end of JSON input\nfailed to unmarshal config with env overrides\ngithub.com/mattermost/mattermost-server/v5/config.(*commonStore).load\n\tgithub.com/mattermost/mattermost-server/v5@/config/common.go:106\ngithub.com/mattermost/mattermost-server/v5/config.(*FileStore).Load\n\tgithub.com/mattermost/mattermost-server/v5@/config/file.go:168\ngithub.com/mattermost/mattermost-server/v5/config.(*FileStore).startWatcher.func1\n\tgithub.com/mattermost/mattermost-server/v5@/config/file.go:240\nruntime.goexit\n\truntime/asm_amd64.s:1357"}
Please let me know if there is some way I can fix this in the CLI. Otherwise, I guess I will have to unpackage mattermost from gitlab or migrate to a fresh installation to fix the problem. Maybe there is something that can be done on the gitlab side. I assume many people will encounter this problem.
In case I have to migrate can you please point me to instructions to perform the migration?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported failures in web/static.go, utils/subpath.go, and config/file.go, then compare the GitLab Omnibus packaging behavior described in issue 4548. Trace whether the connection timeout and config reload error belong to the plugin or the packaged Mattermost installation. Done means identifying the owning component and documenting a reproducible fix or a clear migration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, go
- Domain
- api, backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100