-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Is this a bug report?
Yes
Have you read the Bugs section of the How to Contribute guide?
Yes
Environment
react-native -V
: 0.46.3node -v
: v6.11.0npm -v
: 3.10.10yarn --version
: not used
Then, specify:
- Target Platform: iOS
- Development Operating System: macOS
- Build tools: using XCode to successfully deploy to an iPhone 7
Steps to Reproduce
(Write your steps here:)
- Deploy a debug build of a react-native app to a real device on WiFi
- Use a remote debugging tool such as Nuclide or react-native-debugger
Expected Behavior
React DevTools should work just as it does when running in the simulator.
Actual Behavior
In the debugger on my computer, the message "Waiting for React to connect..." appears and never goes away.
Instead of communicating to my computer, React DevTools is attempting to communicate via localhost
which is the phone.
The offending line is https://github.com/facebook/react-native/blob/master/Libraries/Core/Devtools/setupDevtools.js#L33
A working replacement for 'localhost'
is require('NativeModules').SourceCode.scriptURL.split('://')[1].split('/')[0].split(':')[0]
, which works on-device and in-simulator, but there is likely a much better solution.
Reproducible Demo
All react-native projects are affected.
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.