slack-rs: Cannot login with 0.17

So I’ve updated to 0.17 but RtmClient::login fails. The reported error is just Api("rtm::StartError: JSON error")

Did some digging to get ErrorImpl { code: Message("invalid type: sequence, expected a map"), line: 1, column: 35882 }

That would be "fields":[] contained in a profile of a user in users in the startresponse We have no custom fields because we don’t have the paid features so the list being empty seems fair. The expected type though is an object so it says no https://github.com/slack-rs/slack-api-schemas/blob/master/objects/user_profile.json#L44 50 or so users have "fields": null, the other 20 ish have “fields”: [],

https://api.slack.com/types/user does not not mention what the types of fields should be

but right now it won’t login with 0.17 😦 sad times

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (16 by maintainers)

Most upvoted comments

@dten is working on the fix in a PR in slack-rs-api. Should be in soon. Will release new version there and here when it is merged. On Tue, May 2, 2017 at 1:05 AM Jordon notifications@github.com wrote:

Hi all,

What’s the plan of attack with this one, are we waiting for Slack to resolve the issue? This library is non-functional right now, and I don’t see any easy way to avoid the issue outside of forking and applying @dten https://github.com/dten’s changes.

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/slack-rs/slack-rs/issues/78#issuecomment-298498232, or mute the thread https://github.com/notifications/unsubscribe-auth/AACx4D8C-69_8uIVDBmRd0rIry55ML9Eks5r1rmOgaJpZM4NI_qj .

Will take feedback over to the individual PRs. Thanks for doing that!

I’m a little confused about the whole thing but I have something working

First to the generator so it can generate untagged enum deserialize https://github.com/slack-rs/slack-rs-api/pull/38

Second to the schema to specif fields is an untagged enum of map, or array (of string cause… there is no actual type?) https://github.com/slack-rs/slack-api-schemas/pull/2

look about right?

also slack have filed a bug https://twitter.com/SlackAPI/status/857303209597165568