-
-
Notifications
You must be signed in to change notification settings - Fork 996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkConnectivity always return none on iOS 15.4 #852
Comments
getting the same issue, please have you gotten any fix ? |
same issue, new version of simulator respond none to |
any update? |
I'm seeing it on iOS 15.5 (physical device). |
Simulator 15.4 and real iPhone 15.1 return 'none' sometimes, not every time. Very frustrating. |
I have the same issue. I am using |
this issue persist. |
Having the same issue...... |
Any news? This issue prevents us from using the plugin in production. |
when listing for "onConnectivityChanged", it gives following 2 result, even though we are connected to WIFI ConnectivityResult.none This triggers when we start the app ( even though we didnt change the connectivity ). But when I checked the old plugin ( connectivity: ^3.0.6 ), the "onConnectivityChanged" is not trigger when the app started and it only triggers when we switch the connectivity |
When the wifi and mobile data are OFF, and then mobile data is turned ON the onConnectivityChanged will be called multiple times. It seems that it is called before there is an actual mobile connection since I try to ping a server every time when the onConnectivityChanged is called to check for a real internet connection, and it throws an error. A really ugly workaround is to debaunce onConnectivityChanged for 1 second, to avoid those quick false changes.
|
This is what I settled on for onPressed of my Login button (based on the suggestion of @doriansabo ) try {
isProcessing(true);
final connectivityStatus = await Connectivity().checkConnectivity();
debugPrint(connectivityStatus.name);
if (connectivityStatus == ConnectivityResult.none) {
// This logic for checking connectivity status once again after a 5
// milliseconds delay is required for iOS devices because of:
// https://github.com/fluttercommunity/plus_plugins/issues/852
// https://github.com/fluttercommunity/plus_plugins/issues/858
// TODO: Revert back to previous logic once these tickets are closed
await Future.delayed(const Duration(microseconds: 5));
// Delay of 1 microsecond yielded inconsistent result when we tap the
// login button very fast (right after logging out) and I was too lazy
// to test for 2, 3, and 4 microsecond
final newConnectivityStatus = await Connectivity().checkConnectivity();
debugPrint(newConnectivityStatus.name);
if (newConnectivityStatus == ConnectivityResult.none) {
isProcessing(false);
showSnackBar(
message: "Please connect to Internet before trying to Login",
type: SnackBarTypes.Error,
);
return;
}
}
... |
The issue persists, any fix??? |
Unfortunately no updates yet! |
same problem with version |
the issue still happening |
The issue still here, iOS 15.1, the plugin is very unreliable on iOS, we need fix. |
To workaround the issue, you can add an empty |
Any updates in this topic? |
same issue! |
on |
make class
And initialize in
and, call
|
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days |
Looks like this ticket is getting stale. Ahh, here is a comment to prevent it from auto-closing in 15 days. |
It's really annoying that it closes automatically. They say that it's not ideal to comment on an issue with comments like: "same problem here", but if we don't comment and/or move it, the issue is automatically closed. Maybe I'm generalizing too much, but this is an example. |
same here? Is there any solution? |
Same issue here? any solution or any alternate package. |
Same here! Did we find a solution yet? for me Its on MacOS Ventura 13.0.1 (22A400) |
iOS 15.8 Connection 2: received failure notification |
iPhone 15 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hey all, there is a PR in progress here: #2599 with changes related on how connectivity type is returned by the plugins. |
System info
Platform the Issue occurs on: iOS 15.4 (Simulator)
Plugin name:
connectivity_plus
Plugin version:
^2.3.0
Steps to Reproduce
await (Connectivity().checkConnectivity())
ConnectivityResult.none
Flutter doctor output
The text was updated successfully, but these errors were encountered: