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

wee-slack started repeating my messages twice #606

Closed
ieure opened this Issue Aug 15, 2018 · 24 comments

Comments

Projects
None yet
@ieure

ieure commented Aug 15, 2018

Probably Slack did something terrible, but all of a sudden, in the middle of a conversation, I started getting any message I sent echoed back to me twice instead of only once.

I restarted and nothing changed.

@sjl

This comment has been minimized.

Show comment
Hide comment
@sjl

sjl Aug 15, 2018

I'm also seeing this. Every message I send appears duplicated in the buffer. It happens in both in normal channels and in DMs. Messages from other people are fine.

sjl commented Aug 15, 2018

I'm also seeing this. Every message I send appears duplicated in the buffer. It happens in both in normal channels and in DMs. Messages from other people are fine.

@maxres

This comment has been minimized.

Show comment
Hide comment
@maxres

maxres Aug 15, 2018

This might be slack, because I'm also seeing this.

maxres commented Aug 15, 2018

This might be slack, because I'm also seeing this.

@ieure

This comment has been minimized.

Show comment
Hide comment
@ieure

ieure Aug 15, 2018

This might be slack, because I'm also seeing this.

Agree that something likely changed on their backend. Their web client doesn't exhibit this behavior, only wee-slack.

ieure commented Aug 15, 2018

This might be slack, because I'm also seeing this.

Agree that something likely changed on their backend. Their web client doesn't exhibit this behavior, only wee-slack.

@brett

This comment has been minimized.

Show comment
Hide comment
@brett

brett Aug 15, 2018

Also seeing this.

brett commented Aug 15, 2018

Also seeing this.

@2Shirt

This comment has been minimized.

Show comment
Hide comment
@2Shirt

2Shirt commented Aug 15, 2018

Same

@airencracken

This comment has been minimized.

Show comment
Hide comment
@airencracken

airencracken Aug 15, 2018

Also started seeing this unfortunate behavior today. Cranked up the debugging log level, but not seeing anything super obvious.

airencracken commented Aug 15, 2018

Also started seeing this unfortunate behavior today. Cranked up the debugging log level, but not seeing anything super obvious.

@trygveaa

This comment has been minimized.

Show comment
Hide comment
@trygveaa

trygveaa Aug 16, 2018

Collaborator

This is not happening for me, but I got a debug log from @sjl on IRC. What's happening for you is that you receive both a response (see "Handling responses" on https://api.slack.com/rtm) and a message event. Previously (and still currently for me), you would only receive a response for messages sent from wee-slack, and only a message event for messages from others or from other clients.

I guess we'll have to check if we've already processed the message, and not print it if that's the case.

Collaborator

trygveaa commented Aug 16, 2018

This is not happening for me, but I got a debug log from @sjl on IRC. What's happening for you is that you receive both a response (see "Handling responses" on https://api.slack.com/rtm) and a message event. Previously (and still currently for me), you would only receive a response for messages sent from wee-slack, and only a message event for messages from others or from other clients.

I guess we'll have to check if we've already processed the message, and not print it if that's the case.

@ieure

This comment has been minimized.

Show comment
Hide comment
@ieure

ieure Aug 16, 2018

This stopped happening within the last few minutes.

I hate Slack.

ieure commented Aug 16, 2018

This stopped happening within the last few minutes.

I hate Slack.

@sjl

This comment has been minimized.

Show comment
Hide comment
@sjl

sjl Aug 16, 2018

@ieure it stopped happening because Slack is down https://status.slack.com/

sjl commented Aug 16, 2018

@ieure it stopped happening because Slack is down https://status.slack.com/

@ieure

This comment has been minimized.

Show comment
Hide comment
@ieure

ieure Aug 16, 2018

@ieure it stopped happening because Slack is down https://status.slack.com/

I hate Slack.

ieure commented Aug 16, 2018

@ieure it stopped happening because Slack is down https://status.slack.com/

I hate Slack.

@grumps

This comment has been minimized.

Show comment
Hide comment
@grumps

grumps Aug 16, 2018

https://github.com/grumps/wee-slack/tree/issue-606-doubling-messages

Here's what I know that needs to be fixed:

  • channel messages
  • reply 1 foobar doesn't double message
  • thread buffers don't double message

I've forked and added a small fix that prevents doubling of messages in channels.

Still working on thread messages and reply messages. Not sure when I'll get to that. I've not touched this code base before and just trying to catch up with it is a bit steep.

I've had some troubles tracking down where/what is inserting into the channel.messages ordered dict and causing a buffer print. I'm also not sure if my handling for the main channels is great. It'd be nice if there were one place to prevent all of this. If someone has some tips, i'll gladly take them.

grumps commented Aug 16, 2018

https://github.com/grumps/wee-slack/tree/issue-606-doubling-messages

Here's what I know that needs to be fixed:

  • channel messages
  • reply 1 foobar doesn't double message
  • thread buffers don't double message

I've forked and added a small fix that prevents doubling of messages in channels.

Still working on thread messages and reply messages. Not sure when I'll get to that. I've not touched this code base before and just trying to catch up with it is a bit steep.

I've had some troubles tracking down where/what is inserting into the channel.messages ordered dict and causing a buffer print. I'm also not sure if my handling for the main channels is great. It'd be nice if there were one place to prevent all of this. If someone has some tips, i'll gladly take them.

@hkdd

This comment has been minimized.

Show comment
Hide comment
@hkdd

hkdd Aug 16, 2018

Thanks Grumps, that resolve the issue for me.

hkdd commented Aug 16, 2018

Thanks Grumps, that resolve the issue for me.

@grumps

This comment has been minimized.

Show comment
Hide comment
@grumps

grumps Aug 16, 2018

@hkdd I think this is rather incomplete.. just discovered edits wont change update the message.

grumps commented Aug 16, 2018

@hkdd I think this is rather incomplete.. just discovered edits wont change update the message.

@trygveaa trygveaa closed this in 68966be Aug 16, 2018

@trygveaa

This comment has been minimized.

Show comment
Hide comment
@trygveaa

trygveaa Aug 16, 2018

Collaborator

This should now be fixed. Please write a comment if you still encounter any issues.

Collaborator

trygveaa commented Aug 16, 2018

This should now be fixed. Please write a comment if you still encounter any issues.

@joannac-

This comment has been minimized.

Show comment
Hide comment
@joannac-

joannac- Aug 17, 2018

Updated wee-slack.py, and restarted weechat, but still seeing doubled messages

joannac- commented Aug 17, 2018

Updated wee-slack.py, and restarted weechat, but still seeing doubled messages

@hkdd

This comment has been minimized.

Show comment
Hide comment
@hkdd

hkdd Aug 17, 2018

Thanks everyone, I appreciate all the hard work. I'm a huge fan of wee-slack.

hkdd commented Aug 17, 2018

Thanks everyone, I appreciate all the hard work. I'm a huge fan of wee-slack.

@jaywilliams

This comment has been minimized.

Show comment
Hide comment
@jaywilliams

jaywilliams Aug 17, 2018

Wee-slack makes Slack bearable. Thanks so much!

jaywilliams commented Aug 17, 2018

Wee-slack makes Slack bearable. Thanks so much!

@wohali

This comment has been minimized.

Show comment
Hide comment
@wohali

wohali Aug 17, 2018

Contributor

@trygveaa Since applying the patch for this issue, any messages that @-mention me are going missing. I see the buffer light up as having new messages, but when I change to the buffer, the message is not there. Neither is the message in the logfile weechat writes to disk.

Contributor

wohali commented Aug 17, 2018

@trygveaa Since applying the patch for this issue, any messages that @-mention me are going missing. I see the buffer light up as having new messages, but when I change to the buffer, the message is not there. Neither is the message in the logfile weechat writes to disk.

@trygveaa

This comment has been minimized.

Show comment
Hide comment
@trygveaa

trygveaa Aug 17, 2018

Collaborator

@joannac-: Hm, are you sure you are running the newest version from master? If so, can you enable debug mode, set level to 0 (see https://github.com/wee-slack/wee-slack#development) and paste the output from the debug buffer when you're posting a message? Make sure to sensor out the token.

@wohali: By applying the patch, do you mean the patch mentioned above, or are you running master?

Collaborator

trygveaa commented Aug 17, 2018

@joannac-: Hm, are you sure you are running the newest version from master? If so, can you enable debug mode, set level to 0 (see https://github.com/wee-slack/wee-slack#development) and paste the output from the debug buffer when you're posting a message? Make sure to sensor out the token.

@wohali: By applying the patch, do you mean the patch mentioned above, or are you running master?

@joannac-

This comment has been minimized.

Show comment
Hide comment
@joannac-

joannac- Aug 18, 2018

Sorry @trygveaa, user error >.> All good.

joannac- commented Aug 18, 2018

Sorry @trygveaa, user error >.> All good.

@trygveaa

This comment has been minimized.

Show comment
Hide comment
@trygveaa

trygveaa Aug 18, 2018

Collaborator

@wohali: I wasn't able to reproduce what you describe, but I found another bug I introduced with the fix (which may be the bug you saw, not sure). If you receive a message after history was requested, but before the response arrived (i.e. when the buffer says "getting channel history"), it would be lost when the history loads (because the buffer is cleared, and then it would't be reprinted because of the duplicate check). This is now fixed.

Collaborator

trygveaa commented Aug 18, 2018

@wohali: I wasn't able to reproduce what you describe, but I found another bug I introduced with the fix (which may be the bug you saw, not sure). If you receive a message after history was requested, but before the response arrived (i.e. when the buffer says "getting channel history"), it would be lost when the history loads (because the buffer is cleared, and then it would't be reprinted because of the duplicate check). This is now fixed.

@wohali

This comment has been minimized.

Show comment
Hide comment
@wohali

wohali Aug 20, 2018

Contributor

@trygveaa Thanks, that was the exact issue! I'll update (once I update my patches)

Contributor

wohali commented Aug 20, 2018

@trygveaa Thanks, that was the exact issue! I'll update (once I update my patches)

@onewheelskyward

This comment has been minimized.

Show comment
Hide comment
@onewheelskyward

onewheelskyward Aug 22, 2018

It happens for me in the IRC client as well.

onewheelskyward commented Aug 22, 2018

It happens for me in the IRC client as well.

@trygveaa

This comment has been minimized.

Show comment
Hide comment
@trygveaa

trygveaa Aug 22, 2018

Collaborator

@onewheelskyward: What do you mean by in the IRC client? And are you sure you are running the latest version?

Collaborator

trygveaa commented Aug 22, 2018

@onewheelskyward: What do you mean by in the IRC client? And are you sure you are running the latest version?

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