slack-rs
slack-rs copied to clipboard
missing `error` variant?
INFO :tri::controller::rtm : Connected to Slack!
INFO :slack : Unable to deserialize slack message, error: Json Error: ErrorImpl { code: Message("unknown variant `error`, expected one of `hello`, `message`, `user_typing`, `channel_marked`, `channel_created`, `channel_joined`, `channel_left`, `channel_deleted`, `channel_rename`, `channel_archive`, `channel_un_archive`, `channel_history_changed`, `im_created`, `im_open`, `im_close`, `im_marked`, `im_history_changed`, `group_joined`, `group_left`, `group_open`, `group_close`, `group_archive`, `group_un_archive`, `group_rename`, `group_marked`, `group_history_changed`, `file_created`, `file_shared`, `file_un_shared`, `file_public`, `file_private`, `file_change`, `file_deleted`, `file_comment_added`, `file_comment_edited`, `file_comment_deleted`, `pin_added`, `pin_removed`, `presence_change`, `manual_presence_change`, `pref_change`, `user_change`, `team_join`, `star_added`, `star_removed`, `reaction_added`, `re
INFO :slack : Unable to deserialize slack message, error: Json Error: ErrorImpl { code: Message("missing field `type`"), line: 1, column: 2 }: json: {}
ERROR:tri::controller : Websocket Error: Protocol("Connection reset without closing handshake")
Source of Tri, just in case I'm using the library incorrectly or something.
Not sure what's happening. Can't see anything obviously wrong from browsing your source.
The json you're getting seems to be {}
, is the first message longer?
Oh, huh, seems like papertrail truncated the logs. The full entry there is:
INFO :slack : Unable to deserialize slack message, error: Json Error: ErrorImpl { code: Message("unknown variant `error`, expected one of `hello`, `message`, `user_typing`, `channel_marked`, `channel_created`, `channel_joined`, `channel_left`, `channel_deleted`, `channel_rename`, `channel_archive`, `channel_un_archive`, `channel_history_changed`, `im_created`, `im_open`, `im_close`, `im_marked`, `im_history_changed`, `group_joined`, `group_left`, `group_open`, `group_close`, `group_archive`, `group_un_archive`, `group_rename`, `group_marked`, `group_history_changed`, `file_created`, `file_shared`, `file_un_shared`, `file_public`, `file_private`, `file_change`, `file_deleted`, `file_comment_added`, `file_comment_edited`, `file_comment_deleted`, `pin_added`, `pin_removed`, `presence_change`, `manual_presence_change`, `pref_change`, `user_change`, `team_join`, `star_added`, `star_removed`, `reaction_added`, `reaction_removed`, `emoji_changed`, `commands_changed`, `team_plan_change`, `team_pref_change`, `team_rename`, `team_domain_change`, `email_domain_changed`, `bot_added`, `bot_changed`, `accounts_changed`, `team_migration_started`, `reconnect_url`, `message_sent`, `message_error`, `desktop_notification`"), line: 1, column: 15 }: json: {"type":"error","error":{"msg":"Socket URL has expired","code":1}}
https://api.slack.com/rtm says that error occurs if you were too slow to connect after receiving the socket url or tried to use it twice