scottleedavis / mattermost-plugin-remind

a mattermost plugin that sets reminders for users and channels.
Apache License 2.0
186 stars 44 forks source link

Plugin crashing in Mattermost 7.8.6 #236

Open j-krauz opened 1 year ago

j-krauz commented 1 year ago

Summary

Plugin keeps crashing in Mattermost 7.8.6

Steps to reproduce

Steps to reproduce the behavior:

  1. Install and enable the plugin v1.0.0
  2. Open any channel or DM
  3. Type a remind command, e.g. /remind me test today

Expected behavior

The remindbot should reply with a confirmation of a scheduled reminder.

Observed behavior (that appears unintentional)

The command is not sent and the following warning is shown:

/remind command crashed the com.github.scottleedavis.mattermost-plugin-remind plugin. Please contact your system administrator

Server configuration

Operating system: CentOS 7, but running in the official docker container

Mattermost version: 7.8.6

Remind version: 1.0.0

Updated from an older Remind bot version or fresh install: Updated from 0.4.4 which started crashing recently as well.

Mattermost server logs ``` 2023-06-20 10:55:18 messenger mattermost.log warn {"timestamp":"2023-06-20 10:55:17.848 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind"} 2023-06-20 10:55:33 messenger mattermost.log error {"timestamp":"2023-06-20 10:55:33.020 Z","level":"error","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:79","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","wrapped_extras":"pathplugins/com.github.scottleedavis.mattermost-plugin-remind/server/dist/plugin-linux-amd64pid22596errorexit status 2"} 2023-06-20 10:55:33 messenger mattermost.log error {"timestamp":"2023-06-20 10:55:33.020 Z","level":"error","msg":"RPC call ExecuteCommand to plugin failed.","caller":"plugin/client_rpc_generated.go:104","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","error":"unexpected EOF"} 2023-06-20 10:55:33 messenger mattermost.log error {"timestamp":"2023-06-20 10:55:33.020 Z","level":"error","msg":"/remind command crashed the com.github.scottleedavis.mattermost-plugin-remind plugin. Please contact your system administrator","caller":"web/context.go:117","path":"/api/v4/commands/execute","request_id":"u61zbqksy7ntbyqyci3ehw74xc","ip_addr":"85.13.96.14","user_id":"qydux8ka8bdg3yxynk3imzog1y","method":"POST","err_where":"ExecutePluginCommand","http_code":500,"error":"ExecutePluginCommand: /remind command crashed the com.github.scottleedavis.mattermost-plugin-remind plugin. Please contact your system administrator, err= Plugin com.github.scottleedavis.mattermost-plugin-remind crashed due to /remind command"} 2023-06-20 10:55:51 messenger mattermost.log warn {"timestamp":"2023-06-20 10:55:50.850 Z","level":"warn","msg":"Health check failed for plugin","caller":"plugin/health_check.go:59","id":"com.github.scottleedavis.mattermost-plugin-remind","error":"plugin RPC connection is not responding"} 2023-06-20 10:55:51 messenger mattermost.log error {"timestamp":"2023-06-20 10:55:50.850 Z","level":"error","msg":"RPC call OnDeactivate to plugin failed.","caller":"plugin/client_rpc_generated.go:33","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","error":"connection is shut down"} 2023-06-20 10:55:51 messenger mattermost.log warn {"timestamp":"2023-06-20 10:55:50.850 Z","level":"warn","msg":"error closing client during Kill","caller":"plugin/hclog_adapter.go:70","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","wrapped_extras":"errconnection is shut down"} 2023-06-20 10:55:51 messenger mattermost.log warn {"timestamp":"2023-06-20 10:55:50.850 Z","level":"warn","msg":"plugin failed to exit gracefully","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind"} ```

Additional context

Only started crashing recently, it was working fine before. Potentially after upgrade to Mattermost 7.8.6.

Kvark1205 commented 1 year ago

Same here after upgrade server to 7.8.7

I can track in logs that plugin crashes with these errors:

{"timestamp":"2023-06-29 10:05:35.581 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind"}
{"timestamp":"2023-06-29 10:05:37.102 Z","level":"info","msg":"Too many reminder ticks were missed: occurrences between 2023-06-29 08:13:10 +0000 UTC and 2023-06-29 09:55:37 +0000 UTC will be dropped.","caller":"app/plugin_api.go:973","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind"}
{"timestamp":"2023-06-29 10:05:42.564 Z","level":"info","msg":"Draft.Message has size restrictions","caller":"sqlstore/draft_store.go:257","max_characters":16383,"max_bytes":65535}
{"timestamp":"2023-06-29 10:05:44.406 Z","level":"error","msg":"RPC call ExecuteCommand to plugin failed.","caller":"plugin/client_rpc_generated.go:104","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","error":"unexpected EOF"}
{"timestamp":"2023-06-29 10:05:44.407 Z","level":"error","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:79","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","wrapped_extras":"pathplugins/com.github.scottleedavis.mattermost-plugin-remind/server/dist/plugin-linux-amd64pid325errorexit status 2"}
{"timestamp":"2023-06-29 10:05:44.407 Z","level":"error","msg":"/remind command crashed the com.github.scottleedavis.mattermost-plugin-remind plugin. Please contact your system administrator","caller":"web/context.go:117","path":"/api/v4/commands/execute","request_id":"1jpkupkq5bgijb39pfhowhyh7h","ip_addr":"192.168.5.29","user_id":"7mnzn4jz3tbe3prccecch4yxeh","method":"POST","err_where":"ExecutePluginCommand","http_code":500,"error":"ExecutePluginCommand: /remind command crashed the com.github.scottleedavis.mattermost-plugin-remind plugin. Please contact your system administrator, err= Plugin com.github.scottleedavis.mattermost-plugin-remind crashed due to /remind command"}
patrick-fox commented 1 year ago

hi!

Same here.

Mattermost-Version: 7.10.3

Cheers

gucchy55 commented 1 year ago

Same here with Mattermost-Version: 7.10.3

dragonpil commented 1 year ago

Same here with 7.10.3

zerg11 commented 1 year ago

Same here with 8.0.0 after upgraded plugin from 0.45

andr-ec commented 1 year ago

same on mattermost v8.0.1 with latest release.

ohemelaar commented 1 year ago

To all facing the same issue, I found a fix that I shared in #239 but I don't know Go so I don't think it's the right way. If anyone is willing to review it and suggest something better you're welcome.

coderpilot commented 10 months ago

Crashing in 8.1 on three different production servers