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

Cog crashes when new user registers (Slack) #1380

Open
Erreinion opened this issue Mar 16, 2017 · 3 comments
Open

Cog crashes when new user registers (Slack) #1380

Erreinion opened this issue Mar 16, 2017 · 3 comments

Comments

@Erreinion
Copy link

Erreinion commented Mar 16, 2017

I have self-registration on. Behaviour is consistent. Every time a new user interacts with the Cog bot on Slack, cog crashes.

Using the cog Docker container. Version 1.0 (pulled today).

By the way, Cog generates hundreds of log messages in a minute when this happens.

Log, first entry:

2017-03-16T13:52:59.274 module=Cog.Chat.Slack.Connector line=3 [error] key :email not found in: %{avatar_hash: "gdf01c943807", fields: nil, first_name: "Sam", image_192: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=192&d=https%3A%2F%2Fa.slack-edge.com%2F7fa9%2Fimg%2Favatars%2Fava_0025-192.png", image_24: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=24&d=https%3A%2F%2Fa.slack-edge.com%2F0180%2Fimg%2Favatars%2Fava_0025-24.png", image_32: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=32&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0025-32.png", image_48: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0025-48.png", image_512: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2F7fa9%2Fimg%2Favatars%2Fava_0025-512.png", image_72: "https://secure.gravatar.com/avatar/df01c9438074866325af64e3345eb949.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0025-72.png", last_name: "manatee", real_name: "Sam manatee", real_name_normalized: "Sam manatee"}
2017-03-16T13:52:59.275 module=Cog.Chat.Slack.Connector line=3 [error]     (cog) lib/cog/chat/slack/connector.ex:255: Cog.Chat.Slack.Connector.make_user/1
    (cog) lib/cog/chat/slack/connector.ex:176: Cog.Chat.Slack.Connector.lookup_user/3
    (cog) lib/cog/chat/slack/connector.ex:284: Cog.Chat.Slack.Connector.annotate_message/2
    (cog) lib/cog/chat/slack/connector.ex:39: Cog.Chat.Slack.Connector.handle_message/2
    (cog) lib/cog/chat/slack/connector.ex:3: Cog.Chat.Slack.Connector.websocket_handle/3
    src/websocket_client.erl:384: :websocket_client.retrieve_frame/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

@Erreinion
Copy link
Author

Is there a way to turn off the requirement for emails, or for cog to handle errors more gracefully?

@christophermaier
Copy link
Collaborator

May have to do with this recent change to how Slack exposes email addresses: https://api.slack.com/changelog/2016-11-10-addressing-email-addresses

@christophermaier
Copy link
Collaborator

@Erreinion There isn't currently a way to disable the requirement for emails, as that's also built into Cog's database schema. Not having an email address would also affect the "reset password by email" functionality. We may be able to alter Cog to better account for this, but as of this moment, I don't think there's a "quick fix" for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants