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] Hybrid app - Loading skeleton when notification tapped and app is killed state #49964

Open
2 of 6 tasks
m-natarajan opened this issue Oct 1, 2024 · 33 comments
Open
2 of 6 tasks
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 1, 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:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
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
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1727449830031979

Action Performed:

  1. Have a long chat with User B
  2. As User A, access the chat on your device so it’s cached and kill the app
  3. As User B, message User A
  4. As User A, tap on the notification for the message.

Expected Result:

The full cached chat should be opened, potentially minus the most recent message.

Actual Result:

A skeleton page loads, indicating the app is reloading the chat from scratch rather than using the cache.

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

Screenshot_20240927-080643

Screenshot_20240927-080656

Screenshot_20240927-080707

screen-20240930-073210.mp4

Profile_trace_for_9.0.41-2.cpuprofile

logs-2024-09-30 14_32_20.691.txt

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844432440110156078
  • Upwork Job ID: 1844432440110156078
  • Last Price Increase: 2024-10-10
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Oct 1, 2024
Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @Beamanator (AutoAssignerNewDotQuality)

Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @garrettmknight (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.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Oct 1, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@Beamanator
Copy link
Contributor

Maybe we can make this Weekly since it's not reproducible yet?

@garrettmknight garrettmknight added Weekly KSv2 and removed Daily KSv2 labels Oct 2, 2024
@garrettmknight
Copy link
Contributor

One possible fix to this (removing duplicate reconnectapp calls) is out, bumping to see if this is still happening here.

@garrettmknight
Copy link
Contributor

Repro steps updated!

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 Needs Reproduction Reproducible steps needed labels Oct 10, 2024
@garrettmknight garrettmknight added AutoAssignerNewDotQuality Used to assign quality issues to engineers and removed AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Oct 10, 2024
Copy link

melvin-bot bot commented Oct 10, 2024

Triggered auto assignment to @stitesExpensify (AutoAssignerNewDotQuality)

@melvin-bot melvin-bot bot added the Weekly KSv2 label Oct 10, 2024
@garrettmknight garrettmknight moved this from CRITICAL to HIGH in [#whatsnext] #quality Oct 10, 2024
@garrettmknight
Copy link
Contributor

@stitesExpensify reassigning since Alex is going to be OOO until Tuesday. Can you take a look? I'll try to grab logs from my repro in a minute.

@garrettmknight
Copy link
Contributor

Logs/onyx state here

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 23, 2024
@melvin-bot melvin-bot bot changed the title [$250] Hybrid app - Loading skeleton when notification tapped and app is killed state [HOLD for payment 2024-10-30] [$250] Hybrid app - Loading skeleton when notification tapped and app is killed state Oct 23, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 23, 2024
Copy link

melvin-bot bot commented Oct 23, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Oct 23, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.52-5 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 2024-10-30. 🎊

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

Copy link

melvin-bot bot commented Oct 23, 2024

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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@garrettmknight garrettmknight removed the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 29, 2024
@garrettmknight garrettmknight changed the title [HOLD for payment 2024-10-30] [$250] Hybrid app - Loading skeleton when notification tapped and app is killed state [$250] Hybrid app - Loading skeleton when notification tapped and app is killed state Oct 29, 2024
@garrettmknight
Copy link
Contributor

@kirillzyusko looks like @quinthar is still experiencing:

screen-20241028-132410.mp4

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

@garrettmknight @eVoloshchak @kirillzyusko @stitesExpensify this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

Copy link

melvin-bot bot commented Nov 1, 2024

@garrettmknight, @eVoloshchak, @kirillzyusko, @stitesExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Nov 1, 2024
@garrettmknight
Copy link
Contributor

garrettmknight commented Nov 1, 2024

Looks like a recent adhoc build is solving this! Let's keep it open till we've deployed and tested on prod, but I'll take over monitoring to keep an eye on the PR.

@melvin-bot melvin-bot bot removed the Overdue label Nov 1, 2024
@garrettmknight garrettmknight added Weekly KSv2 and removed Daily KSv2 labels Nov 1, 2024
@garrettmknight
Copy link
Contributor

Checking for an internal Hybrid App engineer to handle this.

@garrettmknight garrettmknight added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels Nov 6, 2024
@Julesssss
Copy link
Contributor

Julesssss commented Nov 6, 2024

Hey @garrettmknight, I took a quick look, and I think we should update the description and reproduction steps and downgrade the current priority.

I'm unable to reproduce the loading skeleton issue for iOS or Android with the app either background or killed. @muttmuure mentioned this occurring for Concierge email chats, I didn't test that specific case but if that is still occurring I don't think it should be critical and take priority over our other HybridApp tasks.

^ I misunderstood the bug. Still don't think it's critical but we can get this looked at soon

RPReplay_Final1730899818.MP4
screen-20241106-131344.mp4

@jnowakow
Copy link
Contributor

jnowakow commented Nov 7, 2024

I'm from Software Mansion and I'll work on this one

@Julesssss Julesssss assigned jnowakow and unassigned kirillzyusko Nov 7, 2024
@jnowakow
Copy link
Contributor

jnowakow commented Nov 8, 2024

I found out that the problems are caused by this code:

const isLoading = isLoadingApp ?? (!reportIDFromRoute || (!isSidebarLoaded && !isInNarrowPaneModal) || PersonalDetailsUtils.isPersonalDetailsEmpty());

In ND isLoadingApp is set to true before the bootsplash is hidden and messages are shown correctly. While in hybrid app it takes more time to finish loading the app and thus both isLoadingApp and isSidebarLoaded equal to false when ReportScreen is shown causing the skeleton to show up. I don't know why openApp (function that sets isAppLoading to false) takes more time on hybrid. I have to figure out what is causing this behaviour.

@jnowakow
Copy link
Contributor

Sorry, yesterday I worked shorter hours and didn't had time to answer at the end of the day. I found out that on the ND when opening the app there is no OpenApp call. Instead ReconnectApp is called. So there are two options. The easier option is to enforce hybrid app to wait until OpenApp call is finished and only then hide bootsplash. The other way is to investigate why OpenApp is called every and check if it's necessary.
For now I'll to check the second option

@Julesssss
Copy link
Contributor

The easier option is to enforce hybrid app to wait until OpenApp call is finished and only then hide bootsplash.

That doesn't sound ideal if it delays users from entering the app. Do you think this problem might stop once we finish implementing the TTI changes? (boot and authenticate App in RN instead of yapl)

@jnowakow
Copy link
Contributor

I'm not sure if this will help because it's not matter of booting RN but making http call. I'll investigate why in hybrid app ND always call openApp instead of reconnect.

@jnowakow
Copy link
Contributor

jnowakow commented Nov 15, 2024

Okey, soo...

I think the solution for bug is easy, we just don't need to call openApp every time. Only when the user open ND for the first time. It's good news.

The bad news is that it doesn't work because there is another bug 🥲

For some reason sometimes when ND is opened (and it's not first time) Onyx is completely empty. It's because OnyxDB, OnyxDB-wal and OnyxDB-shm are removed in the meantime.

Here are the reproduction steps:

  • open hybrid app
  • log in (ND opens if not open it manually)
  • sign out and do not close the app
  • sign in (ND opens)
  • close app
  • open app
  • observe all chats load

Recording:

hybrid.bug.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Status: CRITICAL
Development

No branches or pull requests

10 participants