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

[$500] mWeb - App gets stuck on splash screen (launch screen) when we open it from the Floating button of "Chat with concierge". #28131

Closed
1 of 6 tasks
kbecciv opened this issue Sep 25, 2023 · 32 comments
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 Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Sep 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 to NewExpensify on the Android App
  2. Click on your Profile > Help
  3. Now Kill the "New Expensify" app running in background.
  4. Go back to Help page in your browser. And Touch on floating button of "Chat with concierge"(Triangle icon).

Expected Result:

App should open without getting stuck on launch screen and chat box with Concierge should appear.

Actual Result:

App getting stuck on launch screen and no further activity

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: 1.3.7.30
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

Screenrecorder-2023-09-20-12-07-07-361.mp4
Screen_Recording_20230923_101807_New.Expensify.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @nileshahir286
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695193313415339

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b4f60c9d85a22f93
  • Upwork Job ID: 1706285911617265664
  • Last Price Increase: 2023-10-09
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title mWeb - App gets stuck on splash screen (launch screen) when we open it from the Floating button of "Chat with concierge". [$500] mWeb - App gets stuck on splash screen (launch screen) when we open it from the Floating button of "Chat with concierge". Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01b4f60c9d85a22f93

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

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

melvin-bot bot commented Sep 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
Copy link

melvin-bot bot commented Sep 25, 2023

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@bernhardoj
Copy link
Contributor

Proposal

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

App stuck on the splash screen when deep link to concierge chat.

What is the root cause of that problem?

We hide the splash screen if the navigation is ready, isSidebarLoaded is true, and hasAttemptedToOpenPublicRoom is true. The failing condition here is the isSidebarLoaded. The value is always false.

App/src/Expensify.js

Lines 109 to 110 in f20eba2

const shouldInit = isNavigationReady && (!isAuthenticated || props.isSidebarLoaded) && hasAttemptedToOpenPublicRoom;
const shouldHideSplash = shouldInit && !isSplashHidden;

isSidebarLoaded will be set to true when LHN is mounted.

componentDidMount() {
App.setSidebarLoaded();

However, it is never called and the reason for that is because we wrap it with Freeze and when active, looks like the componentDidMount is also frozen.

<FreezeWrapper keepVisible={!props.isSmallScreenWidth}>
<BaseSidebarScreen
// eslint-disable-next-line react/jsx-props-no-spreading

But if we look at the freeze implementation, we actually don't want to freeze the previous screen/page, but why the LHN is frozen if we only open concierge chat?

const unsubscribe = navigation.addListener('state', () => {
// if the screen is more than 1 screen away from the current screen, freeze it,
// we don't want to freeze the screen if it's the previous screen because the freeze placeholder
// would be visible at the beginning of the back animation then
if (navigation.getState().index - screenIndexRef.current > 1) {
setIsScreenBlurred(true);
} else {
setIsScreenBlurred(false);
}

That is because when we deep link to /concierge page, it will push ConciergePage to the nav stack and then navigate to the concierge report screen. So the nav stack looks like:
[LHN (frozen), ConciergePage, ReportScreen (concierge chat)]

The issue here is that the ConciergePage shouldn't be in the stack anymore. It's just a utility page to navigate to the user concierge chat. In the current code, we already call goBack to pop the ConciergePage from the stack before navigating to the concierge chat, but if we look at the log, the go-back navigation fails because the navigation is not ready yet.

useFocusEffect(() => {
if (_.has(props.session, 'authToken')) {
// Pop the concierge loading page before opening the concierge report.
Navigation.goBack(ROUTES.HOME);
Report.navigateToConciergeChat();

If the ConciergePage is popped out from the stack, LHN won't be frozen anymore, and isSidebarLoaded will be set to true.

This concierge page issue has the same root cause as #25839

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

Wait for the navigation to be ready before doing the navigation action.

Navigation.isNavigationReady().then(() => {
    // navigation code here
});

@Christinadobrzyn
Copy link
Contributor

I can't reproduce this and we didn't mark what app this is affecting in the OP - Asking the reporter. https://expensify.slack.com/archives/C049HHMV9SM/p1695670361538309?thread_ts=1695193313.415339&cid=C049HHMV9SM

@Christinadobrzyn Christinadobrzyn added the Needs Reproduction Reproducible steps needed label Sep 25, 2023
@nileshahir286
Copy link

I can't reproduce this and we didn't mark what app this is affecting in the OP - Asking the reporter. https://expensify.slack.com/archives/C049HHMV9SM/p1695670361538309?thread_ts=1695193313.415339&cid=C049HHMV9SM

issue is in Platform: Android/Native. Please follow the reproduction steps.(Issue is Only in Android device)

@Christinadobrzyn
Copy link
Contributor

I can reproduce this on the Android app. @jjcoffee let me know what you think of the proposal when you have time!

@Christinadobrzyn Christinadobrzyn removed the Needs Reproduction Reproducible steps needed label Sep 27, 2023
@jjcoffee
Copy link
Contributor

@bernhardoj's proposal LGTM! I guess introducing the Freeze on native is what reintroduced the issue? I wonder if it's best to add the fix for native only in that case?

We also need to make sure to thoroughly test signed in/out as mentioned here.

🎀👀🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@kevinksullivan kevinksullivan removed their assignment Sep 29, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@Christinadobrzyn
Copy link
Contributor

Hey @bondydaa could you take a peek at this decision here - #28131 (comment)

Thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 3, 2023
@Christinadobrzyn
Copy link
Contributor

Nudging Bondy for another peek!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

@bondydaa @jjcoffee @Christinadobrzyn 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!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

📣 @bernhardoj 🎉 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 9, 2023

📣 @nileshahir286 We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

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

@bondydaa
Copy link
Contributor

bondydaa commented Oct 9, 2023

sorry for the delay here, thanks for the explanation @bernhardoj 👍

@melvin-bot melvin-bot bot removed the Overdue label Oct 9, 2023
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 10, 2023
@bernhardoj
Copy link
Contributor

PR is ready

cc: @jjcoffee

@jjcoffee
Copy link
Contributor

@bernhardoj Thanks! Will review tomorrow.

@bondydaa
Copy link
Contributor

bondydaa commented Oct 12, 2023

looks like this was a dupe of #26867 and the PR #29245 was merged already with the same proposal here.

I closed #29156 since there isn't anything new to merge, code is the exact same.

@Christinadobrzyn what do we typically do in these situations?

@jjcoffee
Copy link
Contributor

Damn sorry for not catching that! FWIW the proposal there was posted after the one here, and wasn't approved until much later - I don't know if that makes a difference in the evaluation.

@Christinadobrzyn
Copy link
Contributor

Hum,

@bernhardoj
Copy link
Contributor

@Christinadobrzyn the PR is 100% done waiting to be merged, then @bondydaa found another PR that fixes the same issue.

@jjcoffee
Copy link
Contributor

@Christinadobrzyn Full review was completed as @bernhardoj says, so it was quite a bit of work (though it wasn't an incredibly complex PR or anything!). I don't really know what normally happens in this sort of case, but maybe 50% compensation would make sense? I'd be okay with that at least, I don't know about @bernhardoj.

@Christinadobrzyn
Copy link
Contributor

okay how about the following payment breakdown?

Payouts due:

Issue Reporter: $50 @nileshahir286
Contributor: $250 @bernhardoj
Contributor+: $250 @jjcoffee

Eligible for 50% #urgency bonus? NA

Upwork job is here.

How does this look @bernhardoj and @jjcoffee?

@Christinadobrzyn Christinadobrzyn added Daily KSv2 and removed Weekly KSv2 labels Oct 24, 2023
@bernhardoj
Copy link
Contributor

I'm okay with that.

@jjcoffee
Copy link
Contributor

@Christinadobrzyn Sounds good to me! Thanks for the consideration.

@Christinadobrzyn
Copy link
Contributor

Alright! Thanks! I paid this out based on this payment structure #28131 (comment)

Closing! Thanks again for all your work on this!

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 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

7 participants