Skip to content

[HOLD for payment 2024-08-19] [$250] iOS - Distance split - App crashes after opening split distance expense receipt #47022

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when validating #42302
Version Number: 9.0.18.0
Reproducible in staging?: Yes
Reproducible in production?: New Feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): applausetester+0708pm1e@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause Internal Team
Slack conversation:

Action Performed:

  1. Open the app and log in
  2. Navigate to a group chat
  3. Tap + > Split expense > Distance
  4. Enter the start and finish viewpoints and complete creating a split expense
  5. Open the receipt

Expected Result:

The receipt is displayed

Actual Result:

The app 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

Add any screenshot/video evidence

Bug6565083_1723073513605.IMG_8914.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bdf11a6c8415e801
  • Upwork Job ID: 1821474729087191120
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • shubham1206agra | Reviewer | 103446274
    • dominictb | Contributor | 103446277
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Aug 8, 2024
  2. melvin-bot commented on Aug 8, 2024

    @melvin-bot

    Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Aug 8, 2024

    @melvin-bot

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

  4. github-actions commented on Aug 8, 2024

    @github-actions
    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.
  5. dominictb commented on Aug 8, 2024

    @dominictb
    Contributor

    Proposal

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

    The app crashes

    What is the root cause of that problem?

    Let's see the optimistic receipt data here, the source is a static image and for IOS native the type of this source is a number.

    const receipt: Receipt | undefined = iouRequestType === CONST.IOU.REQUEST_TYPE.DISTANCE ? {source: ReceiptGeneric as ReceiptSource, state: CONST.IOU.RECEIPT_STATE.OPEN} : undefined;

    It leads to the optimistic filename is a number,

    filename: receipt?.source ?? receipt?.name ?? filename,

    Then the app crashes when we use the check Str.isPDF(receiptFilename) here because in this function we have a logic url.split('.')

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

    We should cast the receiptFilename to string when we use the Str.isPDF here

    Str.isPDF(String(receiptFilename))
    

    {isLocalFile && Str.isPDF(receiptFilename) ? (

    What alternative solutions did you explore? (Optional)

    We can cast the filename to String here

    filename: String(receipt?.source ?? receipt?.name ?? filename),
    

    filename: receipt?.source ?? receipt?.name ?? filename,

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 8, 2024
  7. 30 remaining items

  8. joekaufmanexpensify commented on Aug 16, 2024

    @joekaufmanexpensify
    Contributor

    Checklist complete. All set to issue payment on Monday. We need to pay:

  9. shubham1206agra commented on Aug 16, 2024

    @shubham1206agra
    Contributor

    @joekaufmanexpensify I was not the C+ on previous issue 😄

    It was @mananjadhav

  10. joekaufmanexpensify commented on Aug 16, 2024

    @joekaufmanexpensify
    Contributor

    Ah, okay. I saw you listed in the assignees of the PR, but see now that was just as a commenter. Adjusted checklist!

  11. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    All set to issue payment here!

  12. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    @shubham1206agra could you please accept the offer so we can pay you?

  13. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    @dominictb $250 sent and contract ended!

  14. shubham1206agra commented on Aug 19, 2024

    @shubham1206agra
    Contributor

    @joekaufmanexpensify Offer accepted

  15. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    @shubham1206agra $250 sent and contract ended!

  16. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    Upwork job closed.

  17. joekaufmanexpensify commented on Aug 19, 2024

    @joekaufmanexpensify
    Contributor

    All set, thanks everyone!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions