You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] iOS&Android - App crashed when opening deeplink for changing workspace owner #70377
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
Version Number: v9.2.9-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#70030 Email or phone of affected tester (no customers):tester@applausecard.expensifail.com Issue reported by: Applause Internal Team Device used: Realme C67 - Android 14, Apple iPhone 15 Pro - iOS 26.0 App Component: Other
Action Performed:
Open App and login
Open workspaces/:workspaceID/change-owner/78878/noBillingCard (for Native apps, paste this link to any chat and open it)
Or we can create a new file index.native.ts to handle this
Note: we will have a bug that when back from the Transfer owner screen, the page not found will appear, will be fixed in this PR
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
iOS&Android - App crashed when opening deepling for changing workspace owner
What is the root cause of that problem?
We use a component that can only be used in a browser environment, since its logic is tied to receiving the ‘message’ event, and window does not exist on native devices, which is why an error occurs.
What changes do you think we should make in order to solve the problem?
We can discuss what decision we expect during the PR stage, but my main idea is as follows:
Since we cannot simply ignore the hook (because part of the logic depends on it, and if it is missing, the application will not work as it should), I suggest using the same approach that we use on another page:
The AddPaymentCard page is only available for the web environment:
We need to do the same here, either cut out the entire page for native devices (return notFound and remove the link to it from the application) or only the part that relates to this logic (if possible), but this requires detailed discussion.
For example, here we display this window, which will trigger the flow from CardAuthenticationModal depending on two parameters:
We can add another parameter, isNative, or create a separate component that will return notFound on native devices with information that it is only available in the browser, and on the web — what is currently available.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Or we can make this CardAuthenticationModal component on native devices as some kind of informational window that will say that this functionality is only available in the web application, and display it on the web as it is now. Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
We encounter this issue on this PR when adding the transfer owner button, but as mentioned in the comment here, this component is only intended for the web.
So, they hide the transfer owner button on native, except if fund list exist.
What changes do you think we should make in order to solve the problem?
First, we should show not found page for the transfer owner page if it's not supposed to be shown.
changed the title [-]iOS&Android - App crashed when opening deepling for changing workspace owner[/-][+][$250] iOS&Android - App crashed when opening deepling for changing workspace owner[/+]on Sep 15, 2025
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
Activity
melvin-bot commentedon Sep 11, 2025
Triggered auto assignment to @lydiabarclay (
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.daledah commentedon Sep 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashed
What is the root cause of that problem?
We get this erorr
Because of we are calling the
window.addEventListenerin native osApp/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx
Lines 58 to 63 in 73127a2
What changes do you think we should make in order to solve the problem?
We can check the os like we did here
App/src/components/Search/SearchRouter/SearchRouterContext.tsx
Line 35 in 73127a2
App/src/components/Search/SearchRouter/SearchRouterContext.tsx
Lines 43 to 45 in 73127a2
Or we can create a new file
index.native.tsto handle thisNote: we will have a bug that when back from the
Transfer ownerscreen, the page not found will appear, will be fixed in this PRWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Eskalifer1 commentedon Sep 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
iOS&Android - App crashed when opening deepling for changing workspace owner
What is the root cause of that problem?
We use a component that can only be used in a browser environment, since its logic is tied to receiving the ‘message’ event, and window does not exist on native devices, which is why an error occurs.
App/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx
Lines 58 to 63 in 73127a2
What changes do you think we should make in order to solve the problem?
We can discuss what decision we expect during the PR stage, but my main idea is as follows:
Since we cannot simply ignore the hook (because part of the logic depends on it, and if it is missing, the application will not work as it should), I suggest using the same approach that we use on another page:
The
AddPaymentCardpage is only available for the web environment:App/src/pages/settings/Subscription/PaymentCard/index.native.tsx
Lines 1 to 19 in f123caf
We need to do the same here, either cut out the entire page for native devices (return notFound and remove the link to it from the application) or only the part that relates to this logic (if possible), but this requires detailed discussion.
For example, here we display this window, which will trigger the flow from CardAuthenticationModal depending on two parameters:
App/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
Lines 84 to 95 in f123caf
We can add another parameter, isNative, or create a separate component that will return notFound on native devices with information that it is only available in the browser, and on the web — what is currently available.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Or we can make this
CardAuthenticationModalcomponent on native devices as some kind of informational window that will say that this functionality is only available in the web application, and display it on the web as it is now.Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
bernhardoj commentedon Sep 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes when deep link to change workspace owner page.
What is the root cause of that problem?
It crashes because the page renders
CardAuthenticationModal, which uses a web API.App/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx
Lines 58 to 63 in f123caf
We encounter this issue on this PR when adding the transfer owner button, but as mentioned in the comment here, this component is only intended for the web.
So, they hide the transfer owner button on native, except if fund list exist.
What changes do you think we should make in order to solve the problem?
First, we should show not found page for the transfer owner page if it's not supposed to be shown.
App/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx
Lines 64 to 67 in f123caf
Also, since the user can't add a card on native, we should show not found page too when the error is noBillingCard.
But if the user has a fund list, then the issue will happen again. So, we need to create a native file for
CardAuthenticationModalthat returns null.export default () => null;What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
[-]iOS&Android - App crashed when opening deepling for changing workspace owner[/-][+][$250] iOS&Android - App crashed when opening deepling for changing workspace owner[/+]melvin-bot commentedon Sep 15, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021967688851615177453
melvin-bot commentedon Sep 15, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)8 remaining items
bernhardoj commentedon Sep 21, 2025
PR is ready
cc: @rushatgabhane
melvin-bot commentedon Oct 15, 2025
This issue has not been updated in over 15 days. @blimpich, @rushatgabhane, @bernhardoj, @lydiabarclay eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
lydiabarclay commentedon Oct 15, 2025
Hey @rushatgabhane I'm assuming this is ready for payment, just the automation failed?
rushatgabhane commentedon Oct 15, 2025
yes automation failed
lydiabarclay commentedon Oct 15, 2025
Awesome, can you fill out the BZ checklist please?
lydiabarclay commentedon Oct 17, 2025
Payment Summary
Contributor: @bernhardoj due $250 via NewDot
Contributor+: @rushatgabhane due $250 via NewDot
✅ Regression test filed
bernhardoj commentedon Oct 17, 2025
Requested in ND.
lydiabarclay commentedon Oct 23, 2025
@rushatgabhane reminder that your payment is held on the checklist
rushatgabhane commentedon Oct 29, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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] Feature: Implement SCA support to transfer owner #49411 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/562648
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
garrettmknight commentedon Nov 1, 2025
$250 approved for @rushatgabhane
quinthar commentedon Nov 2, 2025
$250 approved to @bernhardoj