Skip to content

Fix web and vega platform runner init signature mismatch - #175

Merged
V3RON merged 1 commit into
mainfrom
fix-web-vega-runner-init-signature
Jul 30, 2026
Merged

Fix web and vega platform runner init signature mismatch#175
V3RON merged 1 commit into
mainfrom
fix-web-vega-runner-init-signature

Conversation

@V3RON

@V3RON V3RON commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What is this?

The web and Vega platforms failed to start: session setup threw
TypeError: Cannot read properties of undefined (reading 'aborted')
before any test could run.

How does it work?

The harness session invokes each platform runner's default export as
module.default(config, harnessConfig, init). The web and Vega
runners only declared (config, init?), so harnessConfig landed in
the init slot and init.signal.aborted threw on a value that was
actually the harness config, not the init options. Both runners now
declare (config, harnessConfig, init) with init required, matching
platform-ios and platform-android. A shared
HarnessPlatformRunnerFactory<TConfig, THarnessConfig> type in
@react-native-harness/platforms is applied to all four platform
runners so a signature mismatch like this fails to typecheck instead
of throwing at runtime. New unit tests in platform-web and
platform-vega assert the runner arity matches the session's call
shape and exercise the abort-signal handling end to end.

Why is this useful?

The web and Vega platforms are usable again, and the shared factory
type turns a class of runtime crash into a compile-time error for
every current and future platform runner.


Note for reviewers: @react-native-harness/cache:test has a
pre-existing, unrelated failure in boundary.test.ts (a cache-path
boundary check flagging bundler-metro/src/metro-block-list.ts) that
reproduces on main and is untouched by this change.

The harness session calls each platform runner's default export as
module.default(config, harnessConfig, init), but the web and vega
runners only declared (config, init?), so harnessConfig landed in the
init slot and init.signal.aborted threw
"Cannot read properties of undefined (reading 'aborted')" during
session setup.

Both runners now declare (config, harnessConfig, init) with init
required, matching platform-ios and platform-android. A shared
HarnessPlatformRunnerFactory<TConfig, THarnessConfig> type in
@react-native-harness/platforms is applied to all four runners so this
class of signature drift fails to typecheck instead of throwing at
runtime.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
react-native-harness Ready Ready Preview Jul 30, 2026 3:02pm

Request Review

@V3RON
V3RON merged commit 0b84bcf into main Jul 30, 2026
5 of 6 checks passed
@V3RON
V3RON deleted the fix-web-vega-runner-init-signature branch July 30, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant