Skip to content

NetSuite - Tax import fails with a OAuth 2.0 #101409

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.81-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176904/test-cases/41237412
Email or phone of affected tester (no customers): applausetester+bp3108od@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Win 11 / Chrome
App Component: Other

Action Performed:

Precondition: use expensifail account. Connect workspace to NetSuite with a new flow - OAuth 2.0.

  1. Go to Accounting > Import
  2. Toggle ON Tax

Expected Result:

Tax import successful

Actual Result:

Tax import fails with an error

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7262195_1789630859516.bandicam_2026-09-17_10-38-39-338.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7262195

Issue OwnerCurrent Issue Owner: @applausebot

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 17, 2026
  2. applause-bot commented on Sep 17, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/292489865ed4722d16c363f7ec6b4299d8e180231e3571c0beb2d18c3428c287

  3. github-actions commented on Sep 17, 2026

    @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.
  4. melvin-bot commented on Sep 17, 2026

    @melvin-bot

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

  5. melvin-bot commented on Sep 17, 2026

    @melvin-bot

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

  6. MelvinBot commented on Sep 17, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Backend bug (root cause is outside the App repo — no App code change in this release touches the NetSuite tax-import path)
    Causing PR: None. No PR in Deploy Checklist: New Expensify 2026-09-16 modifies any NetSuite source file (High confidence that no App PR in this deploy is involved; Low confidence on the exact backend trigger)
    Related Issues: NetSuite - 2FA required to connect (Expensify/App#101408) — same tester, same account, same release, also NetSuite OAuth 2.0; R4: Make REST + OAuth 2.0 the default for new NetSuite connections (Expensify/App#96570) — the in-flight NetSuite SOAP→REST / OAuth 2.0 migration this behaviour belongs to

    Recommendation: NEEDS INVESTIGATION

    Every file in the tax-toggle code path is byte-identical between production and staging, and the App never produces an "OAuth 2.0" error string for this action — the message is server-supplied, so there is nothing here to revert or roll forward in App. This appears to be a backend/internal issue; a separate internal investigation is needed.

    Labels: No changes. DeployBlockerCash is kept — the issue is not reproducible on production, DeployBlocker is not present (so removing DeployBlockerCash would leave the issue with no blocker label), and the backend trigger is not yet confirmed. Nothing was removed.

    📋 Detailed Analysis

    Evidence

    The App cannot generate an "OAuth 2.0" message for this action. Toggling Tax runs exactly one code path:

    • The toggle in NetSuiteImportPage.tsx#L114-L131 calls updateNetSuiteSyncTaxConfiguration and renders getLatestErrorField(config, 'syncTax').
    • NetSuiteCommands.ts#L580-L588 is a plain API.write(UPDATE_NETSUITE_SYNC_TAX_CONFIGURATION, {policyID, enabled}) — the request payload is two fields, so there is no way for the client to send malformed data here.
    • The client's own failure message is the generic one — NetSuiteCommands.ts#L224-L225 writes getMicroSecondOnyxErrorWithTranslationKey('common.genericErrorMessage') into errorFields.syncTax. Any specific text the tester saw, including anything naming OAuth 2.0, therefore came from the API response, not from App.

    The only "OAuth 2.0" copy in App is unrelated to this flow. A full-tree search of staging finds a single match: the NetSuite setup-wizard step en.ts#L5731-L5733 ("Enable OAuth 2.0" / "In NetSuite, go to Setup > Company > Enable Features > SuiteCloud > under Manage Authentication, enable OAuth 2.0"). That string is only rendered inside the connect wizard, never on the Accounting > Import page.

    Staging-only is explained by state, not code. This account sits behind the netSuiteOAuth beta (CONST/index.ts#L1110), which is part of the still-open NetSuite SOAP→REST + OAuth 2.0 migration tracked in R4: Make REST + OAuth 2.0 the default for new NetSuite connections. Betas and API responses differ between the staging and production backends with zero client-code difference. The sibling blocker NetSuite - 2FA required to connect was filed minutes earlier by the same tester on the same account and is the OAuth-2.0 connect flow behaving as designed — strongly suggesting this workspace's connection was established over OAuth 2.0 / REST, and that the failure is in the server-side tax import for that transport.

    Only web platforms are checked on this report (Win 11 Chrome, macOS Chrome/Safari), so the mobile submodule bumps in this checklist cannot be involved either.

    Verification

    Affected code path and its production vs staging state:

    File production blob staging blob
    src/pages/workspace/accounting/netsuite/import/NetSuiteImportPage.tsx b3e5a1de b3e5a1de
    src/libs/actions/connections/NetSuiteCommands.ts 80922e76 80922e76
    src/libs/ErrorUtils.ts unchanged in this release unchanged in this release

    I also pulled the complete production...staging raw diff (the compare API's file list is capped at 300 entries, so the file list alone is not trustworthy) and grepped it case-insensitively for netsuite, syncTax, suiteTax and oauth. The only NetSuite hits are three help-site markdown articles from [No QA] Add NS0995 help article for deactivated NetSuite employees plus incidental context lines. No NetSuite src/ file changed.

    Candidate PRs checked and ruled out:

    Root Cause

    Nothing in the App code shipped in 9.4.81-0 changed this flow. Toggling Tax sends a two-field UpdateNetSuiteSyncTaxConfiguration write and then displays whatever the API puts in errorFields.syncTax; the App's own fallback is the generic error string, so the OAuth 2.0 wording the tester saw originated server-side. The most likely explanation, consistent with NetSuite - 2FA required to connect landing at the same time on the same account, is that this workspace's connection runs on the new OAuth 2.0 / REST transport from the in-progress migration in R4: Make REST + OAuth 2.0 the default for new NetSuite connections, and the tax import for that transport (or the NetSuite account's OAuth 2.0 / REST Web Services feature configuration) is not yet working on staging.

    Next steps, all outside the App diff:

    1. Grab the requestID from the failing UpdateNetSuiteSyncTaxConfiguration request (visible in the video attachment / browser network tab) so the server-side error and its NetSuite error code can be read directly.
    2. Confirm whether this workspace's NetSuite connection was created through the OAuth 2.0 wizard or the legacy token flow, and whether tax import is expected to work for the OAuth 2.0 / REST transport at this stage of the migration. If tax import is a known not-yet-shipped part of that migration, this is an expected beta gap rather than a release regression and can be demoted.

    cc @yuwenmemon @akinwale — owners of the NetSuite OAuth 2.0 work, for context on (2). No blame implied: no PR in this checklist is involved.

  7. akinwale commented on Sep 17, 2026

    @akinwale
    Contributor

    This is intentional. Tax-related imports have not yet been implemented for NetSuite connections over OAuth.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Sep 17, 2026
  9. 6 remaining items

  10. melvin-bot commented on Sep 29, 2026

    @melvin-bot

    @yuwenmemon 10 days overdue. Is anyone even seeing these? Hello?

  11. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    @yuwenmemon this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  12. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    @yuwenmemon 12 days overdue. Walking. Toward. The. Light...

  13. yuwenmemon commented on Oct 2, 2026

    @yuwenmemon
    Contributor

    This is fixed. The RESTlet is released. Can we please retest?

  14. added
    retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 2, 2026
  15. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    @yuwenmemon — to hire @applausebot on Upwork, add the External label so a job is created and the offer is sent automatically.

  16. melvin-bot commented on Oct 26, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @yuwenmemon, @applausebot 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!

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

Metadata

Metadata

Labels

MonthlyKSv2retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions