question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not use Hermes Debugger when enabled hermes Android

See original GitHub issue

Description

I cannot use Hermes Debugger on the Flipper and Chrome Inspect doesn’t show React Native Hermes app. The Metro is running in port 9039 and localhost:9039/json returns an empty array. I have already followed Troubleshooting Issues I don’t see the ‘React Native’ device:

yarn why @react-native-community/cli

=> Found "@react-native-community/cli@6.1.0"
info Reasons this module exists
   - "react-native" depends on it
   - Hoisted from "react-native#@react-native-community#cli"
info Disk size without dependencies: "1016KB"
info Disk size with unique dependencies: "10.3MB"
info Disk size with transitive dependencies: "62.35MB"
info Number of shared dependencies: 167

But it doesn’t resolve the problem. I was enableHermes in app/build.gradle And sure that Hermes is enabled correctly: https://imgur.com/g7Rk9HF

Additional info: My Flipper when it was connected with my basic test app was shown like this. https://imgur.com/KIQM8GG It is a basic app created by react-native init TestProject

Version

0.66.2

Output of react-native info

System: OS: macOS 12.0.1 CPU: (8) x64 Intel® Core™ i7-7700HQ CPU @ 2.80GHz Memory: 386.70 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.9.1 - /usr/local/bin/node Yarn: 1.10.1 - ~/.yarn/bin/yarn npm: 7.21.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Not Found Android SDK: API Levels: 23, 25, 26, 28, 29, 30 Build Tools: 28.0.1, 28.0.2, 28.0.3, 29.0.2, 29.0.3, 30.0.1, 30.0.2 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: /undefined - /usr/bin/xcodebuild Languages: Java: 1.8.0_281 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.2 => 0.66.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  • Create a basic app by react-native init TestProject
  • enabled Hermes for Android.
  • run react-native android and react-native start --port=9039
  • Change port to port 9039 in the DevMenu

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

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

4reactions
kyunkakatacommented, Nov 19, 2021

Does no one suffer from this problem? Only us?

1reaction
aymkincommented, May 4, 2022

In my case I wanted to use Reanimated 2, that is why the Hermes was enabled. That was not required, but I enabled it for iOS as well.

As a result:

  • can run the iOS app and debug it with a remote debugger (Flipper)
  • can’t run the Android app with the debugger, only without

Launching Android app without debugger results callconst isHermes = () => !!global.HermesInternal; to be true. However, enabling debug will result isHermes() to false

react-native info

System:
    OS: macOS 11.6.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
    Memory: 82.78 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.18 - ~/.yarn/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/lib/ruby/gems/3.1.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 23, 28, 29, 30, 31
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 31.0.0, 33.0.0
      System Images: android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64, android-Tiramisu | Google APIs Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: Bumblebee 2021.1.1 Patch 2 Bumblebee 2021.1.1 Patch 2
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.2 => 0.65.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found```
Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Hermes - React Native
Hermes supports the Chrome debugger by implementing the Chrome inspector protocol. This means Chrome's tools can be used to directly debug ...
Read more >
Using Hermes in React Native - LogRocket Blog
Debugging a React Native app in Chrome​​ Hermes has support for debugging JavaScript via Chrome DevTools by implementing the Chrome inspector ...
Read more >
Using Hermes Engine - Expo Documentation
A guide on configuring Hermes for both Android and iOS in an Expo project. ... JavaScript Debugging can only be used with the...
Read more >
How to enable Hermes Engine in an existing react native app
Hermes is an open-source JavaScript engine optimized for running React Native apps on Android. For many apps, enabling Hermes will result in ...
Read more >
Using Hermes - React Native
You should now see a "Hermes React Native" target with an "inspect" link which can be used to bring up debugger. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found