Ed of the Mountain
Ed of the Mountain

Reputation: 5459

react-native Chrome debug from device is broken? ( Runtime not ready for debugging )

Can anyone suggest things to check for that break Chrome debug on a device? Chrome debug works fine debugging an iOS simulator.

Chrome debug of iOS devices had been working fine for over a month until it stopped working a week or so ago.

I have spent days trying to get Chrome debug working again. I even started all over, with a new "AwesomeProject". No luck.

Does Chrome Debug URL stay same for debugging both device and simulators?

enter image description here

Using OS X 10.11.3, Xcode 7.3, iOS 9.3, and react-native 0.22

File: AppDelegate.m

  jsCodeLocation = [NSURL URLWithString:@"http://173.17.29.213:8081/index.ios.bundle?platform=ios&dev=true"];

Xcode debug console displays:

2016-03-31 08:02:12.286 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging.
 - Make sure Packager server is running.
- Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again.
2016-03-31 08:02:12.319 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2016-03-31 08:02:12.513 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running.
2016-03-31 08:02:36.032 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2016-03-31 08:02:36.032 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging.
 - Make sure Packager server is running.
- Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again.
2016-03-31 08:02:36.707 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running.

File: package.json

{
  "name": "AwesomeProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "react": "^0.14.8",
    "react-native": "^0.22.2"
  }
}

Upvotes: 7

Views: 5383

Answers (1)

Andres Narvaez
Andres Narvaez

Reputation: 526

You're close, one more step and works for me at the moment after facing exact situation:

"To debug on a real device:

On iOS - open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging. [1]"

[1] https://facebook.github.io/react-native/docs/debugging.html

Upvotes: 15

Related Questions