-
Notifications
You must be signed in to change notification settings - Fork 393
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
RNCNetInfo.getCurrentState got 3 arguments, expected 2. #297
Comments
i had this issue with Expo SDK 35.0.0, and fixed it by installing version 5.0.0 instead of the latest version: |
👋 This is an issue because Expo seems to include an old version of the native code. Their documentation should say which version of this library is supported. If you are having issues with expo, please open issues on their repo as they wrap this library in their own code (as far as I can tell). |
I tried everything I could after hitting this bug on expo as well, I even tried downgrading to sdk 35 and using an earlier version like @Abdelrahman-Nabil did to no avail. I don't feel like ejecting, so I guess I'm just not using Pusher then 🤷♂️ |
worked for me! |
same here |
I had the same issue. Solved by using NetInfo from react-naitve instead of using community version. Had NetInfo.getConnectionInfo method. Using fetch() showing deprecated warning. |
@azizulhaq800804 we should use community version according to documentation https://reactnative.dev/docs/0.61/netinfo |
React-Native v0.67.4 i was able to resolve this by updating the @react-native-community/netinfo package to the exact version 4.6.0, without the ^, cleaning the build & rebuilding. |
Enviornment info :
System:
OS: Windows 10 10.0.17763
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 1.06 GB / 7.88 GB
Binaries:
Node: 8.16.1 - C:\Program Files\nodejs\node.EXE
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29
Build Tools: 26.0.2, 28.0.3, 29.0.2
System Images: android-24 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548
npmPackages:
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
Facing this problem using expo directory.
import {AppState } from 'react-native';
import NetInfo from '@react-native-community/netinfo';
Using this two library
The text was updated successfully, but these errors were encountered: