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] Android - App crashes when returning to submit expense after it was uncomplete #43374

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 10, 2024 · 39 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 10, 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.81-1
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):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Open mobile application
  2. FAB > Submit expense
  3. Distance > enter Start and Finish waypoints
  4. Choose account or workspace (DO NOT submit request)
  5. Open another application (e.g. mobile browser) for a while
  6. Return to Expensify mobile application (wait until it reloads)
  7. Repeat steps 2 and 3

Expected Result:

Unsubmitted request closes after user navigated to another application.
User can start anew Submit expense request and finish it.

Actual Result:

Application crashes.

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

Bug6507433_1717965055517.Screenrecorder-2024-06-09-23-13-12-774.mp4

Bug6507433_1718009701451!logs-2024-06-10_08_53_14.511.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e63c58c588ffca02
  • Upwork Job ID: 1800236567983819613
  • Last Price Increase: 2024-07-01
  • Automatic offers:
    • shubham1206agra | Reviewer | 102979274
Issue OwnerCurrent Issue Owner: @shubham1206agra
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@m-natarajan
Copy link
Author

@isabelastisser 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

@m-natarajan
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@isabelastisser isabelastisser added 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 labels Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@melvin-bot melvin-bot bot changed the title Android - App crashes when returning to submit expense after it was uncomplete [$250] Android - App crashes when returning to submit expense after it was uncomplete Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

Copy link

melvin-bot bot commented Jun 14, 2024

@isabelastisser, @shubham1206agra 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 Jun 14, 2024
@isabelastisser
Copy link
Contributor

No proposals yet.

Copy link

melvin-bot bot commented Jun 17, 2024

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

@isabelastisser
Copy link
Contributor

No proposals yet.

Copy link

melvin-bot bot commented Jun 18, 2024

@isabelastisser, @shubham1206agra Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Jun 20, 2024

@isabelastisser, @shubham1206agra 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@isabelastisser
Copy link
Contributor

Still waiting for proposals.

@isabelastisser
Copy link
Contributor

No proposals yet.

Copy link

melvin-bot bot commented Jun 24, 2024

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

Copy link

melvin-bot bot commented Jun 24, 2024

@isabelastisser @shubham1206agra 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!

Copy link

melvin-bot bot commented Jun 24, 2024

@isabelastisser, @shubham1206agra 12 days overdue now... This issue's end is nigh!

@isabelastisser
Copy link
Contributor

@shubham1206agra I DM'd you for visibility.

@shubham1206agra
Copy link
Contributor

No proposal yet. I will test this tomorrow.

@melvin-bot melvin-bot bot removed the Overdue label Jun 25, 2024
@isabelastisser
Copy link
Contributor

@shubham1206agra were you able to test this? Thanks!

@shubham1206agra
Copy link
Contributor

@isabelastisser This is still repro to me.
Can you pass this off to expert agency?

@isabelastisser
Copy link
Contributor

@TMisiukiewicz
Copy link
Contributor

Hi, I'm Tomasz from Callstack and I'm looking into this issue.

@shubham1206agra what device are you using for testing? For me, on a mid-tier device with 8gb of RAM, the issue was not reproducible, because the app was not killed in the background even once.

However, things were different on an emulator. Because of the Android memory management, the backgrounded app is being killed to free up resources for a foregrounded app. In this case I was able to reproduce it and catch the error:
image

Seems like in this particular scenario, somehow the app is not able to correctly render the map view again. I'm going to continue investigating it on Monday

@shubham1206agra
Copy link
Contributor

@shubham1206agra what device are you using for testing? For me, on a mid-tier device with 8gb of RAM, the issue was not reproducible, because the app was not killed in the background even once.

@TMisiukiewicz My device is mid-tier with 6GB RAM. And now I am not able to use my App.

@TMisiukiewicz
Copy link
Contributor

Still investigating. As comment here says, looks like it's an upstream issue with mapbox-maps-android and the thrown error comes from this. Gonna continue investigating tomorrow

Copy link

melvin-bot bot commented Jul 1, 2024

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

@TMisiukiewicz
Copy link
Contributor

I think I found a possible issue - looks like sometimes the Map View is rendered before the accessToken is set on the native side. I have the solution implemented but I need to do some more tests to see if it does not break anything on other platforms. If everything's fine, I'll share a proposal tomorrow 👍

@TMisiukiewicz
Copy link
Contributor

TMisiukiewicz commented Jul 3, 2024

Problem

The MapView component is rendered when accessToken is available. The accessToken needs to be set in the library and passed to its native dependency. There are situations where there is a race condition - a MapView component is being rendered because accessToken is already read from the Onyx, however it is not yet set on the native side.

Solution

The rnmapbox library exposes setAccessToken function, which is required to call when using the library. This function returns a promise, so we can add an additional state and set it to true when access token is set in a library. If we switch from rendering the MapView when accessToken is available to when the access token is set on the native side, we make sure it is not trying to render a Map before access token is set.

Created a draft PR #44767 with the required changes. Let me know your thoughts about the proposal, I can open it if you think this solution is good

@shubham1206agra
Copy link
Contributor

@TMisiukiewicz's proposal looks good to me.

Lets proceed with it.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 3, 2024

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

@TMisiukiewicz
Copy link
Contributor

PR open ✅

@deetergp
Copy link
Contributor

deetergp commented Jul 3, 2024

Edit: Never mind. I jumped the gun. Didn't realize you were from Callstack 😅

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

📣 @shubham1206agra 🎉 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

@isabelastisser
Copy link
Contributor

@shubham1206agra, can you please provide an update? Thanks!

@shubham1206agra
Copy link
Contributor

@isabelastisser This was deployed to production 2 days ago.

@shubham1206agra
Copy link
Contributor

@isabelastisser Can you start payment process here?

@isabelastisser
Copy link
Contributor

Sorry for the delay here, @shubham1206agra. It looks like the payment automation didn't work.

@isabelastisser
Copy link
Contributor

@shubham1206agra, I sent you a new offer in Upwork.

Can you please clarify if we need to create a regression test? Thanks!

@shubham1206agra
Copy link
Contributor

@isabelastisser Offer accepted.

No, no need for regression test here.

@isabelastisser
Copy link
Contributor

Thanks! The payment is processed.

All set.

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

5 participants