Skip to content

fix: missing symbols on prebuilt Android with hermesV1 disabled#55400

Open
tjzel wants to merge 2 commits intofacebook:mainfrom
tjzel:@tjzel/inspector-modern-abi
Open

fix: missing symbols on prebuilt Android with hermesV1 disabled#55400
tjzel wants to merge 2 commits intofacebook:mainfrom
tjzel:@tjzel/inspector-modern-abi

Conversation

@tjzel
Copy link
Contributor

@tjzel tjzel commented Feb 3, 2026

Summary:

Since HermesV1 is enabled by default in React Native 0.84, the prebuilt Android artifacts are compiled with the flag HERMES_V1_ENABLED. This results in dropping some inspector symbols, in my case enableDebugging and disableDebugging from inspector-modern/chrome/Registration.cpp.

This is problematic, because even if the app sets hermesV1Enabled=false in gradle.properties, it's shipped with binaries compiled with hermesV1Enabled=true. This makes it so I'm expecting symbols that should be available when HERMES_V1_ENABLED macro isn't defined - but they aren't available.

I don't know what other symbols could lead to compilation failures, maybe shipping a whole other binary would be a better idea. For the time being I made a simple fix that would provide fallback implementations instead of not generating them at all.

Changelog:

[ANDROID] [FIXED] - Provide symbol fallbacks for inspector-modern/chrome/Registration.h when HermesV1 is disabled.

Test Plan:

I tested these changes (although in Registration.h file) in a project, not building from source, and they worked.

@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 Feb 3, 2026
@facebook-github-bot facebook-github-bot added p: Software Mansion Partner: Software Mansion Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Feb 3, 2026
@cipolleschi
Copy link
Contributor

This is a known issue for Hermes V1.
@huntie has more context on this

Comment on lines 39 to 45
DebugSessionToken enableDebugging(
std::unique_ptr<RuntimeAdapter>,
const std::string&) {
return -1;
};

void disableDebugging(DebugSessionToken) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment in the body explaining why we're leaving them empty (essentially what you wrote in your PR summary)

Copy link
Contributor Author

@tjzel tjzel Feb 4, 2026

Choose a reason for hiding this comment

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

Sure, added in 3d32c67

@cortinico
Copy link
Contributor

@tjzel can we make sure the CI is green?

@tjzel
Copy link
Contributor Author

tjzel commented Feb 4, 2026

yes, I'll work on that tomorrow

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. p: Software Mansion Partner: Software Mansion Partner 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.

4 participants