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

Desktop - App is crashing when select Priority mode #7811

Closed
mvtglobally opened this issue Feb 18, 2022 · 16 comments
Closed

Desktop - App is crashing when select Priority mode #7811

mvtglobally opened this issue Feb 18, 2022 · 16 comments
Assignees
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@mvtglobally
Copy link

mvtglobally commented Feb 18, 2022

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. Open app
  2. Add few drafts to the different treads
  3. Navigate to Settings > Preferences > Choose Focus mode

Expected Result:

App should not crash

Actual Result:

App is crashing.
Issue is not repro after user switches mode few times back and forth, but its always repro on first change after opening app from background

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Desktop App

Version Number: 1.1.39-1
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Recording.393.mp4

Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:

View all open jobs on GitHub

@mvtglobally mvtglobally added DeployBlockerCash This issue or pull request should block deployment AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Feb 18, 2022
@MelvinBot
Copy link

Triggered auto assignment to @strepanier03 (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Feb 18, 2022
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 18, 2022
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@marcaaron marcaaron removed the DeployBlockerCash This issue or pull request should block deployment label Feb 18, 2022
@marcaaron
Copy link
Contributor

Issue is not repro after user switches mode few times back and forth, but its always repro on first change after opening app from background

So it is not reproducible with these steps or it is? Are there more detailed steps?

Open app
Navigate to Settings > Preferences > Choose Focus mode

That didn't result in the bug on web or desktop so I'm going to remove the deploy blocker.

@marcaaron
Copy link
Contributor

There are logs that we can look at to see what maybe happened here. But only if we know what email was used.

@mvtglobally
Copy link
Author

mvtglobally commented Feb 18, 2022

@marcaaron can you check applausetester+mvtutest@applause.expensifail.com
You can check times around 12amEST to 1.15am EST

Regarding the steps. I did not do anything special. Just changed the mode and app crashed

@marcaaron
Copy link
Contributor

marcaaron commented Feb 18, 2022

Thanks!

Here's the logs but there's not much to go off of...
2022-02-18_09-16-10

https://www.expensify.com/_devportal/tools/logSearch/#query=request_id:(%226df50b92ca8632d9-SJC%22)+AND+timestamp:[2022-02-18T05:02:12.357Z+TO+2022-02-18T07:02:12.357Z]&index=logs_expensify-015431

Going to leave this as Internal for now.

The error we are logging here isn't super useful because it's truncating the stack trace so maybe someone I can fix that 🤔

@marcaaron marcaaron added Weekly KSv2 Hourly KSv2 Internal Requires API changes or must be handled by Expensify staff and removed Hourly KSv2 Weekly KSv2 labels Feb 18, 2022
@MelvinBot
Copy link

Triggered auto assignment to @puneetlath (Internal) because issue was reported by a contributor who needs to be compensated if this issue is fixed

@mvtglobally
Copy link
Author

Issue not reproducible during KI retests. (First week)

@mvtglobally
Copy link
Author

mvtglobally commented Feb 23, 2022

Another user has experienced this. Seems to be related to newly added drafts.
@marcaaron Can you try if you can repro now? I was able to repro if I add 2-3 drafts and then change mode
https://expensify.slack.com/archives/C01GTK53T8Q/p1645529273758589

@marcaaron

This comment was marked as outdated.

@marcaaron
Copy link
Contributor

Sorry ignore previous comment. I can't repro this. Let's wait until the log fix is live and then we will have more information about what is going wrong. Please make sure to share the tester email the next time someone experiences this.

@ctkochan22 ctkochan22 self-assigned this Feb 23, 2022
@ctkochan22
Copy link
Contributor

Looking into this here: #7810

@ctkochan22
Copy link
Contributor

The app is crashing because of our use of map() here https://github.com/Expensify/App/blame/a87b53c273be288bdc887d618973404ba01ea22b/src/pages/home/sidebar/SidebarLinks.js#L170-L174

When we go through the list of report objects, we end up filtering out some in the next nested loop. But because map doesn't remove anything, when a report is filtered out, it returns undefined. So an array of like 8 reports will have undefined elements in them, which causes the app to crash with this error here: #7810 (comment)

image

@ctkochan22
Copy link
Contributor

It turns out that we need to use map because that is how we preserve the original order of the conversations. So we iterate through the original order, and replace those report objects with the new ones from recentReports. Pushing fixed solution now

@mallenexpensify
Copy link
Contributor

Just happened to me, here's logs if it's helpful.
focus mode _ crash.txt

@botify botify closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants