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

[Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline #10615

Closed
kbecciv opened this issue Aug 27, 2022 · 49 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2 Needs Reproduction Reproducible steps needed Planning Changes still in the thought process

Comments

@kbecciv
Copy link

kbecciv commented Aug 27, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Run NewDot App
  2. Open any DM chat and turn network off
  3. Send few messages and turn network on
  4. Send and receive some messages

Expected Result:

The user should be able to send messages while offline, they should be delivered correctly once network restored

Actual Result:

Messages that were sent while offline are stuck at the very bottom. New messages are displayed in the wrong position or not displayed at all

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.92.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/187032408-df2220ff-0494-481c-b791-d71e55f67b26.mp4
https://user-images.githubusercontent.com/93399543/187032413-eaa567ec-78b8-4855-840f-6df23fcf6a85.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2022

Triggered auto assignment to @arosiclair (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@arosiclair
Copy link
Contributor

cc @roryabraham @marcaaron @danieldoglas

Would our new NumberUtils.rand64() IDs usage affect the ordering of comments like this?

@danieldoglas
Copy link
Contributor

danieldoglas commented Aug 29, 2022

@arosiclair the ordering could be related since this deploy was reverted and we'll deploy it again today.

But I've also tested locally and it looks like we're trying to do the write requests even when we're offline, which is strange, so It might be something else too!

@marcaaron
Copy link
Contributor

Would our new NumberUtils.rand64() IDs usage affect the ordering of comments like this?

No, because we are still ordering by sequenceNumber or clientID IIRC.

Are we sure these aren't just "stuck comments" i.e. comments that were created in the server but a Pusher update never received? We've seen that happen recently.

@marcaaron
Copy link
Contributor

Looking at the video and I am 99% sure that's what is happening... see how the comments are not just out of order but duplicated as well...

Screen Shot 2022-08-29 at 11 10 19 AM

@marcaaron
Copy link
Contributor

There is no issue with ordering seems like the ordering works just stuck comments.

@marcaaron marcaaron changed the title iPadOS/iOS - Offline - Wrong messages order once some messages was sent during offline iPadOS/iOS - Offline - Stuck comments occur after queued comments send on return from offline Aug 29, 2022
@arosiclair
Copy link
Contributor

Hmm thanks for the insights. It seems like these optimistic comments might always have the highest sequenceNumber. I'll attempt to repro this and see if I can dig in further

@danieldoglas
Copy link
Contributor

danieldoglas commented Aug 30, 2022

@arosiclair maybe this is related? #10524

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2022

@arosiclair Whoops! This issue is 2 days overdue. Let's get this updated quick!

@JmillsExpensify
Copy link

@arosiclair Let's hold on this one, as it's related to a design doc on sequenceNumbers that @roryabraham and @tylerkaraszewski are working on.

@JmillsExpensify JmillsExpensify added the Planning Changes still in the thought process label Sep 2, 2022
@arosiclair arosiclair changed the title iPadOS/iOS - Offline - Stuck comments occur after queued comments send on return from offline [HOLD] iPadOS/iOS - Offline - Stuck comments occur after queued comments send on return from offline Sep 2, 2022
@arosiclair
Copy link
Contributor

maybe this is related? #10524

It does look like this issue was also occurring in the video above (no offline indicator after enabling airplane mode) so I'd like to see that problem resolved before looking into this.

@melvin-bot melvin-bot bot removed the Overdue label Sep 2, 2022
@arosiclair arosiclair added Weekly KSv2 and removed Daily KSv2 labels Sep 2, 2022
@melvin-bot melvin-bot bot added the Overdue label Sep 12, 2022
@arosiclair
Copy link
Contributor

Still on hold

@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2022
@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2022
@arosiclair
Copy link
Contributor

Still on hold.

@roryabraham you said you wouldn't mind picking up an issue like this since you're working on killing sequence numbers?

@melvin-bot melvin-bot bot removed the Overdue label Sep 22, 2022
@mallenexpensify
Copy link
Contributor

For reference, from #expensify-open-source - link

Many duplicate messages showing on the sender side, but not receiver. Tough to reproduce

@mallenexpensify
Copy link
Contributor

@arosiclair , here's the tracking issue for deprecating sequence numbers https://github.com/Expensify/Expensify/issues/227234

@JmillsExpensify
Copy link

Oh hahaha. Gotcha, yeah I experience this bug still a decent amount. I agree that it's going to get fixed by sequence numbers, but I'd rather keep it open so that it's clear to the community that this is a long-known existing bug and any future reports are duplicates. I'll take the work of commenting weekly.

@stitesExpensify
Copy link
Contributor

Sounds like a plan!

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@JmillsExpensify
Copy link

This is still a sporadic issue. Keeping the issue open and on hold.

@JmillsExpensify
Copy link

Still holding.

@JmillsExpensify JmillsExpensify changed the title [HOLD #227234] [Bug] iPadOS/iOS - Offline - Stuck comments occur after queued comments send on return from offline [HOLD #227234] [Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline Nov 22, 2022
@JmillsExpensify
Copy link

Removed iPad from the title since that's not officially supported, though we're still waiting on the Sequence Numbers.

@JmillsExpensify
Copy link

Still waiting on sequence numbers.

@melvin-bot melvin-bot bot added the Overdue label Dec 5, 2022
@JmillsExpensify
Copy link

Still held on sequence numbers.

@stitesExpensify
Copy link
Contributor

Not overdue, I'm unsure why Jason's comment didn't remove the label...

@melvin-bot melvin-bot bot removed the Overdue label Dec 5, 2022
@JmillsExpensify
Copy link

Woah yeah that's pretty weird.

@JmillsExpensify
Copy link

Still on hold for sequence numbers but hopefully that'll we'll be unblocked soon and can circle back on testing.

@JmillsExpensify
Copy link

Held on sequence numbers.

@JmillsExpensify JmillsExpensify changed the title [HOLD #227234] [Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline [HOLD Expensify #227234] [Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline Dec 27, 2022
@melvin-bot melvin-bot bot added the Overdue label Dec 27, 2022
@JmillsExpensify
Copy link

On hold Melvin. "Hold" your horses.

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2022
@JmillsExpensify JmillsExpensify added Monthly KSv2 and removed Weekly KSv2 labels Dec 27, 2022
@JmillsExpensify
Copy link

Still on hold for SN.

@JmillsExpensify
Copy link

Removing hold and re-testing.

@JmillsExpensify JmillsExpensify changed the title [HOLD Expensify #227234] [Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline [Bug] iOS - Offline - Stuck comments occur after queued comments send on return from offline Feb 2, 2023
@JmillsExpensify
Copy link

Unable to reproduce now. Closing and adding the reproduction label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2 Needs Reproduction Reproducible steps needed Planning Changes still in the thought process
Projects
None yet
Development

No branches or pull requests