Problems with the connection in some devices
shardaishwak opened this issue · 5 comments
Current Behavior
- What code are you running and what is happening?
I am using the hook for listening to connection changes, but sometimes, on client devices, the connection is given as offline, even though the user is active. I tried changing the host for ping and interval, but the problem persists. The problem persists only on some devices (iOS in particular) - Include a screenshot if it makes sense.
The red bar indicates that the isConnected variable is false, on Wi-Fi and mobile data, even though the user has a connection.
Expected Behavior
- What do you expect should be happening?
The package should register the connection changes without a problem
How to reproduce
- You must provide a way to reproduce the problem.
I can't provide the source code as it is a private project but can share the main code that is used
Here is where all the Provider is initialized, the root of the whole app.
This is how it is being imported into a component.
Here I am using the variable to show the message indicated in the screenshot. - Either re-create the bug on Snack or link to a GitHub repository with code that reproduces the bug.
- Explain how to run the example app and any steps that we need to take to reproduce the issue from the example app.
Your Environment
software | version |
---|---|
react-native-offline | ^6.0.0 |
react-native | 0.64.2 |
node | 14.18.1 |
npm or yarn | yarn = 1.22.4 - npm = 8.1.1 |
NOTE: The problem persists only on some devices of our clients.
@react-native-community/netinfo has fixed the issue with the latest release @6.2.1. Can be update it in this package?
@rgommezz did the update solve the issue?
Aany updated ?, Same problem On Samsung phones, it happens when app is in background for 10 min and then reopen it appers offline
iOS working perfect
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.