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

[$250] IOS - Chat - Show error when access start chat 2nd time in off-mode #42916

Closed
1 of 6 tasks
lanitochka17 opened this issue May 31, 2024 · 24 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented May 31, 2024

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


Version Number: 1.4.78-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Issue found when executing PR #42679

Action Performed:

  1. Go offline
  2. Create a new room from FAB
  3. Open the new room page again from FAB

Expected Result:

Can start a new chat

Actual Result:

Show error when access starts to chat 2nd time in off-mode

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6496979_1717125695227.RPReplay_Final1717123192__1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0136e2911a526a72fe
  • Upwork Job ID: 1797891905991876608
  • Last Price Increase: 2024-06-18
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 31, 2024
Copy link

melvin-bot bot commented May 31, 2024

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@kadiealexander FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@melvin-bot melvin-bot bot added the Overdue label Jun 3, 2024
Copy link

melvin-bot bot commented Jun 3, 2024

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

@kadiealexander kadiealexander added the External Added to denote the issue can be worked on by a contributor label Jun 4, 2024
@melvin-bot melvin-bot bot changed the title Chat - Show error when access start chat 2nd time in off-mode [$250] Chat - Show error when access start chat 2nd time in off-mode Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0136e2911a526a72fe

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

melvin-bot bot commented Jun 4, 2024

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

@dominictb
Copy link
Contributor

dominictb commented Jun 4, 2024

Proposal

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

Show error when access starts to chat 2nd time in offline mode

What is the root cause of that problem?

  • The root cause for the crash is explained here
  • After the crash is fixed, when trying to create the room the second time, the modal will be automatically dismissed, the root cause is in
    Report.clearNewRoomFormError();
    , the app is clearing the form loading state only when it's mounted. When the loading state is initially true, it already causes the modal to be dismissed in here, before the "clear isLoading" useEffect finishes running.

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

  • The crash will be fixed by this proposal in another issue

  • The modal automatically dismissed issue can be fixed by clearing the isLoading when the component is unmounted too (or can change to clearing when the screen is focused/loses focus)

useEffect(() => {
    Report.clearNewRoomFormError();

    return () => {
        Report.clearNewRoomFormError();
    }
}, []);

Or clearing whenever we call Navigation.dismissModal in the page should also be ok

What alternative solutions did you explore? (Optional)

For the second issue, we can remove this block and the related error clearing logic entirely. They were meant to support the use case that there's a duplicate room name error thrown from the back-end, but we have the front-end validation logic for that in

} else if (ValidationUtils.isExistingRoomName(values.roomName, reports, values.policyID ?? '')) {
already so that block is no longer needed.

And we already have the dismissModal logic after the user creates the room here

Navigation.dismissModalWithReport(policyReport);

@dominictb
Copy link
Contributor

Proposal updated to add the fix for another observed issue

@badeggg
Copy link
Contributor

badeggg commented Jun 4, 2024

@dominictb Hi, do you know why setIsInputInitialized(true); is called many times in iOS when offline? I can not find out

@bernhardoj
Copy link
Contributor

Same crash root cause as #42824

image

@badeggg
Copy link
Contributor

badeggg commented Jun 5, 2024

Proposal

Same root cause with #42824, same proposal

@melvin-bot melvin-bot bot added the Overdue label Jun 7, 2024
@dominictb
Copy link
Contributor

Proposal updated to emphasize that 1 part of the issue will be fixed in #42824

Copy link

melvin-bot bot commented Jun 7, 2024

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

@kadiealexander
Copy link
Contributor

@abdulrahuman5196 bump!

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
@kadiealexander kadiealexander removed the External Added to denote the issue can be worked on by a contributor label Jun 11, 2024
@kadiealexander kadiealexander added Overdue External Added to denote the issue can be worked on by a contributor labels Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
@kadiealexander
Copy link
Contributor

Hey @ishpaul777 could you please review the proposals here? Thank you!

Copy link

melvin-bot bot commented Jun 11, 2024

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

@ishpaul777
Copy link
Contributor

Reviewing! 👀

@ishpaul777
Copy link
Contributor

hmm it appears that this issue partially be fixed by #42824 @kadiealexander Can we please put a HOLD and then retest if there's any other issue left for us to fix.

Copy link

melvin-bot bot commented Jun 14, 2024

@kadiealexander @ishpaul777 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@ishpaul777
Copy link
Contributor

Holding PR for this is deployed. do we still have any issues left to fix @dominictb ? if yes, please share videos/steps Thanks!

@kadiealexander
Copy link
Contributor

Requested a retest here

@kbecciv kbecciv changed the title [$250] Chat - Show error when access start chat 2nd time in off-mode [$250] IOS - Chat - Show error when access start chat 2nd time in off-mode Jun 18, 2024
@kbecciv
Copy link

kbecciv commented Jun 18, 2024

Issue is no longer reproduce!

RPReplay_Final1718720116.MP4

Copy link

melvin-bot bot commented Jun 18, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Jun 19, 2024
@ishpaul777
Copy link
Contributor

just want to make sure, @dominictb would you like to report any related issue left to fix here ? if no, i think we are good to close this @kadiealexander

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Development

No branches or pull requests

8 participants