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
[Due for payment 2026-01-23] [$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup #78876
Version Number: 9.2.93-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/test-runs/TR-2663/folder/13176904/41237417/1106547125 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: iOS App Component: Other
Action Performed:
Preconditions:
User is admin of a control Workspace
Enable accounting in workspace settings
Steps:
Go to Workspaces > Accounting
Tap on "Connect" next to "NetSuite"
Reach the token step
Add any info in token fields
Tap on "Confirm"
Tap on the three-dot button
Tap on "Enter your credentials"
Expected Result:
User should be redirected to the token input step.
Actual Result:
User is being redirected to the first step on the NetSuite setup.
Please re-state the problem that we are trying to solve in this issue.
NetSuite "Enter credentials" button redirects to the first step of NetSuite setup instead of the token input step.
What is the root cause of that problem?
When the user clicks "Enter your credentials", the system calls startIntegrationFlow({name: CONST.POLICY.CONNECTIONS.NAME.NETSUITE}) which triggers the ConnectToNetSuiteFlow component to render.
Inside this component, there is a useEffect that correctly checks if there's an authentication error (shouldGoToCredentialsPage) and navigates to the token input page. However, the component also renders a popover menu that shows two options: "Create new connection" (which goes to the first step) and "Reuse existing connection".
The component doesn't prevent the popover from rendering when there's an authentication error. The popover appears on screen, and when the user interacts with it or the default selection is triggered, it navigates to the first step instead of respecting the token input page navigation that was initiated in the useEffect.
What changes do you think we should make in order to solve the problem?
We need to prevent the ConnectToNetSuiteFlow component from rendering the popover menu when there's an authentication error.
Add a check that returns null before attempting to render the popover menu if shouldGoToCredentialsPage is true:
// Don't show the popover menu when we need to go to credentials pageif(shouldGoToCredentialsPage){returnnull;}
This should be added after the useEffect and before the if (threeDotsMenuContainerRef) check here
This ensures that when the user clicks "Enter your credentials", the component will:
Navigate to the token input page (via the existing useEffect)
Not render the popover menu that interfere with that navigation
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.
When a user taps "Enter your credentials" from the three-dot menu after setting up NetSuite, they are redirected to the first step of the NetSuite setup flow instead of directly to the token/credentials input form.
What is the root cause of that problem?
The NetSuiteTokenInputPage always starts from step 0, regardless of the navigation context:
Separate route for credentials-only flow: Considered creating POLICY_ACCOUNTING_NETSUITE_CREDENTIALS route, but this duplicates the page component and is harder to maintain.
Using query params instead of route params: Would work but route params are more consistent with other patterns in the codebase.
We can also handle case for goBack button if needed
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.
changed the title [-]NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/-][+][$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/+]on Jan 6, 2026
changed the title [-][$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/-][+][Due for payment 2026-01-23] [$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/+]on Jan 26, 2026
[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: N/A, this logic was never designed/implemented initially
[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: regression wasn't 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.
Activity
melvin-bot commentedon Jan 5, 2026
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.samranahm commentedon Jan 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
NetSuite "Enter credentials" button redirects to the first step of NetSuite setup instead of the token input step.
What is the root cause of that problem?
When the user clicks "Enter your credentials", the system calls
startIntegrationFlow({name: CONST.POLICY.CONNECTIONS.NAME.NETSUITE})which triggers theConnectToNetSuiteFlowcomponent to render.Inside this component, there is a
useEffectthat correctly checks if there's an authentication error (shouldGoToCredentialsPage) and navigates to the token input page. However, the component also renders a popover menu that shows two options: "Create new connection" (which goes to the first step) and "Reuse existing connection".The component doesn't prevent the popover from rendering when there's an authentication error. The popover appears on screen, and when the user interacts with it or the default selection is triggered, it navigates to the first step instead of respecting the token input page navigation that was initiated in the
useEffect.What changes do you think we should make in order to solve the problem?
We need to prevent the
ConnectToNetSuiteFlowcomponent from rendering the popover menu when there's an authentication error.Add a check that returns
nullbefore attempting to render the popover menu ifshouldGoToCredentialsPageis true:This should be added after the
useEffectand before theif (threeDotsMenuContainerRef)check hereApp/src/components/ConnectToNetSuiteFlow/index.tsx
Lines 54 to 62 in 4dcaac8
This ensures that when the user clicks "Enter your credentials", the component will:
useEffect)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.
MobileMage commentedon Jan 5, 2026
Please re-state the problem that we are trying to solve in this issue.
When a user taps "Enter your credentials" from the three-dot menu after setting up NetSuite, they are redirected to the first step of the NetSuite setup flow instead of directly to the token/credentials input form.
What is the root cause of that problem?
The
NetSuiteTokenInputPagealways starts from step 0, regardless of the navigation context:src/pages/workspace/accounting/netsuite/NetSuiteTokenInput/NetSuiteTokenInputPage.tsx:38The page has 5 substeps:
NetSuiteTokenSetupContent(instructional steps)NetSuiteTokenInputForm(the actual credentials form)When "Enter your credentials" is tapped, the user expects to go directly to step 4 (the credentials form), but the page always starts at step 0.
What changes do you think we should make in order to solve the problem?
1. Add a route parameter to specify the starting step
src/ROUTES.ts- Add optionalstepparameter:POLICY_ACCOUNTING_NETSUITE_TOKEN_INPUT: { - route: 'settings/workspaces/:policyID/accounting/netsuite/token-input', + route: 'settings/workspaces/:policyID/accounting/netsuite/token-input/:step?', - getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/netsuite/token-input` as const, + getRoute: (policyID: string, step?: number) => + `settings/workspaces/${policyID}/accounting/netsuite/token-input${step !== undefined ? `/${step}` : ''}` as const, },2. Use the step parameter in NetSuiteTokenInputPage
src/pages/workspace/accounting/netsuite/NetSuiteTokenInput/NetSuiteTokenInputPage.tsx:3. Navigate directly to credentials step from "Enter your credentials"
src/components/ConnectToNetSuiteFlow/index.tsx:55-57:useEffect(() => { if (shouldGoToCredentialsPage || !hasPoliciesConnectedToNetSuite) { - Navigation.navigate(ROUTES.POLICY_ACCOUNTING_NETSUITE_TOKEN_INPUT.getRoute(policyID)); + // Step 4 is the credentials form (NetSuiteTokenInputForm) + const step = shouldGoToCredentialsPage ? 4 : undefined; + Navigation.navigate(ROUTES.POLICY_ACCOUNTING_NETSUITE_TOKEN_INPUT.getRoute(policyID, step)); return; } setIsReuseConnectionsPopoverOpen(true); }, []);This ensures:
What alternative solutions did you explore?
Separate route for credentials-only flow: Considered creating
POLICY_ACCOUNTING_NETSUITE_CREDENTIALSroute, but this duplicates the page component and is harder to maintain.Using query params instead of route params: Would work but route params are more consistent with other patterns in the codebase.
Eskalifer1 commentedon Jan 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup
What is the root cause of that problem?
We navigate here in this useEffect correct:
App/src/components/ConnectToNetSuiteFlow/index.tsx
Lines 54 to 61 in 75626e0
But we always start flow at 0 step here:
App/src/pages/workspace/accounting/netsuite/NetSuiteTokenInput/NetSuiteTokenInputPage.tsx
Line 38 in 75626e0
What changes do you think we should make in order to solve the problem?
We should add check for
isAuthenticationErrorlike we did in other page:We can also handle case for goBack button if needed
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.
melvin-bot commentedon Jan 6, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022008688791137931719
[-]NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/-][+][$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/+]melvin-bot commentedon Jan 6, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)eVoloshchak commentedon Jan 8, 2026
@samranahm's proposal looks good to me!
🎀👀🎀 C+ reviewed!
25 remaining items
Eskalifer1 commentedon Jan 26, 2026
Hi! I think automation is failed here. PR was deployed 17.01
cc: @pecanoro @lydiabarclay
[-][$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/-][+][Due for payment 2026-01-23] [$250] NetSuite - Enter credentials button is redirecting to the first step of the NetSuite setup[/+]lydiabarclay commentedon Jan 26, 2026
On it
lydiabarclay commentedon Jan 26, 2026
Payment Summary
Contributor: @Eskalifer1 paid $250 via Upwork
Contributor+: @eVoloshchak due $250 via NewDot
✅ Regression test filed
lydiabarclay commentedon Jan 26, 2026
@eVoloshchak can you please fill out the BZ checklist?
eVoloshchak commentedon Jan 27, 2026
BugZero Checklist:
[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: N/A, this logic was never designed/implemented initially
[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: regression wasn't 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/593427
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-15a8-a93e-2933-873e1ef116e4trjExpensify commentedon Jan 31, 2026
approved $250 for @eVoloshchak.