Repository navigation
Conversation
`TesterAppDelegate::loadScript` ignored the result of `ReactHost::loadScript`. When the bundle could not be read, the tester went on to look up `$$RunTests$$` in a runtime that had evaluated nothing, and aborted with "JSError: Value is undefined, expected an Object", which says nothing about the bundle. Throw a `std::runtime_error` that names the bundle path when loading fails. The tester still aborts, and its last line now states the cause. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When the Fantom tester cannot read its JS bundle, it aborts with an error that does not mention the bundle. With a bundle path that does not exist:
TesterAppDelegate::loadScriptignores thefalsethatReactHost::loadScriptreturns, so the tester goes on to look up$$RunTests$$in a runtime that has evaluated nothing.TesterAppDelegate::loadScriptnow throws astd::runtime_errorthat names the bundle path. The tester still aborts, and its last line states the cause:Changelog:
[INTERNAL] [FIXED] - Report the bundle path when the Fantom tester's JS bundle fails to load
Test Plan:
Run on this branch (base
94aee19ac9):There is no automated test, because the failure happens before any test code loads. The tester was built on
mainand on this branch (2026-11-28) and run with a bundle path that does not exist:./gradlew :private:react-native-fantom:buildFantomTester private/react-native-fantom/build/tester/fantom_tester --bundlePath /nonexistent/missing.bundle.js --featureFlags '{}' --minLogLevel errormain:libc++abi: terminating due to uncaught exception of type facebook::jsi::JSError: Value is undefined, expected an Object.libc++abi: terminating due to uncaught exception of type std::runtime_error: Failed to load the JS bundle at /nonexistent/missing.bundle.js.A bundle that does load still runs:
yarn fantom private/react-native-fantom/src/__tests__/Fantom-itest.jspasses on this branch.🤖 Generated with Claude Code