mattermost / mattermost-plugin-mscalendar

Mattermost plugin for Microsoft Office365
Apache License 2.0
14 stars 23 forks source link

Intermittent 400 error on login workflow when setting reminder #142

Open DHaussermann opened 4 years ago

DHaussermann commented 4 years ago

Occasionally when setting the option for receiving event reminders, the login workflow becomes unresponsive.

When the bug happens Yes or No buttons both show /api/v4/posts/wfomzeg48tdhxyqf7dtm8es9zc/actions/jb45zqhhytyzjny19dfpfqo9gw:1 Failed to load resource: the server responded with a status of 400 (Bad Request)

Server logs show

{"level":"error","ts":1590091041.1623526,"caller":"mlog/log.go:175","msg":"Plugin failed to ServeHTTP, muxBroker couldn't accept connection","plugin_id":"com.mattermost.mscalendar","serve_http_stream_id":24,"error":"timeout waiting for accept"}
{"level":"error","ts":1590091041.1624587,"caller":"mlog/log.go:175","msg":"Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection","plugin_id":"com.mattermost.mscalendar","error":"timeout waiting for accept"}

I have seen this on various builds but it last occurred on https://github.com/mattermost/mattermost-plugin-mscalendar/commit/d1aef5d45679bd7f72552420c538e100020ec301

If it's related - I only see this issue when the MS Calendar plugin was updated from a previous build. Removing the plugin and re-uploading always solves the issue.

larkox commented 4 years ago

This is weird but I have seen it too. In my case, usually disable and enable the plugin does the trick, if I remember well. The thing is that all steps on the flow should respond with a ephemeral slack attachment, never a Bad Request. Actually, the only part of the code that throws a BadRequest is the OAuth part apparently.

My first guess is that something gets in a weird state and gets broken, but again, not sure where the error might be.

If you find steps to reproduce this consistently, I can drop in a few debug messages and see what is going on.

Kshitij-Katiyar commented 2 months ago

Hey @wiggin77 @DHaussermann, I spent time attempting to reproduce the issue on both local and cloud servers but was unable to do so. I also conducted a thorough review of the code and did not identify any sections that could potentially cause the problem.

Given that this issue was reported some time ago, it may have been resolved in the course of addressing other issues. Therefore, I believe it is not reproducible at this time and recommend that we consider closing it for now.

wiggin77 commented 2 months ago

recommend that we consider closing it for now

@DHaussermann thoughts?