Skip to content

Fix Android headless test hangs - #500

Merged
brandonpage merged 2 commits into
forcedotcom:devfrom
brandonpage:codex/fix-android-headless-nightly
Sep 25, 2026
Merged

brandonpage merged 2 commits into
forcedotcom:devfrom
brandonpage:codex/fix-android-headless-nightly

Conversation

@brandonpage

Copy link
Copy Markdown
Contributor

Summary

  • replace the long-lived logcat stream with finite snapshots so a final SFTESTDONE line cannot remain buffered on Android 12L
  • remove the invalid notification permission grant and disable SDK developer support in the headless test app, preventing the API 33+ permission-activity resume loop
  • apply a 30-second timeout to each JavaScript test and an independent 30-second Android no-progress watchdog
  • remove obsolete per-class timeout overrides and update the Android test documentation

Root cause

The test manifest intentionally removes POST_NOTIFICATIONS, but developer support is enabled by default for the debuggable test app. On API 33+, developer support requested the removed permission whenever the activity resumed. The permission controller immediately closed, resumed the app, and triggered another request. This repeatedly paused React Native and could prevent testCleanResyncGhosts, its JavaScript timeout, and SFTESTDONE from running.

The failing API 34 execution logged 502 permission requests. A previously passing API 34 execution logged 1,077 requests and had a 53.3-second result gap. After disabling developer support in the headless test app, every API 31–35 validation log had zero permission requests; the largest result gap was 2.96 seconds.

Validation

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
iOS ^18 Test Results36 ran36 ✅
TestResult
No test annotations available

@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.

Inline review feedback after checking the Workspace and ReactNative Android-test documentation.

Comment thread androidTests/README.md
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
iOS ^26 Test Results36 ran36 ✅
TestResult
No test annotations available

@brandonpage
brandonpage marked this pull request as ready for review September 25, 2026 00:25
@brandonpage
brandonpage merged commit cf81fa7 into forcedotcom:dev Sep 25, 2026
11 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