pusherman / react-native-network-info

React Native library for getting information about the devices network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong subnet on Android using Expo

renato opened this issue · comments

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.