Skip to content

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

Description

@eliaslecomte

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: AnsweredWhen the issue is resolved with a simple answerTech: HermesHermes Engine: https://hermesengine.dev/

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions