Skip to content

[General] [Fixed] - Fix missing format specifier in renderApplication invariant#56329

Closed
w3di wants to merge 1 commit into
react:mainfrom
w3di:fix/invariant-missing-format-specifier
Closed

[General] [Fixed] - Fix missing format specifier in renderApplication invariant#56329
w3di wants to merge 1 commit into
react:mainfrom
w3di:fix/invariant-missing-format-specifier

Conversation

@w3di

@w3di w3di commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The invariant call in renderApplication passes rootTag as a substitution argument, but the format string has no %s placeholder. When the invariant fails, the error message reads:

Expect to have a valid rootTag, instead got

instead of:

Expect to have a valid rootTag, instead got null

The value is silently dropped, making the error less useful for debugging.

Changelog:

[General] [Fixed] - Fix missing format specifier in renderApplication invariant

Test Plan

  • Verified with invariant directly: without %s the third argument is ignored, with %s it is substituted into the message.
  • Prettier and ESLint checks pass.

… invariant

The invariant call passes rootTag as a substitution argument but the
format string has no %s placeholder, so the error message never shows
the actual value of rootTag.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 4, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 4, 2026
@meta-codesync

meta-codesync Bot commented May 11, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D104657367.

@meta-codesync meta-codesync Bot closed this in bc1a31f May 11, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label May 11, 2026
@meta-codesync

meta-codesync Bot commented May 11, 2026

Copy link
Copy Markdown

@javache merged this pull request in bc1a31f.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @w3di in bc1a31f

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants