You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Message input displaying twice despite only being sent once in desktop app #466
I've been going trough the code both on Web and the Chat app, and I don't think we can actually fix this without some sort of unique ascending key for each action. And some changes to both the Api and the app. Like Tim mentioned some sort of ROWID.
The problem is that we can't guarantee that the sequenceNumber we create optimistically is the same the API will assign the comment. Most of the times it will be. But when it's not we can't check if it's a repeated message or the user just entering the same message several times (I don't expect that to happen often but it can).
Using the timestamp of the comment when it's created on the app, and then using to check if the comment is repeated might be a solution. By passing it along to the api and then getting it back when the API finishes adding the comment. We could then use it to filter out any comment that has the same timestamp.
@cead22 was working on a solution to utilize ROWID instead of relying on sequence number, so he is probably the best to chime in on this.
I personally don't think we should do any more hacks for this until we have the real solution in place, and it will just be known that sometimes, there might be small bugs like this.
I have a feeling this is related, let me know if not and I'll create a GH.
I was doing some testing with Rafe and he asked that I send multiple chats, a second or two apart. I sent them in numbered order but in the report they show as
ah, yeah, I was double checking to see if it showed differently (ie. in the correct numbered order) on the reports page and it didn't, it matches exactly
Ok I'm unasigning myself from this, as I don't think there is actually anything actionably at the moment and we are using this more to track the issue, and related issues, and that when https://github.com/Expensify/Expensify/issues/141208 is done we can then do something about this.
Activity
abekkala commentedon Sep 11, 2020
I'll note here as well - I'm not using Desktop I'm using Web. This is noted in my original post in this GH.
mallenexpensify commentedon Sep 11, 2020
Thanks @laurenreidexpensify and @abekkala , adding this to milestone! Labeling HIGH because it's happening to multiple people (I've seen it too).
tgolen commentedon Sep 11, 2020
I assume that refreshing makes this go away?
mallenexpensify commentedon Sep 11, 2020
For me, in the past, it has. And I confirmed earlier this week that the person on the other side doesn't see duplicate messages, just the single one
sketchydroide commentedon Sep 15, 2020
I'll take a look into this one as well, as I might have some insight into it, unless you want to take it @tgolen
tgolen commentedon Sep 15, 2020
I'm willing to be it's a sequenceNumber bug, which we know won't be perfect until we are using something like ROWID.
tgolen commentedon Sep 15, 2020
Thanks for looking into it!
sketchydroide commentedon Sep 16, 2020
I've been going trough the code both on Web and the Chat app, and I don't think we can actually fix this without some sort of unique ascending key for each action. And some changes to both the Api and the app. Like Tim mentioned some sort of
ROWID.The problem is that we can't guarantee that the
sequenceNumberwe create optimistically is the same the API will assign the comment. Most of the times it will be. But when it's not we can't check if it's a repeated message or the user just entering the same message several times (I don't expect that to happen often but it can).Using the timestamp of the comment when it's created on the app, and then using to check if the comment is repeated might be a solution. By passing it along to the api and then getting it back when the API finishes adding the comment. We could then use it to filter out any comment that has the same timestamp.
What are your thoughts @tgolen?
tgolen commentedon Sep 16, 2020
@cead22 was working on a solution to utilize ROWID instead of relying on sequence number, so he is probably the best to chime in on this.
I personally don't think we should do any more hacks for this until we have the real solution in place, and it will just be known that sometimes, there might be small bugs like this.
cead22 commentedon Sep 16, 2020
I finally made the issue https://github.com/Expensify/Expensify/issues/141208 and I made it a daily
mallenexpensify commentedon Sep 16, 2020
I have a feeling this is related, let me know if not and I'll create a GH.

I was doing some testing with Rafe and he asked that I send multiple chats, a second or two apart. I sent them in numbered order but in the report they show as
tgolen commentedon Sep 17, 2020
@mallenexpensify there is something a little strange about that screenshot... Why are there relative timestamps? They should look like this:
That would indicate to me that you've got a super old version of the chat app that you're using.
tgolen commentedon Sep 17, 2020
oh oh, sorry... I see. That's a screenshot from the report page on expensify.com.
mallenexpensify commentedon Sep 17, 2020
ah, yeah, I was double checking to see if it showed differently (ie. in the correct numbered order) on the reports page and it didn't, it matches exactly
sketchydroide commentedon Sep 18, 2020
Ok I'm unasigning myself from this, as I don't think there is actually anything actionably at the moment and we are using this more to track the issue, and related issues, and that when https://github.com/Expensify/Expensify/issues/141208 is done we can then do something about this.