Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mattermost Github Plugin will not start #698

Closed
JackPala opened this issue Sep 15, 2023 · 4 comments
Closed

Mattermost Github Plugin will not start #698

JackPala opened this issue Sep 15, 2023 · 4 comments
Labels
Type/Question Further information is requested

Comments

@JackPala
Copy link

Attempting to start the plugin yields this error in the log

{"timestamp":"2023-09-15 10:08:28.233 -05:00","level":"error","msg":"An error occurred while trying to execute this command.","caller":"web/context.go:105","path":"/api/v4/commands/execute","request_id":"x8hahnk1abbotqgozagpcbrbqh","ip_addr":"172.19.0.1","user_id":"to7fcsnb3bg5upgmmhpznu9qiy","method":"POST","err_where":"ExecutePluginCommand","http_code":500,"err_details":"err=plugin not found: github"} {"timestamp":"2023-09-15 10:09:14.631 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709968"} {"timestamp":"2023-09-15 10:09:14.631 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:09:14.707 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709974"} {"timestamp":"2023-09-15 10:09:14.707 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:09:16.478 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709979"} {"timestamp":"2023-09-15 10:09:16.478 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:09:16.548 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709984"} {"timestamp":"2023-09-15 10:09:16.548 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:09:21.473 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709990"} {"timestamp":"2023-09-15 10:09:21.473 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:09:21.572 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2709996"} {"timestamp":"2023-09-15 10:09:21.572 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:11:57.228 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710038"} {"timestamp":"2023-09-15 10:11:57.228 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:12:04.715 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710044"} {"timestamp":"2023-09-15 10:12:04.715 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:12:04.782 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710049"} {"timestamp":"2023-09-15 10:12:04.782 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:12:27.331 -05:00","level":"error","msg":"An error occurred while trying to execute this command.","caller":"web/context.go:105","path":"/api/v4/commands/execute","request_id":"qqtrofuif7rtfpr47prgou8xbc","ip_addr":"172.19.0.1","user_id":"to7fcsnb3bg5upgmmhpznu9qiy","method":"POST","err_where":"ExecutePluginCommand","http_code":500,"err_details":"err=plugin not found: github"} {"timestamp":"2023-09-15 10:27:31.264 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710272"} {"timestamp":"2023-09-15 10:27:31.265 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:27:31.344 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710278"} {"timestamp":"2023-09-15 10:27:31.344 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:28:52.636 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710305"} {"timestamp":"2023-09-15 10:28:52.636 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "} {"timestamp":"2023-09-15 10:28:52.716 -05:00","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"github","wrapped_extras":"pathplugins/github/server/dist/plugin-linux-amd64pid2710311"} {"timestamp":"2023-09-15 10:28:52.716 -05:00","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:162","plugin_id":"github","error":"failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id., "}

I suspect the big one is "failed to ensure github bot: failed to create bot: Bot.IsValid"

I doubled checked my conf and am unsure why a bot wouldn't be able to be created

@mickmister
Copy link
Contributor

Hi @JackPala, thanks for reporting this. Can you please let us know what plugin version and MM server version you're running?

failed to ensure github bot: failed to create bot: Bot.IsValid: Invalid creator id

@hanzei Any ideas on this? Here's where the error occurs on the server:

https://github.com/mattermost/mattermost/blob/0409a2285df85b79e6025ff26fead709982b71d2/server/public/model/bot.go#L102-L104

	if b.OwnerId == "" || utf8.RuneCountInString(b.OwnerId) > BotCreatorIdMaxRunes {
		return NewAppError("Bot.IsValid", "model.bot.is_valid.creator_id.app_error", b.Trace(), "", http.StatusBadRequest)
	}

The OwnerId should indeed always be set per #598

OwnerId: Manifest.Id, // Workaround to support older server version affected by https://github.com/mattermost/mattermost-server/pull/21560

and should be set my the server on recent server versions otherwise anyway https://github.com/mattermost/mattermost/blob/791ee40568214ee4444ec31fab7d0802b5aac40f/server/channels/app/plugin_api.go#L994


Just a guess, but maybe there existed a manually created GitHub bot before the plugin was first activated? Not sure if that would cause this though. @JackPala Any ideas on what may be specific to your environment?

@JackPala
Copy link
Author

I was using the latest github plugin, and mattermost 7.0.1 , but upgrading to version Mattermost 9 docker compose appears to have fixed it

@JackPala
Copy link
Author

Perhaps an incompatible github plugin version could be installed on mattermost 7.0.1? Runs fine now that's it is on 9

@hanzei
Copy link
Contributor

hanzei commented Sep 26, 2023

@JackPala Mattermost 7.0.1 is an unsupported version. The plugin might not be working with that version.

Closing as the update fixes the issue.

@hanzei hanzei closed this as completed Sep 26, 2023
@hanzei hanzei added the Type/Question Further information is requested label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants