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

[0.77][Needs repro] Unable to launch React Native DevTools in newly upgraded app #49287

Open
brianaderer opened this issue Feb 8, 2025 · 6 comments
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.

Comments

@brianaderer
Copy link

Description

No info in console. Eventually I get the following error:

Failed to open debugger for com.bevnote.somm725 (iPhone 16 Pro) (React Native Bridgeless [C++ connection]): fetch failed

RN Debugger worked in 0.76.2 before I upgraded. When I try to access it via 'd' in android I get:

INFO Opening Dev Menu...
INFO Launching DevTools...
WARN No compatible apps connected. React Native DevTools can only be used with the Hermes engine.

Steps to reproduce

  1. yarn start
  2. yarn iOS / yarn android
  3. 'j' / 'd'

React Native Version

0.77.0

Output of npx react-native info

System:
  OS: macOS 15.1.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 115.05 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.0.0
    path: ~/.nvm/versions/node/v21.0.0/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.0
    path: ~/.nvm/versions/node/v21.0.0/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/brianaderer/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12483815
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/brianaderer/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.1.2
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.0
    wanted: 0.77.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Screenshots and Videos

No response

@brianaderer brianaderer added Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Triage 🔍 labels Feb 8, 2025
@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Feb 8, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@cipolleschi
Copy link
Contributor

cipolleschi commented Feb 9, 2025

@brianaderer thanks for the issue. Let me ask a few clarifying questions:

  • Have you tried to press j from the terminal that is running metro? What happens when you try that?
  • Are you running your app on a physical device or on a simulator/emulator?
  • Does the problem happens for both Android and iOS or is it limited to one platform?

@brianaderer
Copy link
Author

brianaderer commented Feb 9, 2025 via email

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Feb 9, 2025
@brianaderer
Copy link
Author

Oh also, I'm using emulators. I didn't try it from physical devices in that config. Also worth noting, I was using the RN debugger in 0.76 and everything worked fine

@shubhamguptadream11
Copy link
Collaborator

shubhamguptadream11 commented Feb 10, 2025

Hey @brianaderer,

I tested this on a fresh React Native sample app using version 0.77.0, created with:

npx @react-native-community/cli init Reproducer --version 0.77.0

Tested on:

  • Android Emulator → React Native DevTools is working fine even console logs are coming.

Attaching a video reference for your review.

Screen.Recording.2025-02-10.at.12.32.45.PM.mov

WARN No compatible apps connected. React Native DevTools can only be used with the Hermes engine.

As per this please check hermesEnabled is true in gradle.properties file.

If you still face this issue. Please provide a valid reproducer.

@shubhamguptadream11 shubhamguptadream11 added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Feb 10, 2025
@huntie huntie changed the title React Native Dev Tools not working with RN 77 [0.77][Needs repro] Unable to launch React Native DevTools in newly upgraded app Feb 10, 2025
@huntie
Copy link
Member

huntie commented Feb 10, 2025

Hi @brianaderer,

Is this continuing to reproduce? (Please check @shubhamguptadream11's reply above for sanity checking — although seeing React Native Bridgeless [C++ connection] tells me you have a correct modern debugger backend.)

  • There's a small chance the failed fetch() is a 404 against a previously cached network address for the device during the development session — in this case, the issue would be transitive and resolved after restarting Metro.
  • Have you customised the --host option when running npx @react-native-community/cli start, or via config?
  • How about opening the Dev Menu (instructions) — do you see an "Open Debugger" option available?

Since you were previously using the community react-native-debugger project, prior to upgrading, you were depending on a completely different debugging method (Remote JS Debugging, deprecated 2023) — please also check you have a correct version of the template maintained across previous React Native upgrades.

  • It may be worth initing a new React Native project on your system to verify you can debug another project on your system.

(Sidenote for maintainers/me: fetch failed is a poor error cause and should be improved.)

huntie added a commit to huntie/react-native that referenced this issue Feb 10, 2025
Summary:
Motivated by facebook#49287.

This improves on the less useful output of "fetch failed" currently. We expect failing to make a request to the dev server (made from the dev server!) to be a rare edge case, in which case we want to log as much info as possible.

Changelog: [Internal]

Differential Revision: D69395983
facebook-github-bot pushed a commit that referenced this issue Feb 10, 2025
Summary:
Pull Request resolved: #49295

Motivated by #49287.

This improves on the less useful output of "fetch failed" currently. We expect failing to make a request to the dev server (made from the dev server!) to be a rare edge case, in which case we want to log as much info as possible.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69395983

fbshipit-source-id: ee96d72ade5a887d190397c3b798a5b545152587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.
Projects
None yet
Development

No branches or pull requests

5 participants