test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

test(expo): Restore green expo native Maestro flows and enforce them - #9303

Merged
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro
Jul 31, 2026
Merged

test(expo): Restore green expo native Maestro flows and enforce them#9303
wobsoriano merged 12 commits into
mainfrom
rob/test-fix-android-maestro

Conversation

@wobsoriano

@wobsorianowobsoriano commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Android Maestro e2e had failed on every run since the switch to maestro-runner (#9264) (maestro open source fork). This restores the suite to green on both platforms and removes the burn-in continue-on-error, so e2e failures now fail the job.

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:

@changeset-bot

changeset-botBot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5c0124

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

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreviewJul 31, 2026 8:16pm
swingsetReadyReadyPreviewJul 31, 2026 8:16pm

Request Review

@github-actions

github-actionsBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-31T19:58:52.159Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 24e9236.

@pkg-pr-new

pkg-pr-newBot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f5c0124

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change gates Android auth and profile views on Clerk initialization and shows progress indicators during loading. It adds runtime-controlled Expo and Clerk Android debug logging. Native configuration failures now emit release warnings and development error details. The Expo template adds conditional OkHttp alignment rules. Maestro execution supports CLI and runner engines. Integration flows now cover platform-specific navigation and input handling.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Suggested reviewers:mikepitre

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly summarizes restoring Expo native Maestro flows and enforcing failures in the test workflow.
Description check✅ PassedThe description directly explains the Android Maestro failures, cross-platform flow restoration, and removal of continue-on-error.

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

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

🧹 Nitpick comments (1)
packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider consolidating debugLog here instead of duplicating it per module.

debugLog(tag, message) is defined identically in ClerkExpoModule.kt, ClerkAuthViewModule.kt, and ClerkUserProfileViewModule.kt, each guarded by clerkExpoDebugEnabled(). Move a single internal fun debugLog(tag: String, message: String) into this file and have the three modules call the shared version. This keeps the debug-logging policy defined in one place and avoids future drift if the guard condition changes again.

♻️ Proposed consolidation
 internal fun clerkExpoDebugEnabled(): Boolean =
BuildConfig.DEBUG || Log.isLoggable(CLERK_EXPO_DEBUG_TAG, Log.DEBUG)
++internal fun debugLog(tag: String, message: String) {+ if (clerkExpoDebugEnabled()) {+ Log.d(tag, message)+ }+}

Then remove the private debugLog copies from the three modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`
around lines 9 - 10, Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt`:
- Around line 9-10: Move the shared debugLog(tag: String, message: String)
implementation into ClerkExpoDebug.kt, retaining the clerkExpoDebugEnabled()
guard and existing logging behavior. Update ClerkExpoModule,
ClerkAuthViewModule, and ClerkUserProfileViewModule to use this internal helper,
then remove their duplicated private debugLog definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a7ea04b-4dd7-40f1-b2c9-fe580acb5f07

📥 Commits

Reviewing files that changed from the base of the PR and between 38f347c and 87b7e3b.

📒 Files selected for processing (7)
  • .changeset/expo-native-debug-logging.md
  • .github/workflows/expo-native-build.yml
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoDebug.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkExpoModule.kt
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkUserProfileViewModule.kt
  • packages/expo/src/provider/nativeClientSync.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js`:
- Around line 19-23: Update the injection guard in withClerkOkHttpAlignment to
verify that all three required OkHttp coordinates are already present before
skipping GRADLE_BLOCK, or use a unique marker for the complete injected block.
Ensure configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still
receive the logging-interceptor and okhttp-urlconnection rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5603267a-a07d-42a2-8355-c906d46e6f66

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7e3b and c0f648c.

📒 Files selected for processing (3)
  • integration/templates/expo-native/app.json
  • integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
  • integration/tests/expo-native/flows/embedded-profile-host-back.yaml
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines +19 to +23
module.exports = function withClerkOkHttpAlignment(config) {
return withAppBuildGradle(config, cfg => {
if (!cfg.modResults.contents.includes('com.squareup.okhttp3:okhttp:5.4.0')) {
cfg.modResults.contents += GRADLE_BLOCK;
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect all existing OkHttp declarations and force rules in the Expo fixture.
rg -n -C 3 \
'com\.squareup\.okhttp3:(okhttp|logging-interceptor|okhttp-urlconnection)|resolutionStrategy|force' \
integration/templates/expo-native

Repository: clerk/javascript

Length of output: 1983


🏁 Script executed:

#!/bin/bashset -euo pipefail
printf'%s\n''--- plugin and related tests ---'
sed -n '1,180p' integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js
rg -n -C 4 \
'withClerkOkHttpAlignment|GRADLE_BLOCK|logging-interceptor|okhttp-urlconnection|resolutionStrategy|okhttp:5\.4\.0' \
integration packages .github 2>/dev/null | head -n 300 ||trueprintf'%s\n''--- Expo template Gradle files ---'
find integration/templates/expo-native -type f \( -name '*.gradle' -o -name '*.gradle.kts' -o -name 'app.json' -o -name 'app.config.*'\) -print

Repository: clerk/javascript

Length of output: 6057


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathpath = Path("integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js")text = path.read_text()marker = "com.squareup.okhttp3:okhttp:5.4.0"block = [ "com.squareup.okhttp3:okhttp:5.4.0", "com.squareup.okhttp3:logging-interceptor:5.4.0", "com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16",]def inject(contents): return contents + ("""\\nconfigurations.all { resolutionStrategy { force 'com.squareup.okhttp3:okhttp:5.4.0' force 'com.squareup.okhttp3:logging-interceptor:5.4.0' force 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.16' }}""" if marker not in contents else "")cases = { "empty": "", "complete_block": "\\n".join(f"force '{x}'" for x in block), "core_only": "dependencies { implementation 'com.squareup.okhttp3:okhttp:5.4.0' }", "core_and_unrelated": "\\n".join([ "implementation 'com.squareup.okhttp3:okhttp:5.4.0'", "force 'com.squareup.okhttp3:other:1.0.0'", ]),}for name, contents in cases.items(): output = inject(contents) missing = [x for x in block if x not in output] print(f"{name}: injected={output != contents}, missing_required_coordinates={missing}")PY

Repository: clerk/javascript

Length of output: 615


Check all required OkHttp coordinates before skipping injection. If another plugin adds only com.squareup.okhttp3:okhttp:5.4.0, this condition skips the logging-interceptor and okhttp-urlconnection rules. Use a unique block marker or verify all three coordinates before skipping injection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/templates/expo-native/plugins/withClerkOkHttpAlignment.js` around
lines 19 - 23, Update the injection guard in withClerkOkHttpAlignment to verify
that all three required OkHttp coordinates are already present before skipping
GRADLE_BLOCK, or use a unique marker for the complete injected block. Ensure
configurations containing only com.squareup.okhttp3:okhttp:5.4.0 still receive
the logging-interceptor and okhttp-urlconnection rules.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration/tests/expo-native/run-flows.sh (1)

18-61: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unsupported MAESTRO_ENGINE values.

Values such as CLI or a typo select maestro-runner, while Android requires maestro. Validate cli|runner once, fail for other values, and reuse the validated value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/run-flows.sh` around lines 18 - 61, Validate
MAESTRO_ENGINE once near the existing engine-selection logic, accepting only cli
or runner and exiting with an error for any other value, including case variants
such as CLI. Store the validated/defaulted value and reuse it in both the
dependency check and run_flow selection instead of repeatedly reading
MAESTRO_ENGINE.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`:
- Around line 32-55: Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.
---
Outside diff comments:
In `@integration/tests/expo-native/run-flows.sh`:
- Around line 18-61: Validate MAESTRO_ENGINE once near the existing
engine-selection logic, accepting only cli or runner and exiting with an error
for any other value, including case variants such as CLI. Store the
validated/defaulted value and reuse it in both the dependency check and run_flow
selection instead of repeatedly reading MAESTRO_ENGINE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 503c4483-55ed-4608-9f5d-de597e82f457

📥 Commits

Reviewing files that changed from the base of the PR and between abfa03a and 129ea14.

📒 Files selected for processing (3)
  • .github/workflows/expo-native-build.yml
  • integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml
  • integration/tests/expo-native/run-flows.sh
🔗 Linked repositories identified

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

  • clerk/clerk_go(manual)
  • clerk/dashboard(manual)
  • clerk/accounts(manual)
  • clerk/backoffice(manual)
  • clerk/clerk(manual)
  • clerk/clerk-docs(manual)
  • clerk/cloudflare-workers(manual)
  • clerk/clerk-ios(auto-detected)
  • clerk/clerk-android(auto-detected)
  • clerk/cli(auto-detected)

Comment on lines 32 to +55
- runFlow:
when:
visible: 'Select [Aa]ll'
notVisible: ${CLERK_TEST_EMAIL}
commands:
- tapOn:
text: 'Select [Aa]ll'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
- runFlow:
when:
platform: iOS
commands:
- longPressOn:
text: 'Enter your email( or username)?'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn:
text: 'Select All'
- eraseText: 100
- inputText: ${CLERK_TEST_EMAIL}
# Wait for the typed value to land before tapping: the tap can race the
# recomposition that enables the button, and this also catches a mangled
# identifier inside the retry instead of at the next screen's timeout.
- extendedWaitUntil:
visible: ${CLERK_TEST_EMAIL}
timeout: 5000

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- target workflow ---'
cat -n integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml | sed -n '1,110p'printf'%s\n''--- email generation and related selectors ---'
rg -n -C 3 'CLERK_TEST_EMAIL|sign-in-email-password|Select All|extendedWaitUntil' integration/tests/expo-native

Repository: clerk/javascript

Length of output: 29379


🌐 Web query:

Maestro selectors text regular expressions exact text plus sign escape

💡 Result:

In the Maestro automation framework, all text and id selectors are treated as regular expressions by default [1][2]. Because the plus sign (+) is a reserved control character in regular expressions—signifying "one or more" of the preceding element—it must be escaped when you intend to match it as a literal character [1][2]. To match a literal plus sign, you should escape it using a backslash (\) within your regex string [3][4]. For example, to match the literal text "+33", use: - tapOn: "\+33.*" [3] When working with these selectors, keep the following in mind: 1. Full String Matching: Because Maestro treats these selectors as regex, the pattern must match the entire text of the element [2]. To perform a partial match, ensure you include wildcards like .* at the beginning and end of your string as needed (e.g., .*\\+33.*) [2]. 2. YAML and Escape Sequences: If you encounter issues with YAML parsing while using backslashes, you may need to use double backslashes (\\) in your string or use block scalars (e.g., >-) to handle special characters more reliably [3][4]. 3. Alternative: If a specific symbol or character sequence is causing consistent issues with regex matching, a common workaround is to use the wildcard .* to bypass the problematic character, provided the surrounding text is unique enough to identify the element [4].

Citations:


🏁 Script executed:

#!/bin/bashset -e
printf'%s\n''--- all CLERK_TEST_EMAIL references ---'
rg -n -C 2 'CLERK_TEST_EMAIL|clerk_test'. --glob '!node_modules' --glob '!dist' --glob '!build'printf'%s\n''--- Maestro configuration and environment handling ---'
rg -n -C 3 'maestro|--env|test email|TEST_EMAIL' integration/tests/expo-native .github package.json pnpm-workspace.yaml 2>/dev/null ||true

Repository: clerk/javascript

Length of output: 38062


🏁 Script executed (no clone):

#!/bin/bash
set -e
python3 - <<'PY'
import re
for email in ("user+clerk_test@example.com", "user+clerk_test@sub.example.com"):
pattern = re.compile(email)
print(email, "fullmatch=", bool(pattern.fullmatch(email)), "search=", bool(pattern.search(email)))
PY

Length of output: 247


Escape CLERK_TEST_EMAIL before using it in Maestro selectors.

The +clerk_test suffix and other regex metacharacters in the email make the raw selector fail. Use an escaped selector value for notVisible and extendedWaitUntil, while retaining CLERK_TEST_EMAIL for inputText.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integration/tests/expo-native/flows/subflows/sign-in-email-password.yaml`
around lines 32 - 55, Escape CLERK_TEST_EMAIL when assigning it to the Maestro
selector expressions used by notVisible and extendedWaitUntil, so regex
metacharacters in the email are matched literally. Keep the original
CLERK_TEST_EMAIL value unchanged for inputText.

@wobsorianowobsoriano changed the title test(e2e): Ignoreci(e2e): Restore green expo native Maestro flows and enforce themJul 31, 2026

@wobsorianowobsorianoJul 31, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

clerk-android is built against OkHttp 5, while React Native pins apps to OkHttp 4. That mismatch causes the native instance config fetch to fail at runtime, so sign-in never loads.

This CI fixture forces OkHttp 5, along with the last okhttp-urlconnection alpha that still ships JavaNetCookieJar, to match clerk-android. This is a known ecosystem issue. Expo hit the same problem (expo/expo#44848), and the same workaround is documented on StackOverflow: https://stackoverflow.com/questions/72885577/how-to-implement-okhttp-5-0-0-in-react-native-module

This only affects the CI fixture. Consumer apps are unchanged.

@wobsorianowobsoriano changed the title ci(e2e): Restore green expo native Maestro flows and enforce themtest(expo): Restore green expo native Maestro flows and enforce themJul 31, 2026
@wobsoriano
wobsoriano merged commit fdadaa2 into mainJul 31, 2026
66 checks passed
@wobsoriano
wobsoriano deleted the rob/test-fix-android-maestro branch July 31, 2026 21:49
Sign up for freeto 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

@wobsoriano@swolfand