Skip to content

[Due for payment 2025-05-22] [Due for payment 2025-05-20] [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely #61719

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

Closed
1 of 8 tasks
jponikarchuk opened this issue May 8, 2025 · 15 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering 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 retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause Weekly KSv2

Comments

@jponikarchuk
Copy link

jponikarchuk commented May 8, 2025

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: 9.1.42-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6070092
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.4
App Component: Workspace Settings

Action Performed:

Precondition:

  • Workspace has set up Expensify Card with bank account.
  1. Launch Expensify app.
  2. Go to workspace settings > Members.
  3. Tap on any member (or yourself).
  4. Tap + New card.
  5. Go through the flow and reach the confirmation page.
  6. Enter magic code (if the timer does not move and magic code is not received, open iOS device notification tray to trigger it).

Expected Result:

User will be able to assign card to workspace member from member profile page.

Actual Result:

User is not able to assign card to workspace member from member profile page.
The green button loads infinitely after entering magic code.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021920567045189407519
  • Upwork Job ID: 1920567045189407519
  • Last Price Increase: 2025-05-08
Issue OwnerCurrent Issue Owner: @NicMendonca
@jponikarchuk jponikarchuk added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

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

Copy link

melvin-bot bot commented May 8, 2025

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

Copy link

melvin-bot bot commented May 8, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels May 8, 2025
Copy link
Contributor

github-actions bot commented May 8, 2025

👋 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.

@chiragsalian chiragsalian added the External Added to denote the issue can be worked on by a contributor label May 8, 2025
@melvin-bot melvin-bot bot changed the title iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels May 9, 2025
Copy link

melvin-bot bot commented May 9, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@bradyrose
Copy link

Summary

On iOS, tapping Assign Card in the member‑profile flow opens a bank‑connection WebView that never signals completion—leaving users staring at an endless spinner instead of returning to the card‑assignment screen.

Root Cause

We only use onNavigationStateChange to detect the callback URL (ROUTES.BANK_CONNECTION_COMPLETE) and flip isConnectionCompleted to true. On iOS, certain OAuth redirect flows don’t trigger a full navigation event, so the handler never fires and the WebView stays stuck loading.

Proposed Changes

Modify src/pages/settings/BankConnection.tsx to add an onShouldStartLoadWithRequest handler alongside the existing onNavigationStateChange. This ensures iOS reliably intercepts the callback URL and stops the WebView before it spins forever.

Code Example

Embed this snippet inside your <WebView …> props (replace the existing handlers):

<WebView
    ref={webViewRef}
    source={{
        uri: url,
        headers: { Cookie: `authToken=${authToken}` },
    }}
    userAgent={getUAForWebView()}
    incognito
    onNavigationStateChange={checkIfConnectionCompleted}
    onShouldStartLoadWithRequest={(request) => {
        if (request.url.includes(ROUTES.BANK_CONNECTION_COMPLETE)) {
            setConnectionCompleted(true);
            return false;    // stop further navigation
        }
        return true;
    }}
    startInLoadingState
    renderLoading={renderLoading}
/>
  • Why both handlers?
    • iOS: onShouldStartLoadWithRequest catches the OAuth callback URL before navigation.
    • Android: onNavigationStateChange remains to handle full‑page redirects.

Testing Plan

  1. Unit Tests
    • Simulate onShouldStartLoadWithRequest with a URL containing BANK_CONNECTION_COMPLETE; assert isConnectionCompleted === true and that the WebView unmounts.
    • Simulate onNavigationStateChange with the same URL; assert identical behavior.
  2. Manual QA
    • iOS: Assign a card → complete bank OAuth → verify the spinner appears briefly and then returns to the card‑assignment UI.
    • Android: Repeat above to ensure no regressions.
  3. Regression Checks
    • Verify “Add New Card” flows (e.g., Brex, Amex) still complete successfully.

@izarutskaya
Copy link

Not reproducible
iPhone 14
build 9.1.44-3

ScreenRecording_05-13-2025.18-02-02_1.1.MP4

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label May 13, 2025
@mountiny
Copy link
Contributor

Seems like its not reproducible now

@mountiny mountiny added retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause and removed Reviewing Has a PR in review labels May 13, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 13, 2025
@melvin-bot melvin-bot bot changed the title [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely [Due for payment 2025-05-20] [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely May 13, 2025
Copy link

melvin-bot bot commented May 13, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 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 2025-05-20. 🎊

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

Copy link

melvin-bot bot commented May 13, 2025

@jayeshmangwani @NicMendonca @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@chiragsalian
Copy link
Contributor

ah yes, the issue was only on staging and it was a regression which was addressed here - #61686. Since that PR is on staging this is a non issue, and was confirmed as non-reproducible here. So i'm closing this out.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 15, 2025
@melvin-bot melvin-bot bot changed the title [Due for payment 2025-05-20] [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely [Due for payment 2025-05-22] [Due for payment 2025-05-20] [$250] iOS - Expensify Card - Unable to assign card from member profile as it loads infinitely May 15, 2025
Copy link

melvin-bot bot commented May 15, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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 2025-05-22. 🎊

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

Copy link

melvin-bot bot commented May 15, 2025

@jayeshmangwani @NicMendonca @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

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. Engineering 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 retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants