4

After setting up a project following the React Native Quick Start guide, and doing yarn eject, I added Stetho to the project, following the debugging guide.

I added a button in the example app with the following onPress method:

test () {
    fetch('https://google.com')
       .then(() => {alert('ok')}, () => {alert('fail')});
}

When running the app, in Chrome Device Inspector I can see the project "(powered by Stetho)", but in the Network tab there is no request logged, when I press the button.

OS: Fedora (but tried on OSX too)
Device: emulated Pixel with API 26
react-native version: 0.49
Stetho version: 1.5.0

What am I missing?

Note: I am aware of this hack, but I would like to use Stetho instead, as I do not want to restart Chrome in insecure mode to allow CORS requests.

vekerdyb
  • 1,213
  • 12
  • 26
  • I have the same problem after update react-native from 0.44 to 0.49 chrome://inspect tab works with RN 0.44 but stop working after update to RN 0.49 and change Stetho impl according to this: https://facebook.github.io/react-native/docs/debugging.html#debugging-with-stetho-http-facebook-github-io-stetho-on-android – sytolk Nov 23 '17 at 13:14
  • Were you able to get it working ? I am not able to see the network calls react-native version 0.55. I did follow the steps in the docs. I am able to see the elements of my app in the inspect but the network calls are not seen. – Saurabh Jul 17 '18 at 07:55

1 Answers1

0

Check this ways:

  1. update chrome in mobile and in windows or mac

  2. use VPN for connect to server google (China, Iran,...)

Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78