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-18] [$500] Log in - Can't login with google button when open 2 tabs #26161

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

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 29, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go go Login expensify screen
  2. Copy URL on browser
  3. Open a new tab and paste the copied URL -> Enter
  4. Click Google button -> select account and login

Expected Result:

Can login to main space of Expensify

Actual Result:

The page hangs, can't login

Workaround:

Unknown

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: v1.3.57-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

Hang.Login.mp4
Login.mp4
bandicam.2023-08-29.00-26-57-998.mp4

Expensify/Expensify Issue URL:

Issue reported by: @ Le Thi Thu Thuy

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692681137050609

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0185c017a22df15531
  • Upwork Job ID: 1699385050983682048
  • Last Price Increase: 2023-09-06
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 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 Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

@flaviadefaria Still overdue 6 days?! Let's take care of this!

@flaviadefaria flaviadefaria added the External Added to denote the issue can be worked on by a contributor label Sep 6, 2023
@melvin-bot melvin-bot bot changed the title Log in - Can't login with google button when open 2 tabs [$500] Log in - Can't login with google button when open 2 tabs Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0185c017a22df15531

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

melvin-bot bot commented Sep 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

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

@naveedauliat
Copy link

I want to be a contributor

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

📣 @naveedauliat! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@naveedauliat
Copy link

Contributor details
Your Expensify account email: naveedauliat@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/naveedauliat

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@naveedauliat
Copy link

Contributor details
Your Expensify account email: naveedauliat@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/naveedauliat

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@robertKozik
Copy link
Contributor

Hello @naveedauliat, if you'd like to contribute to this issue, please feel free to draft a proposal with your suggested solution. For additional details on contributing, you can refer to our contribution guidelines.

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2023
@Selyatin
Copy link
Contributor

Selyatin commented Sep 6, 2023

Contributor details

Your Expensify account email: selyatinismet@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~016e2c0344b1f727ea

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Selyatin
Copy link
Contributor

Selyatin commented Sep 7, 2023

@robertKozik @izarutskaya

The issue is caused by ActiveClientManager picking the most recently opened browser tab as the Leader Client, meaning all the request processing must be handled through the most recently opened tab to keep all tabs synchronized.

Here's the SequentialQueue line that checks if the current client is the leader or not, then processes the request if it's the leader, otherwise it doesn't take any action.

Removing the leader check causes issues in the app, as demonstrated here.

2023-09-07.03-58-06.mp4

Using the latest opened tab works as displayed here:

2023-09-07.04-05-16.mp4

The most straightforward solution to this problem is disabling the Login form on the page that's not the leader and displaying a message to the user such as You've opened the Login page in a separate tab, please Login from that specific tab.

The complex path involves implementing a synchronization method. This method would include polling the persistent data stored in IndexDB and removing the task that is executed by the current tab to prevent it from being executed by other tabs.

I'll prepare a PR with the straightforward solution, since the complex path doesn't seem to be a viable solution, it would most likely require quite a bit of changes on how the queue is handled. However I might be wrong since I've only dabbled my feet in the project for merely 3 hours.

@robertKozik
Copy link
Contributor

Hello @Selyatin! Your input is greatly appreciated. Could you please create your proposal using this template? I'll review it, and if you're assigned, you can proceed with preparing a PR. You can find additional information in our contributing guidelines.

@Selyatin
Copy link
Contributor

Selyatin commented Sep 7, 2023

Proposal

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

When a user opens multiple tabs of the login page and tries to login with any tab other than the most recently opened one the page will keep in loading state and will not issue any requests to the back-end.

What is the root cause of that problem?

We only make requests from the leader tab which is the most recently opened one. Thus meaning if the user uses any tab that is not the leader, then the app will not make any requests to make sure all tabs are properly synchronized.

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

Informing the user that they've opened a separate tab and that they should use that tab to Login would be the best option. Such as You've opened the Login page in a separate tab, please Login from that specific tab.

What alternative solutions did you explore? (Optional)

We could implement a more complex synchronization method which could be done via fetching the networkRequestQueue from OnxyDB before every action, and whenever a tab is going to start executing a task it would immediately remove the task from networkRequestQueue, to ensure that no other tabs would execute that task.

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.80-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-18. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR:
  • [@robertKozik] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@robertKozik] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@robertKozik] Determine if we should create a regression test for this bug.
  • [@robertKozik] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@robertKozik
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR: Cannot determine any particular PR, it's new edge-case which was not handed
  • [@robertKozik] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
  • [@robertKozik] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • [@robertKozik] Determine if we should create a regression test for this bug. I believe it's highly unlikely for this bug to be reproduced. Therefore, in my opinion, creating a new regression test might be redundant.
  • [@robertKozik] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/A

@flaviadefaria flaviadefaria added Daily KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 16, 2023
@flaviadefaria
Copy link
Contributor

Payment Summary:

@Selyatin requires payment
@robertKozik does not require payment (Contractor)

@Selyatin - $500 - 50% penalty = $250
@ Le Thi Thu Thuy - $50 (reporting bonus)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Overdue Daily KSv2 labels Oct 16, 2023
@flaviadefaria
Copy link
Contributor

@ Le Thi Thu Thuy isn't an actual GH handle so I can't communicate with or pay this contributor.
@Selyatin I can't find you in UW can you please send me your profile link? Thanks!

@situchan
Copy link
Contributor

@thuyle04 is the correct GH handle (found on slack)
cc: @flaviadefaria

@Selyatin
Copy link
Contributor

@flaviadefaria
Copy link
Contributor

@Selyatin offer sent!
@thuyle04 I can't find you in UW can you please send me your profile link? Thanks!

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@flaviadefaria
Copy link
Contributor

Bump @thuyle04!

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@flaviadefaria
Copy link
Contributor

@Selyatin you've been paid!
@thuyle04 please reopen this GH once you're ready to share your UW credentials.

@thuyle04
Copy link

Contributor details
Your Expensify account email: thuy.lethithu@antbuddy.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@thuyle04
Copy link

Contributor details
Your Expensify account email: thuy.lethithu@antbuddy.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@flaviadefaria flaviadefaria reopened this Oct 23, 2023
@flaviadefaria
Copy link
Contributor

@thuyle04 thanks! I sent you an offer, now I just need you to accept it so that I can process your payment.

@thuyle04
Copy link

@flaviadefaria I think I will be paid 250 USD instead of 50 USD (old payment structure ) because the new payment structure was just changed on August 31 while the bug was approved before that.

@flaviadefaria
Copy link
Contributor

flaviadefaria commented Oct 23, 2023

Cool, np! You can accept the contract and I'll pay the 200 difference as a bonus. Can you let me know once you have accepted it?

@flaviadefaria
Copy link
Contributor

@thuyle04 you've been paid so closing this.

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants