Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.26k stars 2.7k forks source link

[HOLD for payment 2024-08-02] App crashes when updates applied in background #44859

Closed m-natarajan closed 1 week ago

m-natarajan commented 1 month ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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/p1720035998836439

Action Performed:

  1. Go to staging.new.expensify.com
  2. Refresh the page after 15 minutes

    Expected Result:

    App reload without any issue with latest build

    Actual Result:

    App crashes and Clicking the green Refresh button just repeats the crash.

    Workaround:

    Refreshing the browser "fixed" it

    Platforms:

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

    • [ ] Android: Native
    • [ ] Android: mWeb Chrome
    • [ ] iOS: Native
    • [ ] iOS: mWeb Safari
    • [X] MacOS: Chrome / Safari
    • [ ] MacOS: Desktop

Screenshots/Videos

image (44)

Added full log in comments section.

Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @kadiealexander
melvin-bot[bot] commented 1 month ago

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.

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @dangrous (AutoAssignerNewDotQuality)

MelvinBot commented 1 month ago

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

m-natarajan commented 1 month ago

Full log: react-dom.production.min.js:186 ChunkLoadError at l.f.j (jsonp chunk loading:27:18) at ensure chunk:6:25 at Array.reduce () at l.e (ensure chunk:5:56) at index.tsx:6:32 at M (react.production.min.js:18:161) at _l (react-dom.production.min.js:290:385) at bu (react-dom.production.min.js:279:389) at Cu (react-dom.production.min.js:279:320) at mu (react-dom.production.min.js:279:180) ss @ react-dom.production.min.js:186 i.componentDidCatch.n.callback @ react-dom.production.min.js:188 ui @ react-dom.production.min.js:137 gl @ react-dom.production.min.js:259 Cl @ react-dom.production.min.js:258 ml @ react-dom.production.min.js:257 (anonymous) @ react-dom.production.min.js:282 _u @ react-dom.production.min.js:280 au @ react-dom.production.min.js:269 v @ scheduler.production.min.js:13 T @ scheduler.production.min.js:14 e.exports @ _invoke.js:5 A.C. @ _task.js:35 b @ _task.js:21 y @ _task.js:25 Show 15 more frames Show lessUnderstand this error Log.ts:74 [alrt] NewExpensify crash caught by error boundary - Loading chunk 871 failed. (error: https://staging.new.expensify.com/871-6df456c8ecfcbe410a7e.bundle.js) - {"errorInfo":"{\"componentStack\":\"\n at Lazy\n at Suspense\n at Bt (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:318844)\\n at A (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:809395)\\n at f (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:591294)\\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:595069\\n at u (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:634409)\\n at b (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:636934)\\n at Vt (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:320070)\\n at I (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:282203)\\n at Zn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:331623)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at l (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:751140)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4078859)\\n at ee (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:103386)\\n at ae (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:104089)\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2328275\\n at r (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:1576318)\\n at M (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4100137)\\n at p (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1669404)\\n at c (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1671541)\\n at r (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1666241)\\n at c (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1667010)\\n at f (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1690976)\\n at C (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:96947)\\n at c (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:424316)\\n at O (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:97606)\\n at s (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1675872)\\n at t (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:1520768)\\n at u (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:3172667)\\n at https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1561312\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at u (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1674267)\\n at l (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1522561)\\n at l (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1676608)\\n at A (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1678475)\\n at t.default (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4178973)\\n at t.default (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4176006)\\n at t.default (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4180343)\\n at t.default (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4177751)\\n at y (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4160636)\\n at p (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4174472)\\n at sn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:133351)\\n at dn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:138385)\\n at https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1466916\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at t (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1675360)\\n at vn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:138670)\\n at b (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:536391)\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at l (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4324191)\\n at m (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4325859)\\n at hn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:138762)\\n at l (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1625130)\\n at s (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1624609)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at n (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1503044)\\n at o (https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:4143518)\\n at r (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:751563)\\n at ue (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1504711)\\n at r (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:751563)\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at $r\n at l (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:1465406)\\n at Bn (https://staging.new.expensify.com/main-89ede2d96b76867e15d8.bundle.js:1:139322)\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at div\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2467979\\n at https://staging.new.expensify.com/vendors-f5c2a49d5b3ece16ee73.bundle.js:2:2359401\"}"}

dangrous commented 1 month ago

@fabioh8010 tagging you here since you seemed to have an idea on how to fix!

I'm not sure how easy it's going to be to test/reproduce this given the bug...

Also copying this article you shared here which may have a solution - https://www.codemzy.com/blog/fix-chunkloaderror-react

fabioh8010 commented 1 month ago

Heyy, yes I can start working on this next week, could you assign me?

I'm not sure how easy it's going to be to test/reproduce this given the bug

Yeah that's true, I will try to see how we can reproduce at least something similar that would trigger the flow described in the article to auto-refresh the page.

melvin-bot[bot] commented 1 month ago

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

fabioh8010 commented 1 month ago

I will work on this tomorrow probably Melvin

pasyukevich commented 1 month ago

Hi, I'm Eugene from Callstack - expert contributor group.

I have the capacity and am going to take over the issue

pasyukevich commented 1 month ago

Today's update:

I've implemented the solution from the article.

Currently, I'm working on reproducing an error that will trigger the same behavior.

FYI: Tomorrow I will be OOO

kadiealexander commented 1 month ago

@pasyukevich any updates here?

pasyukevich commented 1 month ago

Sure

My updates

  1. I've debugged the solution and updated it with some tweaks
  2. I've prepared a flow to trigger a code run
  3. Currently working on more accurate flow to have the same behavior as on the stage to
dangrous commented 1 month ago

Awesome! Looking forward to seeing it when it's ready.

pasyukevich commented 1 month ago

PR is ready for review

dangrous commented 1 month ago

adding @thesahindia for review

thesahindia commented 1 month ago

@dangrous, I won't be able to review this right now. Will ask someone for help.

thesahindia commented 1 month ago

@allroundexperts, will be reviewing this.

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

If no regressions arise, payment will be issued on 2024-08-02. :confetti_ball:

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

melvin-bot[bot] commented 1 month ago

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:

melvin-bot[bot] commented 3 weeks ago

Payment Summary

[Upwork Job]()

BugZero Checklist (@kadiealexander)

kadiealexander commented 2 weeks ago

Payouts due:

Please don't forget the checklist!

melvin-bot[bot] commented 2 weeks ago

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

dangrous commented 2 weeks ago

@allroundexperts I think we're ready to close out the checklist on this one!

allroundexperts commented 1 week ago

Checklist

  1. There isn't any culprit PR here. It's just an issue with how bundles are lazy loaded in React.
  2. N/A
  3. N/A
  4. I am not sure if a regression test would be of any real value here, given that this does not have straight forward reproduction steps.
dangrous commented 1 week ago

Yeah that's fair! I agree that regression test is close to impossible... Leave the tab open for a long time and hope for an update to come through? I think we can just count it as an edge case we're unlikely to hit

kadiealexander commented 1 week ago

Sounds good! Please request payment via Newdot. Summary here.