Skip to content

Dev - iOS app crashes on magic code input #18874

Closed

Description

@kavimuru

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. logout if already logged in
  2. Enter email
  3. Double click any number on each magic code input

Expected Result:

App doesn't crash

Actual Result:

App crashes on 5th input

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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: v1.3.13-1
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
Notes/Photos/Videos: Any additional supporting documentation

crash.mp4

Expensify/Expensify Issue URL:
Issue reported by: @situchan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683872743466849

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 12, 2023
  2. melvin-bot commented on May 12, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 12, 2023

    @melvin-bot

    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
  4. situchan commented on May 12, 2023

    @situchan
    Contributor

    Proposal

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

    iOS app crashes on magic code input

    What is the root cause of that problem?

    After enter full 6 numbers, set focusedIndex to undefined to blur the input:

    setFocusedIndex(undefined);

    And this makes editIndex undefined when Backspace press event is unnecessarily called (known bug) here:

    setEditIndex(focusedIndex);

    And this effect is called again since it has props.value as a dependency

    And finally crashes on this line:

    inputRefs.current[editIndex].blur();

    because inputRefs.current[undefined] = undefined

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

    Add _.isUndefined(editIndex) || condition in early return condition

  5. kadiealexander commented on May 16, 2023

    @kadiealexander
    Contributor

    @situchan, I'm not able to reproduce this on the latest version (1.3.14-0)

    RPReplay_Final1684215315.MP4

    Could you please test on the latest version of the app, and share updated reproduction steps if you're still running into it?

  6. BeeMargarida commented on May 16, 2023

    @BeeMargarida
    Contributor

    I think this only happens in iOS 16.4 simulators. I think this issue is actually related to this one - #18218

  7. situchan commented on May 16, 2023

    @situchan
    Contributor

    @kadiealexander as the title says, this happens only in developer mode and iOS 16.4 simulator. Not reproducible on staging/production.

  8. kadiealexander commented on May 17, 2023

    @kadiealexander
    Contributor

    I can't get the keyboard to appear on my dev simulator.

    2023-05-17_17-46-05.mp4

    Asking for someone else to test here.

  9. 14 remaining items

  10. kadiealexander commented on May 23, 2023

    @kadiealexander
    Contributor

    Have asked for help reproducing this here.

  11. situchan commented on May 23, 2023

    @situchan
    Contributor

    Another person reproduced and uploaded video: #18218 (comment)

  12. kadiealexander commented on May 24, 2023

    @kadiealexander
    Contributor

    Thanks @situchan! Checking in that issue to see if this is a dupe.

  13. s77rt commented on May 24, 2023

    @s77rt
    Member

    @situchan I see that the key to reproduce the bug is the unnecessary Backspace press event, so if that event didn't exist the issue won't be reproducible, is that the case? If so then we should hold on #18218 (or close the issue - same root cause).

    cc @kadiealexander

  14. situchan commented on May 24, 2023

    @situchan
    Contributor

    yes but fixing crash at least unblocks development and testing on iOS simulator which is @tgolen's concern.
    After that, #18218 may exist longer.

  15. s77rt commented on May 24, 2023

    @s77rt
    Member

    Good point but we don't have to test on iOS 16.4. You can still test using other iOS versions.

  16. aldo-expensify commented on May 24, 2023

    @aldo-expensify
    Contributor

    Good point @s77rt , and #18218 looks a lot more annoying than this one, and this one should get resolved once we get #18218 fixed.

    Closing as duplicate.

  17. aimane-chnaif commented on Aug 18, 2023

    @aimane-chnaif
    Contributor

    This bug is still happening to me on iOS 16.4 simulator

    Screen.Recording.2023-08-18.at.11.53.38.PM.mov

    another case:

    #23060 (comment)

    Can we re-open this and fix?

    cc: @BeeMargarida @s77rt @aldo-expensify @tgolen

  18. s77rt commented on Aug 21, 2023

    @s77rt
    Member

    @aimane-chnaif Seems working fine from my end. Please double check your pod and project files against these changes https://github.com/Expensify/App/pull/21316/files

    Kooha-2023-08-21-15-04-44.mp4
  19. aimane-chnaif commented on Aug 21, 2023

    @aimane-chnaif
    Contributor

    Checked already.
    Note: I reinstalled macOS and cloned fresh repo so there might be additional configuration which is not added to git

  20. BeeMargarida commented on Aug 21, 2023

    @BeeMargarida
    Contributor

    @aimane-chnaif Double checked right now, I ran npm run clean and installed the pods, everything is working correctly.

  21. aimane-chnaif commented on Aug 21, 2023

    @aimane-chnaif
    Contributor

    @aimane-chnaif Double checked right now, I ran npm run clean and installed the pods, everything is working correctly.

    Did you run build using command or from Xcode? I used Xcode

  22. BeeMargarida commented on Aug 21, 2023

    @BeeMargarida
    Contributor

    @aimane-chnaif Double checked right now, I ran npm run clean and installed the pods, everything is working correctly.

    Did you run build using command or from Xcode? I used Xcode

    Using npm run ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringNeeds ReproductionReproducible steps needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions