Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Seeing Hermes Inspecter Threads in release app #39556

Closed
jayshah123 opened this issue Sep 20, 2023 · 15 comments
Closed

[iOS] Seeing Hermes Inspecter Threads in release app #39556

jayshah123 opened this issue Sep 20, 2023 · 15 comments
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@jayshah123
Copy link
Contributor

jayshah123 commented Sep 20, 2023

Description

We see Hermes Inspector threads to be present in release/production version of the app.

Ideally anything related to dev tooling should not be present in release/production version of the app.

React Native Version

0.70.7

Output of npx react-native info

System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Pro
Memory: 315.55 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
Yarn: 1.18.0 - /opt/homebrew/bin/yarn
npm: 8.15.1 - ~/Documents/my-app/node_modules/.bin/npm
Watchman: 2023.08.28.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/jayshah/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 17.0.7 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.7 => 0.70.7
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Just run a release version of the app.

Setup Sentry or any other error analytics tool.

See the threads present in the crash report.

We should not have "hermes inspector connection" and related threads.

Snack, screenshot, or link to a repository

Screenshot 2023-09-20 at 4 12 39 PM
@github-actions github-actions bot added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Sep 20, 2023
@github-actions
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@github-actions github-actions bot added Platform: iOS iOS applications. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Sep 20, 2023
@cortinico
Copy link
Contributor

Can you provide a stronger evidence that this is actually happening in any release version of React Native and is not just a misconfiguration on your end? Specifically, I can't set up Sentry to reproduce this

@jayshah123
Copy link
Contributor Author

It is a release version of the app.
I will reproduce it in a sample react native app which is packaged for release to the stores(https://reactnative.dev/docs/publishing-to-app-store#3-build-app-for-release).
Also will take a look at tooling to inspect/enumerate threads in the running app.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Sep 28, 2023
@popejrh19
Copy link

popejrh19 commented Sep 28, 2023 via email

@cortinico cortinico added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Sep 28, 2023
@Cirych
Copy link

Cirych commented Oct 11, 2023

Same for RN 0.72.5

hermes-inspector, hermes-chrome-inspector-conn in production build

They appeared after updating from version RN 0.70.6

@Cirych
Copy link

Cirych commented Oct 12, 2023

Workaround for RN 0.72.5

export PRODUCTION=1
export NO_FLIPPER=1

Added before bundle exec pod install, for prod build environment, ios/.xcode.env file, Fastlane, everywhere...

@jayshah123
Copy link
Contributor Author

@cortinico should these flags mentioned be added in the docs after appropriate review of core team members? It would be a huge win for existing and new apps.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 13, 2023
@cortinico
Copy link
Contributor

@cortinico should these flags mentioned be added in the docs after appropriate review of core team members? It would be a huge win for existing and new apps.

Nope we should not document this as it's a workaround.
@cipolleschi can help further in triaging this problem, but normally you should not need to set those variables in your environment before the build.

@cortinico cortinico removed the Needs: Attention Issues where the author has responded to feedback. label Oct 13, 2023
@cipolleschi
Copy link
Contributor

Actually, it is expected. To build your app for production in 0.72, you have to use those flags to build the app.
That's not a workaround but the proper way to do it in 0.72 and lower. We had to introduce those flags as, before, Release builds will not build due to an issue with flipper missing some symbols in Release mode.

@jayshah123 It is a good idea to add a section of the docs for 0.72 and lower explaining this. Would you mind open a PR on the website? :D

@jayshah123
Copy link
Contributor Author

Actually, it is expected. To build your app for production in 0.72, you have to use those flags to build the app.
That's not a workaround but the proper way to do it in 0.72 and lower. We had to introduce those flags as, before, Release builds will not build due to an issue with flipper missing some symbols in Release mode.

@jayshah123 It is a good idea to add a section of the docs for 0.72 and lower explaining this. Would you mind open a PR on the website? :D

What is the earliest version of RN where these flags need to be set during build?
I think the flags are needed all the way till latest version.

@cipolleschi
Copy link
Contributor

So far we are maintaining 0.70 -> 0.73.rc.
From 0.70 to 0.72: they need both flags.
For 0.73, you'll only need export NO_FLIPPER=1, as we fixed the reason why we needed PRODUCTION=1.
From 0.74 onward, you'll need no flag at all.
😄

@jayshah123
Copy link
Contributor Author

jayshah123 commented Nov 15, 2023

I have added both flags: but to no avail, I am on 0.70.13.

Could you point me to files, commits that start these threads so I can understand this better?

@cipolleschi
Copy link
Contributor

Everything goes back to this discussion of 1 year and a half ago: #33764

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

5 participants