pusherman / react-native-network-info

React Native library for getting information about the devices network
MIT License
356 stars 106 forks source link

Wrong subnet on Android using Expo #113

Closed renato closed 4 years ago

renato commented 4 years ago

Hi,

I'm trying to get the subnet info programmatically but on two Android devices I was able to test they return 255.255.255.255 instead of the correct subnet (255.255.255.0, which is shown correctly on the device's Network details). I haven't found any similar problem reported here or anywhere else.

  const state = await NetInfo.fetch()
  // state.details.subnet is now 255.255.255.255

I've tried on iOS simulator and the right subnet is returned.

I'll probably stop using the Expo managed workflow but I don't know if this may be related.

I may be missing something so any help is appreciated.