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

Hermes Profiler is broken in React Native 0.69.5 and 0.70.0 #34703

Closed
eliaslecomte opened this issue Sep 15, 2022 · 1 comment
Closed

Hermes Profiler is broken in React Native 0.69.5 and 0.70.0 #34703

eliaslecomte opened this issue Sep 15, 2022 · 1 comment
Labels
Resolution: Answered When the issue is resolved with a simple answer Tech: Hermes Hermes Engine: https://hermesengine.dev/

Comments

@eliaslecomte
Copy link

Description

When using the Hermes profiler with a fresh react native app, after enabling Hermes, the profiler file is always empty. Tested using React Native 0.69.5 and 0.70.0.

Tested with Samsung S21 Android 12 and a Macbook Pro M1.

Version

0.70.0

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Pro
Memory: 2.42 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
Yarn: Not Found
npm: 8.1.2 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: 2022.09.05.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /Users/eliaslecomte/.asdf/shims/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.3 => 0.69.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. Create a new repo
  2. Enable hermes (enableHermes in android/app/build.gradle)
  3. Run android: npx react-native run-android
  4. Press d in packager
  5. Press Enable Sample Profiler (to start)
  6. Press d in packager
  7. Press Enable Sample Profiler (to stop)
  8. Get a toast

Snack, code example, screenshot, or link to a repository

Error when downloading the sample:

info Downloading a Hermes Sampling Profiler from your Android device...
info No filename is provided, pulling latest file
warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info File to be pulled: sampling-profiler-trace2304690698737821966.cpuprofile
error /var/folders/wn/53s2bq6n7_d3z6cpvd3zx7lr0000gp/T/sampling-profiler-trace2304690698737821966.cpuprofile is an empty file.
Error: /var/folders/wn/53s2bq6n7_d3z6cpvd3zx7lr0000gp/T/sampling-profiler-trace2304690698737821966.cpuprofile is an empty file

Also verified via Android Studio's Device File Explorer, the file exists but is empty.
image

@cortinico cortinico added the Tech: Hermes Hermes Engine: https://hermesengine.dev/ label Sep 16, 2022
@cortinico
Copy link
Contributor

Thanks for reporting this. Closing as this issue was fixed in 0.70.1:

Please reopen if the issue persists.

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer Tech: Hermes Hermes Engine: https://hermesengine.dev/
Projects
None yet
Development

No branches or pull requests

2 participants