react-native-internet-connection-alert icon indicating copy to clipboard operation
react-native-internet-connection-alert copied to clipboard

in IOS it still stuck on top if internet back to online

Open Tanzeel-ur-rehman-git opened this issue 3 years ago • 16 comments

this is my app.js code

 return (
    <SafeAreaProvider>
      <CustomStatusBar backgroundColor="#5CA2E2" />
    <InternetConnectionAlert
      onChange={connectionState => {
        // console.log("Connection State: ", connectionState)
      }}>
        
      <Provider store={store}>
        <NavigationContainer>
          <HomeStackNavigation />
          <Toast />
        </NavigationContainer>
      </Provider>
    </InternetConnectionAlert>
    </SafeAreaProvider>
  );

Dependencies

"react-native-internet-connection-alert": "^0.1.7",
"react-native-dropdownalert": "4.5.1",
@react-native-community/netinfo": "8.0.0",

on android above 10 version, it works fine but below 9 it stuck on top even after the internet is back to online

Tanzeel-ur-rehman-git avatar Mar 21 '22 10:03 Tanzeel-ur-rehman-git

Hello @Tanzeel-ur-rehman-git, Thank you for reporting this. I will take a look at it ASAP

WrathChaos avatar Mar 21 '22 11:03 WrathChaos

any update on this?

HarshitMadhav avatar Apr 24 '22 17:04 HarshitMadhav

Facing the same issue in Andoird too!

OmkarArote avatar May 03 '22 06:05 OmkarArote

I'm going to fix it today. Sorry for late fix

WrathChaos avatar May 04 '22 06:05 WrathChaos

Thanks, @WrathChaos !

OmkarArote avatar May 04 '22 06:05 OmkarArote

Any updates @WrathChaos ?

OmkarArote avatar May 06 '22 05:05 OmkarArote

Hello @OmkarArote , @HarshitMadhav , @Tanzeel-ur-rehman-git

I've updated the example, also tested it seems work with real devices.

Actually, all you need to do is upgrade the

"@react-native-community/netinfo": "^8.3.0",
"react-native-dropdownalert": "4.5.1"

dependencies. Can you also test it with me?

WrathChaos avatar May 06 '22 07:05 WrathChaos

I released a new version: Version 0.1.8 🍺

Also tested with both iOS and Android real devices. It works on my tests.

Please try to upgrade the peer dependencies and the library itself.

@OmkarArote @HarshitMadhav @Tanzeel-ur-rehman-git

WrathChaos avatar May 06 '22 09:05 WrathChaos

https://user-images.githubusercontent.com/64545577/167271867-b66db1eb-15c4-4f83-9bbd-d09f9a474599.mp4

@WrathChaos I am still facing the same issue The alert is not async with the network change

Dependencies:

"react-native-dropdownalert": "^4.5.1",
"react-native-internet-connection-alert": "^0.1.8",
"@react-native-community/netinfo": "^8.3.0",

My Code:

return (
      <InternetConnectionAlert
        onChange={(connectionState) => {
          console.log("Connection State: ", connectionState);
        }}
      >
        <View style={{ flex: 1 }}>
          <NavigationContainer>
            <GalioProvider theme={argonTheme}>
              <Block flex>
                <Screens />
              </Block>
            </GalioProvider>
          </NavigationContainer>
          <FlashMessage position="top" />
        </View>
      </InternetConnectionAlert>
    );

OmkarArote avatar May 07 '22 21:05 OmkarArote

@OmkarArote Can you test the same with physical device?

WrathChaos avatar May 07 '22 21:05 WrathChaos

@OmkarArote Can you test the same with physical device?

Yea tested it on a physical device too Same issue!

OmkarArote avatar May 08 '22 06:05 OmkarArote

I will look at it @OmkarArote

WrathChaos avatar May 08 '22 09:05 WrathChaos

It could be a problem with the @react-native-community/netinfo package => https://github.com/react-native-netinfo/react-native-netinfo/issues/573

This issue is still open

Thank you for let us know @mariomurrent-softwaresolutions

@OmkarArote Are you using low level react-native version?

WrathChaos avatar Jul 04 '22 06:07 WrathChaos

I don't know if this is the fix. Just added closeAction before alert image Need more testing

Hamfer avatar Jul 28 '22 04:07 Hamfer

I don't know if this is the fix. Just added closeAction before alert image Need more testing

Unfortunately, this is not an issue for dropdown alert library. This is an issue because of this: https://github.com/react-native-netinfo/react-native-netinfo/issues/573

WrathChaos avatar Jul 28 '22 13:07 WrathChaos