Skip to content

test(expo): force-stop Google Play services when the Android Google test fails - #10512

Merged
mikepitre merged 2 commits into
mainfrom
mike/expo-e2e-relaunch-flake
Oct 29, 2026
Merged

mikepitre merged 2 commits into
mainfrom
mike/expo-e2e-relaunch-flake

Conversation

@mikepitre

Copy link
Copy Markdown
Contributor

Description

Follow-up to #10430. The Android Google sign-in test force-stops Google Play services so that Google's add-account flow can't cover the next test. That cleanup only ran when the test got to the end. If an earlier step failed, it was skipped.

That happened in run 40790794285 on the Version packages PR. The Google test's google-system-prompt screenshot hit an agent-device snapshot error on Google's loading page, so the test stopped there. About 15 s into the next test, token-cache-persistence/relaunch, Google's "Sign in with ease" page came up over the app, and its third launch timed out waiting for the home. It passed on retry and was reported as flaky.

  • On Android, the Google test now force-stops Google Play services if any step after the tap on google-sign-in-button fails, then rethrows the original error. If the force-stop itself fails, that error is dropped so the report keeps the real one.
  • The pass path is unchanged, and so is iOS.
  • The verify-clerk-expo feature map now mentions the cleanup on failure.

How it was tested, on a local Android emulator, with a temporary throw added right after the google-system-prompt screenshot (not committed):

  • Old test: after the forced failure, adb shell dumpsys activity activities still lists Play services' add-account activities in the app's task, including MinuteMaidActivity (the "Sign in with ease" page from the CI failure). 15 Play services activity records in all.
  • This branch: after the same forced failure, MinuteMaidActivity and the rest are gone. One finished, task-less record is left.
  • On this branch, running the Google test (forced to fail) and then token-cache-persistence/relaunch with --retries 0: the relaunch test passed on its first attempt. On the old test, it also passed locally, so the local emulator doesn't reproduce the timing of the CI one. The activity check above is the direct evidence.
  • integration/expo-native typecheck and unit tests pass.

The Google test can still fail on its own when the screenshot lands on Google's loading page (this run, and 40362880088 before). This PR doesn't change that. It only stops that failure from spreading into the next test.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other: CI

🤖 Generated with Claude Code

mikepitre and others added 2 commits October 28, 2026 20:24
…est fails

The Android Google test force-stopped Play services only when it reached
the end. When a step failed first, Play services' add-account flow stayed
in the app's task and later covered the home in the next test, which made
token-cache-persistence/relaunch fail its first attempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kill

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 29, 2026 12:27am UTC
swingset Ready Ready Preview Oct 29, 2026 12:27am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 33aaf3b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between cb8638a and 33aaf3b.

Files selected for processing: 3
  • .changeset/google-test-cleanup-on-failure.md
  • .claude/skills/verify-clerk-expo/features/native-modules.md
  • integration/expo-native/specs/features/native-modules/google-sign-in.e2e.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Walkthrough

The Google sign-in test wraps prompt checks and cancellation in error handling. If that flow fails on Android, it attempts to force-stop Google Play services, ignores cleanup errors, and rethrows the original error. The existing force-stop fallback remains. The changeset file gains two YAML document separators. The Google sign-in instructions remain unchanged.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • clerk/javascript#10428: Changes the same Android Google sign-in test and addresses a leaked Google Play services flow.
  • clerk/javascript#10430: Changes the same test and adds a force-stop fallback when Back does not close the page.

Suggested reviewers: wobsoriano

Merge Risk: Minimal · up to 33aaf

Android sign-in failures attempt cleanup before reporting the original error. No merge-blocking issue is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "test(expo): force-stop Google Play services when the Android Google test fails" names the main change. The changeset makes the Android Google sign-in test force-stop Google Play services wh…
Description check Passed The description matches the changeset. It explains that the Android Google sign-in test now force-stops Google Play services when a later step fails, then rethrows the original error. It also covers t…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(expo): force-stop Google Play services when the Android Google test fails" names the main change. The changeset makes the Android Google sign-in test force-stop Google Play services when a step after the tap fails. The title uses a conventional scope (test(expo)) and is specific, so it reads clearly in history.

Full details: Description check

Explanation

The description matches the changeset. It explains that the Android Google sign-in test now force-stops Google Play services when a later step fails, then rethrows the original error. It also covers the verify-clerk-expo feature map update, the iOS and pass-path behavior, and the local emulator testing.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10512

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10512

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10512

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10512

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10512

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10512

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10512

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10512

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10512

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10512

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10512

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10512

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10512

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10512

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10512

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10512

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10512

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10512

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10512

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10512

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10512

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10512

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10512

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10512

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10512

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10512

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10512

commit: 33aaf3b

@mikepitre
mikepitre requested a review from a team October 29, 2026 13:47
@mikepitre
mikepitre merged commit 39990c0 into main Oct 29, 2026
126 of 128 checks passed
@mikepitre
mikepitre deleted the mike/expo-e2e-relaunch-flake branch October 29, 2026 13:57

This branch was successfully deployed

2 active deployments
Preview – swingset — 33aaf3bc Deployed Oct 29, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 33aaf3bc Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants