Skip to content

fix(test): refresh authentication token off main thread - #3006

Merged
brandonpage merged 1 commit into
forcedotcom:devfrom
brandonpage:codex/fix-test-authentication-background-refresh
Aug 25, 2026
Merged

fix(test): refresh authentication token off main thread#3006
brandonpage merged 1 commit into
forcedotcom:devfrom
brandonpage:codex/fix-test-authentication-background-refresh

Conversation

@brandonpage

Copy link
Copy Markdown
Contributor

Summary

  • refresh TestAuthenticationActivity credentials on Dispatchers.IO
  • keep account setup, user switching, and activity launch on the lifecycle main scope
  • prevent NetworkOnMainThreadException before test apps can launch

Root cause

TestAuthenticationActivity calls AccMgrAuthTokenProvider.newAuthToken from onCreate. ClientManager now performs the refresh directly, so Firebase Test Lab aborted authentication on the main thread before the React Native HeadlessTestApp mounted.

Testing

  • ./gradlew :libs:SalesforceSDK:compileDebugKotlin --no-daemon
  • SalesforceMobileSDK-ReactNative headless Android suite: 35/35 JavaScript tests passed
  • ReactHarnessTest.testAsyncPassing: passed

@brandonpage

Copy link
Copy Markdown
Contributor Author

All failing Unit Tests and most failing UI Test are caused by DPoP changes.

@brandonpage
brandonpage merged commit 6d79cba into forcedotcom:dev Aug 25, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants