react-native-network-info: TypeError: undefined is not an object (evaluating 'RNNetworkInfo.getSSID')

Hello!

I’m trying to use this library on an Android smartphone (not emulator) and I can’t really get any information from it. I believe all the setup has been done right, so it should be working.

What happens is that when I try to use any NetworkInfo methods it always says:

TypeError: undefined is not an object (evaluating 'RNNetworkInfo.getSSID')

This error is located at:
    in App (at registerRootComponent.js:34)
    in RootErrorBoundary (at registerRootComponent.js:33)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:113)
    in View (at AppContainer.js:102)
    in RCTView (at View.js:113)
    in View (at AppContainer.js:122)
    in AppContainer (at renderApplication.js:34)
- node_modules/react-native-network-info/NetworkInfo.js:8:18 in getSSID
* App.js:21:24 in render

I’m not sure what can be wrong with this… This is a clear installation with create-react-native-app and after react-native eject. Also worth noting that I’m using Expo within the project…

Any tips on what’s happening? If you need more info, just let me know exactly what info.

Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@und0ck3d what version of the library and react native are you using?