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

[HOLD for payment 2023-10-02] [HOLD for payment 2023-07-24] [$1000] Failed Room Termination: User Continues Chatting in Android App After Leaving Room on Web #21518

Closed
2 of 6 tasks
kavimuru opened this issue Jun 25, 2023 · 92 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jun 25, 2023

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. Login with User A ( mobile number) > create a workspace with user B and C
  2. Create a room in public mode
  3. Send the public room link or QR code to User B
  4. Open User B in android as well as Desktop chrome and join the room across web and app using link & QR code
  5. From User B, send messages to the room
  6. From User B, Leave the room from web
  7. Verify if User B can still send messages from android app

Expected Result:

When a user leaves a room on the web version, their participation in the room should be terminated across all platforms, including the Android app. They should not be able to send messages or interact within the room.

Actual Result:

After a user leaves a room on the web version, they can still send messages and participate in the chat room using the Android app. This behaviour contradicts the expected result and allows the user to continue engaging with the room despite their departure on the web.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.32-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

first.web.mp4
second.android.mp4
Recording.871.mp4

Expensify/Expensify Issue URL:
Issue reported by: @avi-shek-jha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687048129225459

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012dc182ad93ca216b
  • Upwork Job ID: 1674172420971741184
  • Last Price Increase: 2023-07-05
  • Automatic offers:
    • wildan-m | Contributor | 27225915
    • avi-shek-jha | Reporter | 27225918
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 25, 2023

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 25, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Jun 27, 2023
@johncschuster
Copy link
Contributor

Working on reproducing this behavior this afternoon.

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2023
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Jun 28, 2023
@melvin-bot melvin-bot bot changed the title Failed Room Termination: User Continues Chatting in Android App After Leaving Room on Web [$1000] Failed Room Termination: User Continues Chatting in Android App After Leaving Room on Web Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Job added to Upwork: https://www.upwork.com/jobs/~012dc182ad93ca216b

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Current assignee @johncschuster is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Jun 29, 2023

how can i create a room? I don't have this option on FAB

image

@melvin-bot melvin-bot bot added the Overdue label Jun 30, 2023
@allroundexperts
Copy link
Contributor

allroundexperts commented Jul 1, 2023

how can i create a room? I don't have this option on FAB

image

@rayane-djouah You need to manually set permissions in Permission.js file.

@melvin-bot melvin-bot bot removed the Overdue label Jul 1, 2023
@jeet-dhandha
Copy link
Contributor

@allroundexperts why am i mentioned here 🤔 ?

@allroundexperts
Copy link
Contributor

@allroundexperts why am i mentioned here 🤔 ?

Ah, Sorry, I meant to mention @rayane-djouah.

@nishancx
Copy link
Contributor

nishancx commented Jul 2, 2023

(...redacted)

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

@johncschuster, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@wildan-m
Copy link
Contributor

wildan-m commented Jul 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Failed Room Termination: User Continues Chatting in Android App After Leaving Room on Web

What is the root cause of that problem?

The public room is re-opened on the second device (android) so the user will re-joined

What changes do you think we should make in order to solve the problem?

IMO, adding conditional logic to skip fetchReportIfNeeded() is not enough, since the report will still persist and the report can be reopened by another trigger e.g. onVisibilityChange

I'd propose adding an early return if the report is deleted.

We can change this code:

// If you already have a report open and are deeplinking to a new report on native,
// the ReportScreen never actually unmounts and the reportID in the route also doesn't change.
// Therefore, we need to compare if the existing reportID is the same as the one in the route
// before deciding that we shouldn't call OpenReport.
const onyxReportID = this.props.report.reportID;
const routeReportID = getReportID(this.props.route);
if (onyxReportID === prevProps.report.reportID && (!onyxReportID || onyxReportID === routeReportID)) {
return;
}

To:

        const onyxReportID = this.props.report.reportID;
        const prevOnyxReportID = prevProps.report.reportID;
        const routeReportID = getReportID(this.props.route);

        // navigate to concierge when the room removed from another device (e.g. user leaving a room)
        // the report will not really null when removed, it will have defaultProps properties and values
        if (prevOnyxReportID && prevOnyxReportID === routeReportID && !onyxReportID && _.isEqual(this.props.report, defaultProps.report)) {
            Navigation.goBack();
            Report.navigateToConciergeChat();
            // isReportRemoved will prevent <FullPageNotFoundView> showing when navigating
            this.setState({isReportRemoved: true});
            return;
        }

To determine if a report is removed because props reportID is possible to null when transitioning to a new report or not readily stored in Onyx.

To prevent the page not found page shown before navigation, we can declare the new state:

            isReportRemoved: false,

and modify FullPageNotFoundView condition to

                    <FullPageNotFoundView
                        shouldShow={(!this.props.report.reportID && !this.props.report.isLoadingReportActions && !isLoading && !this.state.isReportRemoved) || shouldHideReport}
Result - return only
Recording.28.mp4
Result - navigateToConcierge + return
navigate.to.concierge.webm

What alternative solutions did you explore? (Optional)

N/A

@nishancx
Copy link
Contributor

nishancx commented Jul 5, 2023

@wildan-m I noticed that with both our proposals, when Device A leaves room and then Device B refreshes the page, the user rejoins the room.

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@johncschuster
Copy link
Contributor

@allroundexperts can you take a look at the above proposals when you get a moment? Do we need to keep looking?

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@wildan-m
Copy link
Contributor

wildan-m commented Jul 5, 2023

@nishancx, how can we refresh the page in the native app?

@luacmartins
Copy link
Contributor

luacmartins commented Oct 6, 2023

I wasn't aware of that discussion, but I just caught up, thanks for the link. I agree that it's not a regression and that we should close out this issue once payment is issued. I also agree that we should create a new issue for the navigation requirement change. @wildan-m wanna report the issue and I can create it?

@wildan-m
Copy link
Contributor

wildan-m commented Oct 6, 2023

@luacmartins sure, I'll post it to expensify-bugs, please wait

@wildan-m
Copy link
Contributor

wildan-m commented Oct 6, 2023

@luacmartins posted here.

@wildan-m
Copy link
Contributor

wildan-m commented Oct 6, 2023

@luacmartins good news! the requirement changes have been resolved by this PR.

@luacmartins
Copy link
Contributor

Cool, seems like we're all set then and just need to process payment for this issue

@wildan-m
Copy link
Contributor

wildan-m commented Oct 9, 2023

👍

@wildan-m
Copy link
Contributor

Bump @luacmartins, @johncschuster

@luacmartins
Copy link
Contributor

@johncschuster could you please help with payment?

@wildan-m
Copy link
Contributor

Bump @johncschuster, @luacmartins

@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Oct 16, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

📣 @wildan-m 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

📣 @avi-shek-jha 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@johncschuster
Copy link
Contributor

Ok, the job seems to not want to open back up. I'm going to create an issue just for payment for this. Standby.

@johncschuster
Copy link
Contributor

@wildan-m can you please go to the linked issue above and comment on it so I can assign it to you? That should get the job offer sent to you correctly.

@avi-shek-jha
Copy link

Hello, as a reporter, I only received an offer for 50 dollars. I am aware of the new policies. But, I reported this on June 17 and the issue was created on June 25 almost 2 months before the new policies took place. Can anyone please send me the offer link with corrected amount of 250 USD?

@johncschuster
Copy link
Contributor

Hi @avi-shek-jha, thanks for calling that out. I will correct that in Upwork.

@johncschuster
Copy link
Contributor

@avi-shek-jha, I've corrected that in Upwork. Can you please accept the offer? I'll take care of payment once you've done that.

@avi-shek-jha
Copy link

Thank you John. I appreciate it. I have accepted the offer.

@johncschuster
Copy link
Contributor

Ok everyone! I'm handling payments on this issue. I'm going to close this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests