-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Inspector get stuck at "Connecting to React…" #45
Comments
Are you using Android emulator? Maybe it's same with facebook/react-devtools#476 (comment), try the following code on debug mode: requestIdleCallback(() => alert('works!'), { timeout: 1 }) If it doesn't called $ adb shell "date `date +%m%d%H%M%Y.%S`" or reset the Android emulator. |
I'm using a real device |
@someone235 same, but you may not have permission to use It's limitation in debug mode for RN, you need to keep the same device and computer time. (It only warn in more than 60 seconds.) If it still not work and |
|
Looks like it's same problem. :)
It's just If you still have this problem, there is a temporary solution here: // Not recommended
if (__DEV__) {
window.requestIdleCallback = null
window.cancelIdleCallback = null
}
// Make sure it before call at `import { ... } from 'react-native'` Or use external polyfill instead. (Like: react-devtools/agent/Bridge.js#L21-L22) |
It did the trick, thank you |
Android 6.0.1, RN 0.42.0, RN Debugger 0.6.2 I've tried:
I still cannot connect to the React dev tools using a physical device (Waiting for React to connect...). I added a |
@gustavjf if you got Also, I'm try to fix the problem of |
@jhen0409 Thank you, for some reason |
I'm having this issue too with the Android emulator and simply can't resolve it… Time on the emulator and my Mac are equal, adb reverse doesn't change anything, This is the right place, yes?
Edit: Small update: It works fine with the iOS simulator, so this is really only happening on Android. Interesting! |
@strayer are you using RN ^0.43? Due to this change (It's no longer exported function), you need put the code before Also, facebook/react-native#13116 looks ready but have some ship problem, if it goes well it should be at RN 0.45. |
@jhen0409 I'm using 0.43 and I added the code before |
My fault, it should be if (__DEV__) {
const AppState = require('AppState');
const {PlatformConstants} = require('NativeModules');
// Put the code here
const {connectToDevTools} = require('react-devtools-core');
......
}
The |
Fixed in facebook/react-devtools#749, please waiting for the new version of the |
|
I did
adb reverse tcp:8097 tcp:8097
but it doesn't help.The text was updated successfully, but these errors were encountered: