Skip to content

[Android] Preserve OAuth callbacks across Activity lifecycle changes - #503

Merged
JohnsonEricAtSalesforce merged 3 commits into
forcedotcom:dev141from
JohnsonEricAtSalesforce:fix/android-oauth-activity-lifecycle
Nov 20, 2026
Merged

JohnsonEricAtSalesforce merged 3 commits into
forcedotcom:dev141from
JohnsonEricAtSalesforce:fix/android-oauth-activity-lifecycle

Conversation

@JohnsonEricAtSalesforce

Copy link
Copy Markdown
Contributor

Prevent pending React Native authentication callbacks from being lost when Android recreates the Activity after login. Complete the callback before recreation, and dispatch OAuth operations on the main thread using an Activity that is not finishing or destroyed. The existing bounded missing-Activity error remains unchanged.

Extracts the independent fixes from RN501. React Native stays at 0.86.0; dependency and toolchain declarations are unchanged.

Validation:

  • Seven focused, account-free Android instrumentation cases on RN 0.86/API 36: the unchanged baseline fails four cases; the fixes pass all seven.
  • Tests use an isolated harness with intact Android SDK 5cfedf4, AGP 9.1.1 and Gradle 9.4.1. The stock test-project setup and a live sign-in matrix were not rerun for this branch. Hosted CI is pending publication.

After this lands, RN501 can integrate dev141, removing the overlapping OAuth changes from its upgrade diff without rewriting published history.

This response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce.

…cle changes (Complete authentication before Activity recreation)
…cle changes (Dispatch OAuth on a live Activity on the main thread)
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
TestsPassed ☑️SkippedFailed ❌️
iOS ^18 Test Results36 ran35 ✅1 ❌
TestResult
iOS ^18 Test Results
ReactNetTests.testDescribeLayout()❌ failure

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
TestsPassed ☑️SkippedFailed ❌️
iOS ^26 Test Results36 ran35 ✅1 ❌
TestResult
iOS ^26 Test Results
ReactNetTests.testDescribeLayout()❌ failure

…cle changes (Clarify authentication lifecycle test fixtures)

@wmathurin wmathurin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The callback is delivered before recreate(), OAuth dispatch runs on the main thread against a live Activity, and our three comments are addressed (test factory with labeled ClientInfo args, reflection coupling documented on both fields, overlapping-authenticate loss tracked as a follow-up).

Please confirm android-pr / test-android and the iOS jobs finish green on 951f002 before merging, and make sure #501 picks up dev141 after this lands so the overlapping commits drop out of its diff.

@JohnsonEricAtSalesforce

Copy link
Copy Markdown
Contributor Author

@wmathurin Following up on the green-CI condition: the current run passed 41/42 Android tests, including all seven OAuth lifecycle regressions. The failing test is testDescribeLayout.

Local Android controls using the same CI account/session, record type and API 36 emulator returned the same HTTP 500 (UNKNOWN_EXCEPTION: Failed to read template of type: ActivityFilter) on unchanged dev141 (89c47f1), this head (951f002), and unchanged dev141 again. An independent HTTPS client without MSDK reproduced it too.

iOS 18/26 each passed 35/36 tests and timed out in the same layout test. This PR changes no iOS/shared REST/test inputs; the exact iOS REST error was not archived. We’ve accepted the demonstrated server failure as baseline and deferred follow-up.

Would you accept these documented baseline failures in place of the green-CI condition for this PR? After it lands, #501 will integrate updated dev141 so the OAuth changes drop out of its diff.

This response was generated by an AI agent on behalf of @JohnsonEricAtSalesforce.

@JohnsonEricAtSalesforce
JohnsonEricAtSalesforce merged commit 1a90037 into forcedotcom:dev141 Nov 20, 2026
6 of 11 checks passed
@JohnsonEricAtSalesforce
JohnsonEricAtSalesforce deleted the fix/android-oauth-activity-lifecycle branch November 20, 2026 23:04
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