Repository navigation
Report the bundle path when the Fantom tester's JS bundle fails to load - #60364
Merged
meta-codesync[bot] merged 1 commit intoNov 30, 2026
Merged
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>
ide
marked this pull request as ready for review
November 29, 2026 12:02
chrfalch
reviewed
Nov 29, 2026
chrfalch
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, can be approved.
One optional nit for the description: interactive mode (main.cpp) goes through the same loadScript, so the REPL now also aborts when its bundle fails to load, where before it entered its loop anyway. runRepl.js always passes a freshly built bundle, so this should rarely matter, but it's worth a line in the description.
javache
approved these changes
Nov 30, 2026
|
@javache has imported this pull request. If you are a Meta employee, you can view this in D135074056. |
huntie
approved these changes
Nov 30, 2026
rubennorte
approved these changes
Nov 30, 2026
rubennorte
left a comment
Member
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Collaborator
|
This pull request was successfully merged by @ide in e72be4b When will my fix make it into a release? | How to file a pick request? |
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 load 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. This also applies with--interactive, which before went on to its loop with nothing loaded. 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:
There is no automated test, because the failure happens before any test code loads. Build the tester and run it 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 errorOn
mainit ends with theJSErrorabove; on this branch withstd::runtime_error: Failed to load the JS bundle at /nonexistent/missing.bundle.js. A bundle that loads still runs:yarn fantom private/react-native-fantom/src/__tests__/Fantom-itest.jspasses. clang-format passes.