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

Crash after first execution of retrieving mails or infinite loop #27

Open
HighIander opened this issue Feb 16, 2021 · 3 comments
Open
Labels
Type/Bug Something isn't working

Comments

@HighIander
Copy link

HighIander commented Feb 16, 2021

The plugin connects correctly to my imap, pulls the messages, puts them in the correct thread but then often crashes:

{"level":"info","ts":1613511169.067622,"caller":"bleveengine/bleve.go:267","msg":"UpdateConf Bleve"}
{"level":"error","ts":1613511337.1845307,"caller":"plugin/health_check.go:59","msg":"Health check failed for plugin","id":"com.mattermost.mailermost-plugin","error":"Plugin RPC connection is not responding"}
{"level":"warn","ts":1613511337.1847084,"caller":"plugin/hclog_adapter.go:69","msg":"error closing client during Kill","plugin_id":"com.mattermost.mailermost-plugin","wrapped_extras":"errconnection is shut down"}
{"level":"warn","ts":1613511337.184723,"caller":"plugin/hclog_adapter.go:71","msg":"plugin failed to exit gracefully","plugin_id":"com.mattermost.mailermost-plugin"}

Once I restart, it pulls the same messages from imap again, creating duplicates, and then crashes again.

If it doesn't crash, it still pulls the same messages over and over again. On the server, the deleted flag is set, but the plugin never checks if the flag is set before adding it to mattermost. I think the expected behaviour would be that the mesages actually get deleted. I believe that this only happens once the client is actively closed - which seems to never happen. after the messages are processed.

@HighIander HighIander changed the title Crash after first execution of retrieving mails Crash after first execution of retrieving mails or infinite loop Feb 16, 2021
@hanzei
Copy link
Contributor

hanzei commented Feb 17, 2021

@HighIander Could you please set the log level to debug and check if you see any messages before "Health check failed for plugin"?

@hanzei hanzei added the Type/Bug Something isn't working label Feb 17, 2021
@HighIander
Copy link
Author

@hanzei thanks for asking! However, the logging level was already set to debug, hence there is no more information in the log, unfortunately.
However, the crash does not occur anymore after I deleted all mail, one of which was a mail that was not a reply to mattermost but a regular mail. I saw that the crash happened right after processing the mails before this one, the others after were not processed. So I figured it might due to this one mail.
Anyhow, the problem of continuous duplicates persists. I'm not sure if it is related, but if the mailbox is empty, the plugin writes an error to the log everytime it checks - to it sounds more like a debug info, should not be an error, right?
{"level":"error","ts":1613592847.2243123,"caller":"mlog/sugar.go:23","msg":"Failed to poll mailbox","plugin_id":"com.mattermost.mailermost-plugin","error":"No matching messages"}

@pat-s
Copy link

pat-s commented Mar 22, 2021

I also saw this. Cleared all messages and now it seems to work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants