-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[0.57] - NetInfo methods fail to resolve or reject #21953
Comments
We have similar issue |
Seem's this is working in 0.57.4 patch. Edit: seems I was wrong... worked a few times but not consistently. Continues to fail in 0.57.5 |
I'm experiencing the same issue in 0.57.7 - I've just had to downgrade to 0.56 to fix. |
Experiencing similar issues with |
Just to add. This is a problem that only occurs in iOS, it's working fine in Android. A snippet like this would never print 'After isConnected':
|
Heads up: we moved react-native-netinfo into its own repository, which should allow for making changes and fixes much faster. Please continue the discussion about this issue there: react-native-netinfo/react-native-netinfo#9 |
Just a note to say that it looks like the cause of this issue is the same as #21862, which is now being tracked at react-native-netinfo/react-native-netinfo#10. Please let me know if they are not the same root cause by opening an issue with an updated reproducible demo on the new community repo. |
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 1.94 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.0.0 - /usr/local/bin/node
Yarn: 1.9.2 - ~/.yarn/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.0 => 16.6.0
react-native: 0.57.3 => 0.57.3
Description
NetInfo.getConnectionInfo()
&NetInfo.isConnected.fetch()
fail to resolve or rejectReproducible Demo
Able to reproduce this in the simplest of scenarios running on an iOS simulator in debug js mode (android untested)
NetInfo.getConnectionInfo().then(console.log).catch(console.log)
<- neither log occursThe text was updated successfully, but these errors were encountered: