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

[HOLD for payment 2023-09-06] [$1000] App crashes on iOS simulator on open #26018

Closed
1 of 6 tasks
hayata-suenaga opened this issue Aug 27, 2023 · 29 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@hayata-suenaga
Copy link
Contributor

hayata-suenaga commented Aug 27, 2023

Action Performed:

Break down in numbered steps

  1. Pull the latest main
  2. Run npm run ios
  3. Check that the app crashes with an unhandled promise error

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: the latest main branch
Reproducible in staging?: Nop
Reproducible in production?: Nop
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): N/A
Logs: N/A
Notes/Photos/Videos:
Expensify/Expensify Issue URL: N/A
Issue reported by: @hayata-suenaga
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1693020712748639

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017fd401adeff84c58
  • Upwork Job ID: 1695589561700159488
  • Last Price Increase: 2023-08-27
  • Automatic offers:
    • shubham1206agra | Contributor | 26347760
@hayata-suenaga hayata-suenaga 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 Aug 27, 2023
@hayata-suenaga hayata-suenaga self-assigned this Aug 27, 2023
@melvin-bot melvin-bot bot changed the title App crashes on iOS simulator on open [$1000] App crashes on iOS simulator on open Aug 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

Job added to Upwork: https://www.upwork.com/jobs/~017fd401adeff84c58

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

Triggered auto assignment to @slafortune (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 Aug 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 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 Aug 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

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

@hoangzinh
Copy link
Contributor

hoangzinh commented Aug 27, 2023

Proposal

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

App crashes on iOS simulator on open

What is the root cause of that problem?

App crashes on this function shouldMigrate:
Screenshot 2023-08-27 at 08 07 35

function shouldMigrate() {
const isTargetPlatform = _.contains([CONST.PLATFORM.WEB, CONST.PLATFORM.DESKTOP], getPlatform());
if (!isTargetPlatform) {
Log.info('[Migrate Onyx] Skipped migration MoveToIndexedDB (Not applicable to current platform)');
return false;
}
const session = window.localStorage.getItem(ONYXKEYS.SESSION);

Because the getPlatform() is returning incorrectly value, currently it's returned Web so isTargetPlatform is true => it won't be early exist but cont run this line of code window.localStorage.getItem => Raise error above

When I dig deeper, I found that it's regression from this PR #25745
He forgot to remove the exiting src/libs/getPlatform/index.js file => There are 2 index version, 1 is pure JS, 1 is Typescript.
Screenshot 2023-08-27 at 08 12 58

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

Delete the exiting src/libs/getPlatform/index.js file will solve this crash

@shubham1206agra
Copy link
Contributor

@hayata-suenaga Can I take up this issue because I was the original commenter on the offending PR? And I have not raised the issue due to its being handled by SWM member at that time.
#24681 (comment)
#24681 (comment)

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

melvin-bot bot commented Aug 27, 2023

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

@shubham1206agra
Copy link
Contributor

Proposal

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

App crashes on iOS simulator on open

What is the root cause of that problem?

It is a regression from this PR #25745 due to which the getPlatform() method always resolves to CONST.PLATFORM.WEB as it always refers to index.js file, not index.ts file. Due to that, it tries to access window.localStorage method which does not exist on iOS.

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

Delete the existing src/libs/getPlatform/index.js file

@shubham1206agra
Copy link
Contributor

@allroundexperts @hayata-suenaga PR ready

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

🎯 ⚡️ Woah @burczu / @shubham1206agra, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @shubham1206agra got assigned: 2023-08-27 01:37:04 Z
  • when the PR got merged: 2023-08-27 04:50:55 UTC

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

📣 @allroundexperts Please request via NewDot manual requests for the Contributor role ($1000)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 30, 2023
@melvin-bot melvin-bot bot changed the title [$1000] App crashes on iOS simulator on open [HOLD for payment 2023-09-06] [$1000] App crashes on iOS simulator on open Aug 30, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.58-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 2023-09-06. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

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:

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

@hayata-suenaga
Copy link
Contributor Author

Why is this part of distance requests? JmillsExpensify

I gonna remove this issue from Distance Request project

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 5, 2023
@slafortune slafortune added Hourly KSv2 and removed Hourly KSv2 labels Sep 5, 2023
@slafortune
Copy link
Contributor

slafortune commented Sep 7, 2023

  • External issue reporter - @hayata-suenaga NA
  • Contributor that fixed the issue - @shubham1206agra $1000 + $500 bonus PAID
  • Contributor+ that helped on the issue and/or PR - @allroundexperts $1000 + $500 bonus - Eligible for Manual Requests

UPWORKS JOB

@shubham1206agra
Copy link
Contributor

@slafortune I didn't receive any bonus. Is there any particular reason for that?

@slafortune
Copy link
Contributor

slafortune commented Sep 8, 2023

https://www.upwork.com/nx/wm/workroom/34647894/details
@shubham1206agra I did add the bonus, so it's strange if you don't see that. Upworks has made some updates where the bonus is shown differently -

image

Can you check again?

@slafortune
Copy link
Contributor

Adding a new BZ member to monitor this, I'm out on sabbatical

@slafortune slafortune removed their assignment Sep 8, 2023
@slafortune slafortune added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@Expensify Expensify deleted a comment from melvin-bot bot Sep 8, 2023
@shubham1206agra
Copy link
Contributor

Screenshot 2023-09-09 at 2 00 35 PM

It shows the correct balance, but the message shows only milestone completion (earlier, it shows the complete amount).

@allroundexperts
Copy link
Contributor

allroundexperts commented Sep 10, 2023

Checklist

  1. The PR that introduced the bug has been identified. Link to the PR: [No QA] migrate config to ts #25753
  2. 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: [No QA] migrate config to ts #25753 (comment)
  3. 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: I don't think a discussion is needed here because this was a small oversight from the reviewer / author of the PR.
  4. Regression test not needed since this was related to the one off TS migration.

@jliexpensify
Copy link
Contributor

jliexpensify commented Sep 10, 2023

@shubham1206agra as Stevie mentioned, it looks like the correct amount has been paid out to you: I would recommend reaching out to Upworks to gain some clarification as their newly implemented bonus system seems to be confusing.

image

FWIW, I never use that new bonus system for payouts - I pay the bonus directly on the job.

@jliexpensify
Copy link
Contributor

Job removed, here's the summary for JMills

@allroundexperts
Copy link
Contributor

Requested payment!

@JmillsExpensify
Copy link

$1,500 payment approved for @allroundexperts based on BZ summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants