RNCNetInfo.getCurrentState got 2 arguments, expected 3 after updating to Expo SDK 37
See original GitHub issue🐛 Bug Report
Environment
Expo CLI 3.17.11 environment info:
System:
OS: macOS 10.15.3
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
Yarn: 1.22.0 - ~/.yarn/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.0 => 37.0.3
react: 16.9.0 => 16.9.0
react-native: 0.61.4 => 0.61.4
react-navigation: ^4.3.6 => 4.3.6
npmGlobalPackages:
expo-cli: 3.17.11
iOS and Android
Steps to Reproduce
I just updated my app to Expo SDK 37.
Actual Behavior
It shows a red error saying RNCNetInfo.getCurrentState got 2 arguments, expected 3. I searched for this error on google and found out this on netInfo Github issues page: https://github.com/react-native-community/react-native-netinfo/issues/297. The thing is, that there, the error is the opposite, get 3 arguments and expected 3.
I don’t know how, but after I did expo install @react-native-community/net-info it worked and I was able to fix other things, but now is back to the same error.
EDIT: On iOS when I try to open the app via Expo Client, it just crashes, no error nothing. This error shows only on Android
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
RNCNETINFO;getCurrentState got 3 arguments, expected 2
Hi, I searched some solutions but here is nothing for the moment or only few results without answer. There is my code and...
Read more >RNCNetinfo.getCurrentState got 3 arguments, expected 2
My RN version is 0.62.2. When I'm trying to implement react-native-jitsi-meet library, I'm getting this error message RNCNetinfo.
Read more >React Native Issue rncnetinfo.getcurrentstate got 2 arguments ...
Update your “netinfo” community library version to “5.5.0”, sometimes newer version getting “getcurrentstate” issue.
Read more >react-native-offline - Bountysource
I have to dismiss all the queue when I logout and reput these actions when I login (actions stored somewhere else and depending...
Read more >rgommezz/react-native-offline (Raised $1,815.00) - Issuehunt
Unable to resolve module after updating to 5.2.0. Unfunded#238created byyasir-netlinks. $0.00. Error : RNCNetinfo.getCurrentState got 2 arrguments expected ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just figured it out this is actually a
@bugsnag/expobug. I asked them to bump the@react-native-community/netinfoversion.As per @rafmst comment check your modules for explicit dependencies. Mine was aws-appsync see here: https://github.com/aws-amplify/amplify-js/issues/5359