Inumedia / SlackAPI

.NET Implementation of the Slack team communication platform API.
MIT License
452 stars 243 forks source link

Empty Icons for a Bot Results in Failure To Connect #147

Open johnkoerner opened 6 years ago

johnkoerner commented 6 years ago

There is a bot in our instance that was deleted and the icons property is coming back as an empty array instead of an empty object from the rtm.start call. Ex:

{"id":"BBBBBBBBBB","deleted":true,"name":"screenhero","updated":1535493058,"app_id":"AAAAAAAAA","icons":[]}

This causes JSON deserialization to fail and thus the connection to the slack instance is never established.

gary287 commented 6 years ago

We had the same issue. Same bot name, screenhero. Looks like Slack fixed something because the icons field is no longer returned in the response for the screenhero bot.

gpailler commented 6 years ago

@johnkoerner thanks for the report. Could you provide a callstack of the exception? @gary287 You're saying it was a temporary failure on Slack side and it's back to normal now?

Thanks

gary287 commented 6 years ago

It was temporary for us. We saw the issue most of the day today. A coworker saw this issue and I was going to comment that we were seeing the same thing, but I checked again and the issue was resolved.

gpailler commented 6 years ago

Ok thanks. We still need to investigate because the Bot class doesn't look perfectly valid compared to the Slack documentation and we should ensure it's always deserialized properly

johnkoerner commented 6 years ago

I had an open issue with Slack support today on this and they confirmed it was a bug on their end. They stated they fixed it, so that is why it was only a temporary problem.

Here is what I got from them :

In cases where no icon files are available, we should not even be returning the icons property for the particular bot. Our engineers identified a recent change that caused this issue and just pushed out a fix for it. You should no longer be seeing "icons": [ ] being returned, and hopefully your bot can connect again.