Skip to content

[Bug]: When you connect to wifi and turn on vpn #2677

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

Closed
8 tasks done
alirezabashi98 opened this issue Mar 12, 2024 · 4 comments
Closed
8 tasks done

[Bug]: When you connect to wifi and turn on vpn #2677

alirezabashi98 opened this issue Mar 12, 2024 · 4 comments
Labels
bug Something isn't working connectivity_plus Connectivity Plus triage

Comments

@alirezabashi98
Copy link

Platform

14

Plugin

connectivity_plus

Version

5.0.2

Flutter SDK

3.19.0

Steps to reproduce

when i am connected to wifi
I enter the program and it says that the connection to wifi is correct
When I turn on vpn and re-apply, it says connect to wifi n when it should say vpn
With mobile internet, this mod works correctly

Code Sample

class _SplashScreenState extends State<SplashScreen> {
  String _networkMessage = '';

  @override
  void initState() {
    _checkedNetwork();
    super.initState();
  }

  Future<void> _checkedNetwork() async {
    final connectivityResult = await (Connectivity().checkConnectivity());

    if (connectivityResult == ConnectivityResult.vpn) {
      setState(() {
        _networkMessage = "vpn";
      });
    }else if (connectivityResult == ConnectivityResult.mobile) {
      setState(() {
        _networkMessage = "mobile network";
      });
    } else if (connectivityResult == ConnectivityResult.wifi) {
      setState(() {
        _networkMessage = "wifi network.";
      });
    } else if (connectivityResult == ConnectivityResult.ethernet) {
      setState(() {
        _networkMessage = "ethernet network.";
      });
    } else if (connectivityResult == ConnectivityResult.bluetooth) {
      setState(() {
        _networkMessage = "bluetooth";
      });
    } else if (connectivityResult == ConnectivityResult.other) {
      setState(() {
        _networkMessage = "mentioned networks.";
      });
    } else if (connectivityResult == ConnectivityResult.none) {
      setState(() {
        _networkMessage = "any network";
      });
    }

    FlutterNativeSplash.remove();
  }

Logs

ConsumerProguardFiles', task ':webview_flutter_android:prepareDebugArtProfile', task ':webview_flutter_android:prepareLintJarForPublish', task ':webview_flutter_android:mergeDebugJavaResource', task
':webview_flutter_android:syncDebugLibJars', task ':webview_flutter_android:bundleDebugAar', task ':webview_flutter_android:mergeDebugResources', task ':webview_flutter_android:compileDebugSources', task ':webview_flutter_android:assembleDebug']
[+60492 ms] Tasks that were excluded: []
[  +10 ms] :app:compileFlutterBuildDebug (Thread[Daemon worker,5,main]) started.
[  +13 ms] > Task :app:compileFlutterBuildDebug
[   +3 ms] Caching disabled for task ':app:compileFlutterBuildDebug' because:
[   +1 ms]   Build cache is disabled
[   +1 ms] Task ':app:compileFlutterBuildDebug' is not up-to-date because:
[   +2 ms]   Value of input property 'dartDefines' has changed for task ':app:compileFlutterBuildDebug'
[   +3 ms]   Value of input property 'verbose' has changed for task ':app:compileFlutterBuildDebug'
[   +6 ms] Starting process 'command 'D:\flutter\bin\flutter.bat''. Working directory: D:\IdeaProjects\myzarinpal-flutterv4 Command: D:\flutter\bin\flutter.bat --verbose assemble --no-version-check --depfile
D:\IdeaProjects\myzarinpal-flutterv4\build\app\intermediates\flutter\debug/flutter_build.d --output D:\IdeaProjects\myzarinpal-flutterv4\build\app\intermediates\flutter\debug -dTargetFile=D:\IdeaProjects\myzarinpal-flutterv4\lib\main.dart
-dTargetPlatform=android -dBuildMode=debug -dTrackWidgetCreation=true
--DartDefines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8wNDgxN2M5OWM5ZmQ0OTU2ZjI3NTA1MjA0ZjdlMzQ0MzM1ODEwYWVkLw== -dFlavor= -dAndroidArchs=android-arm64 -dMinSdkVersion=21 
-dIsAndroidLibrary=false debug_android_application
[  +36 ms] Successfully started process 'command 'D:\flutter\bin\flutter.bat''
[   +1 ms] [ +969 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +2 ms] [   +3 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] [   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] [   +4 ms] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +8 ms] [   +9 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +9 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[  +11 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[  +21 ms] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[  +23 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[  +49 ms] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[  +34 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +78 ms] [+1699 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[  +27 ms] [  +56 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +2 ms] [  +31 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[  +34 ms] [   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[  +27 ms] [   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +6 ms] [   +1 ms] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +3 ms] [   +1 ms] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[   +1 ms] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[  +66 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [   +2 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +8 ms] [   +3 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[  +16 ms] [   +8 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +2 ms] [   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [   +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [   +8 ms] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [   +6 ms] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [   +5 ms] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[  +10 ms] [  +10 ms] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[  +17 ms] [   +2 ms] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [   +1 ms] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [   +1 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[   +1 ms] [ +877 ms] Initializing file store
[        ] [ +273 ms] Done initializing file store
[   +2 ms] [+1074 ms] native_assets: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: D:\IdeaProjects\myzarinpal-flutterv4\.dart_tool\package_config_subset}
[        ] [  +99 ms] Skipping target: gen_localizations
[        ] [  +14 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: D:\IdeaProjects\myzarinpal-flutterv4\.dart_tool\package_config_subset}
[        ] [ +710 ms] Found plugin app_links at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\app_links-3.5.0\
[        ] [ +991 ms] Found plugin connectivity_plus at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\connectivity_plus-5.0.2\
[   +2 ms] [  +91 ms] Found plugin device_info_plus at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\device_info_plus-9.1.2\
[        ] [  +73 ms] Found plugin file_picker at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\file_picker-5.5.0\
[        ] [  +27 ms] Found plugin file_selector_linux at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\file_selector_linux-0.9.2+1\
[        ] [  +10 ms] Found plugin file_selector_macos at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\file_selector_macos-0.9.3+3\
[  +20 ms] [  +16 ms] Found plugin file_selector_windows at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\file_selector_windows-0.9.3+1\
[   +8 ms] [   +6 ms] Found plugin firebase_auth at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_auth-4.17.4\
[        ] [  +14 ms] Found plugin firebase_auth_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_auth_web-5.9.4\
[        ] [  +38 ms] Found plugin firebase_core at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_core-2.25.4\
[  +95 ms] [  +18 ms] Found plugin firebase_core_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_core_web-2.11.4\
[  +18 ms] [   +8 ms] Found plugin firebase_database at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_database-10.4.5\
[   +9 ms] [  +18 ms] Found plugin firebase_database_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_database_web-0.2.3+21\
[  +17 ms] [   +6 ms] Found plugin firebase_messaging at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_messaging-14.7.15\
[   +5 ms] [  +26 ms] Found plugin firebase_messaging_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_messaging_web-3.6.4\
[   +3 ms] [  +32 ms] Found plugin flutter_downloader at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_downloader-1.11.6\
[  +21 ms] [  +73 ms] Found plugin flutter_local_notifications at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_local_notifications-16.3.2\
[  +19 ms] [  +22 ms] Found plugin flutter_native_splash at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_native_splash-2.3.1\
[   +2 ms] [   +6 ms] Found plugin flutter_plugin_android_lifecycle at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_plugin_android_lifecycle-2.0.17\
[   +3 ms] [  +66 ms] Found plugin google_sign_in at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\google_sign_in-6.2.1\
[   +5 ms] [   +8 ms] Found plugin google_sign_in_android at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\google_sign_in_android-6.1.21\
[   +1 ms] [   +4 ms] Found plugin google_sign_in_ios at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\google_sign_in_ios-5.7.4\
[   +5 ms] [  +21 ms] Found plugin google_sign_in_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\google_sign_in_web-0.12.3+2\
[   +1 ms] [  +65 ms] Found plugin gtk at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\gtk-2.1.0\
[   +4 ms] [  +44 ms] Found plugin image_gallery_saver at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_gallery_saver-2.0.3\
[   +2 ms] [   +4 ms] Found plugin image_picker at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker-1.0.7\
[   +8 ms] [   +3 ms] Found plugin image_picker_android at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_android-0.8.9+3\
[  +27 ms] [   +6 ms] Found plugin image_picker_for_web at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_for_web-3.0.2\
[  +21 ms] [   +3 ms] Found plugin image_picker_ios at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_ios-0.8.9+1\
[   +2 ms] [  +23 ms] Found plugin image_picker_linux at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_linux-0.2.1+1\
[   +5 ms] [  +14 ms] Found plugin image_picker_macos at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_macos-0.2.1+1\
[   +1 ms] [  +10 ms] Found plugin image_picker_windows at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\image_picker_windows-0.2.1+1\
[   +1 ms] [  +98 ms] Found plugin open_file at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\open_file-3.3.2\
[   +2 ms] [  +18 ms] Found plugin package_info_plus at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\package_info_plus-4.2.0\
[   +3 ms] [  +23 ms] Found plugin path_provider at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider-2.1.2\
[   +1 ms] [   +6 ms] Found plugin path_provider_android at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_android-2.2.2\
[   +1 ms] [   +4 ms] Found plugin path_provider_foundation at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_foundation-2.3.2\
[   +1 ms] [   +6 ms] Found plugin path_provider_linux at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_linux-2.2.1\
[   +7 ms] [  +11 ms] Found plugin path_provider_windows at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_windows-2.2.1\
[   +5 ms] [  +14 ms] Found plugin permission_handler at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\permission_handler-10.4.5\
[  +51 ms] [   +4 ms] Found plugin permission_handler_android at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\permission_handler_android-10.3.6\
[ +307 ms] [   +6 ms] Found plugin permission_handler_apple at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\permission_handler_apple-9.1.4\
[  +39 ms] [   +6 ms] Found plugin permission_handler_windows at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\permission_handler_windows-0.1.3\
[  +10 ms] [  +90 ms] Found plugin sentry_flutter at C:\Users\AlirezaBashi\AppData\Local\Pub\Cache\hosted\pub.dev\sentry_flutter-7.16.1\
[  +12 ms] [  +20 ms] Found plugin share_plus at C:\Users\Alire

Flutter Doctor

C:\Users\AlirezaBashi>flutter doctor -v
[✓] Flutter (Channel stable, 3.19.0, on Microsoft Windows [Version 10.0.19045.4046], locale en-US)
    • Flutter version 3.19.0 on channel stable at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bae5e49bc2 (4 weeks ago), 2024-02-13 17:46:18 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\AlirezaBashi\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\Programs\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✗] Visual Studio - develop Windows apps
    ✗ Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[✓] Android Studio (version 2022.3)
    • Android Studio at D:\Programs\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.2
    • Flutter plugin version 78.1.1
    • Dart plugin version 233.13135.65

[✓] VS Code (version 1.87.0)
    • VS Code at C:\Users\AlirezaBashi\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.84.0

[✓] Connected device (4 available)
    • SM A536B (mobile) • RZCT40HELFW • android-arm64  • Android 14 (API 34)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.19045.4046]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 122.0.6261.112
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 122.0.2365.80

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 cat

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@alirezabashi98 alirezabashi98 added bug Something isn't working triage labels Mar 12, 2024
@miquelbeltran
Copy link
Member

This was fixed in #2599 still pending to release.

@alirezabashi98
Copy link
Author

Thank you. When will the new version come?

@miquelbeltran
Copy link
Member

the next release plan is discussed in the pinned issue: #2653

@miquelbeltran miquelbeltran added the connectivity_plus Connectivity Plus label Mar 13, 2024
@miquelbeltran
Copy link
Member

Part of 6.0.1 release

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working connectivity_plus Connectivity Plus triage
Projects
None yet
Development

No branches or pull requests

2 participants