-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Unable to debug new Hermes React Native app using Chrome DevTools #35600
Comments
Recent versions of Chrome have stopped fetching sources from URLs in this scenario. We have an upcoming fix that will restore this functionality (by fetching the source directly, instead of via a URL). In the meantime, the easiest way to restore source loading is by using a previous version of Chrome, or Flipper. |
Hi, same issues System: |
Thanks @mattbfb - would you recommend I close this or leave it open for tracking purposes? Thanks again for the background - I'll use Flipper for the time being. |
We can't use flipper in our case as it's not compatible with react-native-firebase. So this issue is quite a show-stopper for our react-native upgrade initiative. Any suggestions over how source map could be added manually? Thanks. |
It seems like this should have been fixed in the latest 0.71 release.
https://reactnative.dev/blog/2023/01/12/version-071#hermes However, I'm still not able to load source maps with the same error as above: Any ideas on how to get around this or if it's still an outstanding issue? Thanks!
|
I'm still seeing this issue with react native v0.71.1 and Chrome 109.0.5414.119 |
I'm also seeing the same issue as @benrbrook with react native v0.71.1 and Chrome 109.0.5414.119 |
I'm seeing a similar issue with react-native-debugger and RN v0.71 |
same issue. devtools didnt work https://reactnative.dev/docs/hermes#debugging-js-on-hermes-using-google-chromes-devtools |
Just thought I'd add my two cents. This is also happening for me on 0.71.2 and Chrome Version 110.0.5481.77. Console doesn't show logs and files don't show up in Sources. Actually, they've never showed up in Sources, but I could definitely use the Console before. Also using |
I also cannot get this to work with react-native-debugger and RN v0.71. Any update? |
It seems source maps are disabled by default. Could that be related? |
@matthewmturner I was able to get the debugger to work when following those instructions, but only when running from XCode. We are also using Firebase. |
any updates ? |
This seems to be still happening on 0.71.4. Has anyone able to find a workaround? |
I had to temporarily disable Hermes in Podfile |
Do you need to also disable hermes in Android for it to work? |
Android seems fine and I can use still
|
The state of debugging RN has been a difficult one from the beginning. Most developers use console.log to "debug" to this day. There is no integration into VScode (which has an excellent debugger) and hermes does not improve a lot in that regard. |
Still have this problem. It seems that I should use use older version of react native. |
anyone knows if this is getting adressed in v0.72 ? |
Having the same issue in |
I am using RN 0.70.10 and cannot have both hermes disabled and flipper disabled as I get a build errors related to hermes.h or Thread 1: signal SIGABRT because of "Library not loaded: @rpath/hermes.framework/hermes". Edit: Solved this crash by doing as suggested here, but debugging still doesn't work. Still getting error even with hermes on false and flipper disabled: Did you do any other command apart from the disabling of hermes and pod install again? I also see that my project's /* [CP] Embed Pods Frameworks */ task is being deleted from the project.pbxproj after disabling hermes, is this normal? I am also using react-native-firebase, so I cannot use Flipper. This is making it impossible to debug the iOS app on Mac. :( |
Still seeing this as of Tried generating a bundle with a sourcemap by adding the The whole build command I used is this |
I'm experiencing the same issue with react-native:0.71.12 on IOS. Subscribing... |
|
temporary solution in android/app/build.gradle file in dependencies |
This works for me: https://github.com/gusgard/react-native-devsettings |
[@jkoutavas]) thanks.. I will try |
Sorry, Im using MKKV so this library didnt work for me |
Any updates? |
Do you mean this? https://github.com/mrousavy/react-native-mmkv If so, why doesn't it work? |
Same issue here in React Native: |
same issue in 0.72.6 |
Same issue with 0.72.7... Unable to have breakpoint working on Flipper with a new project on iOS. |
@jkoutavas Failed to create a new MMKV instance: React Native is not running on-device. MMKV can only be used when synchronous method invocations (JSI) are possible. If you are using a remote debugger (e.g. Chrome), switch to an on-device debugger (e.g. Flipper) instead. |
I have a little same question.I found my breakpoints will not work when I press "R" to refresh my page. |
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. |
1 similar comment
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. |
This issue was closed because it has been stalled for 7 days with no activity. |
Same issue. |
I think I found a temporary solution by using a lower version of the Chrome browser for debugging. After my test, the browser version 80.0.3987.149 can be debugged. You can download it at this link,google-chrome-old-version |
I am currently using React Native 0.73.4, Android device, I tried several ways, and finally found the following differences
|
For users who use the iOS simulator, the feasible method is:
localhost 192.168.31.3 In this way, your simulator can still use localhost to pull RN's js files, but it will be pointed to the local server of your computer. |
Description
I'm unable to debug a new React Native app that's using Hermes by following the Hermes debugging instructions found here: https://reactnative.dev/docs/hermes#debugging-js-on-hermes-using-google-chromes-devtools
Upon following those steps and opening the console in the stand alone Chrome DevTools, I see this error:
Nothing shows up in the
Sources
tab. Navigating to that URL outside of the dev tools does load the source map file successfully.I am able to debug successfully using Flipper - source maps seem to load fine there.
Version
0.71.0-rc.3
Output of
npx react-native info
Steps to reproduce
npx react-native init RN0710RC3 --version 0.71.0-rc.3
cd
in to project directory. Run usingyarn ios
oryarn android
Snack, code example, screenshot, or link to a repository
No code example since it's reproducible using a new RN 70 or 71 project:
npx react-native init RN0710RC3 --version 0.71.0-rc.3
The text was updated successfully, but these errors were encountered: