jfrerich / mattermost-plugin-bitbucket

Apache License 2.0
3 stars 4 forks source link

After installing plugin, errors #4

Open jasonblais opened 5 years ago

jasonblais commented 5 years ago
Reproduction steps:
  1. Run mattermost reset --confirm
    • NOTE: This resets your Mattermost instance.
  2. Install version 1.0.0 of Bitbucket plugin via System Console > Plugins > Management: https://github.com/jfrerich/mattermost-plugin-bitbucket/archive/v1.0.0.tar.gz
  3. On the same page, once plugin has uploaded, attempt to enable the plugin
Observed: Plugin doesn't enable and errors out:
{"level":"error","ts":1553638040.5674512,"caller":"mlog/log.go:172","msg":"Unable to activate plugin","plugin_id":"bitbucket","error":"unable to start plugin: bitbucket: Must have a bitbucket oauth client id","errorVerbose":"Must have a bitbucket oauth client id\nunable to start plugin: bitbucket\ngithub.com/mattermost/mattermost-server/plugin.(*Environment).Activate\n\t/go/src/github.com/mattermost/mattermost-server/plugin/environment.go:216\ngithub.com/mattermost/mattermost-server/app.(*App).SyncPluginsActiveState\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:95\ngithub.com/mattermost/mattermost-server/app.(*App).InitPlugins.func2\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:172\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners.func1\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:35\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\ngithub.com/mattermost/mattermost-server/config.(*emitter).invokeConfigListeners\n\t/go/src/github.com/mattermost/mattermost-server/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/config.(*commonStore).set\n\t/go/src/github.com/mattermost/mattermost-server/config/common.go:80\ngithub.com/mattermost/mattermost-server/config.(*FileStore).Set\n\t/go/src/github.com/mattermost/mattermost-server/config/file.go:97\ngithub.com/mattermost/mattermost-server/app.(*Server).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:53\ngithub.com/mattermost/mattermost-server/app.(*App).UpdateConfig\n\t/go/src/github.com/mattermost/mattermost-server/app/config.go:59\ngithub.com/mattermost/mattermost-server/app.(*App).EnablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/app/plugin.go:245\ngithub.com/mattermost/mattermost-server/api4.enablePlugin\n\t/go/src/github.com/mattermost/mattermost-server/api4/plugin.go:187\ngithub.com/mattermost/mattermost-server/web.Handler.ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/web/handlers.go:171\ngithub.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/mux/mux.go:162\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}
{"level":"error","ts":1553638040.5681908,"caller":"mlog/log.go:172","msg":"RPC call OnConfigurationChange to plugin failed.","plugin_id":"jira2","error":"connection is shut down"}
{"level":"error","ts":1553638040.6149154,"caller":"mlog/log.go:172","msg":"RPC call OnConfigurationChange to plugin failed.","plugin_id":"jira2","error":"connection is shut down"}
{"level":"info","ts":1553638042.114098,"caller":"scheduler/worker.go:78","msg":"Worker: Job is complete","worker":"Plugins","job_id":"gc7wzkscstgebnq3b5xb33tk7a"}
{"level":"info","ts":1553638102.17424,"caller":"scheduler/worker.go:78","msg":"Worker: Job is complete","worker":"Plugins","job_id":"aqsfu8gf8bfktdatdoxy5gf4bh"}
Root cause:

The errors come from an IsValid() function which checks for the oauth Id, oauth secret, .etc and verifies you have them set in the settings page for the bitbucket plugin.

After reloading and adding those values, these error messages will disappear. The error is only stating that they are currently empty, which they will be until you go through the oauth setup.

jfrerich commented 4 years ago

@jfrerich-sysadmin attached a message from @jfrerich-sysadmin agtest

jfrerich commented 4 years ago

@jfrerich-sysadmin attached a message from @jfrerich-sysadmin New message

jfrerich commented 4 years ago

@jfrerich-sysadmin attached a message from @jfrerich-sysadmin newest message

jfrerich commented 4 years ago

@jfrerich-sysadmin attached a message from @jfrerich-sysadmin asdfasdf