Error in Network Resources section of flutter doctor

6.4k Views Asked by At

Got the following result when I ran flutter doctor:

Network resources
    X A cryptographic error occurred while checking "https://pub.dev/": Handshake error in client
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
    X A cryptographic error occurred while checking "https://storage.googleapis.com/": Handshake error in client You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
      installed on your computer.
    X A cryptographic error occurred while checking "https://maven.google.com/": Handshake error in client You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.

When I tried to run flutter doctor (as I was getting some errors loading network image in an app) I ran into some issues in network resources part .

5

There are 5 best solutions below

2
ItzDavi On

This is the only valid thing I found.

Quoting from the link above:

first i deleted flutter folder and unzip the below download link to C:/Dev/flutter https://storage.googleapis.com/flutter_infra/releases/beta/windows/flutter_windows_v0.8.2-beta.zip and in environment variables in path i Added new path C:/Dev/flutter/bin and run flutter doctor in git command so it's working now

I would try also a complete scan for malwares in your computer.

Check the link, scan your computer and let me know if this solved your problem.

1
Bassel Sarraj On

Finally, I found the solution it's so easy; you need only turn off Windows Defender and you are done

0
Lameche Houssem On

just disable SMADAV and Windows Defender work for me

0
PurpleCode On

The Network resources: warnings on your Flutter doctor is likely because of an external anti-virus is activated upon entering the flutter doctor prompt. In my case however, is simply turning off my Avast Anti-virus which solves the problematic warning.

0
Swayamshree Mohanty On

flutter upgrade works for me. I got this solution from the ChatGPT. link: https://chat.openai.com/share/35218456-09b9-4a50-b71c-1cd84eb7e708

Here is my terminal log:

> ! Doctor found issues in 3 categories. PS C:\Users\Swayamshree>
> flutter doctor Doctor summary (to see all details, run flutter doctor
> -v): [✓] Flutter (Channel stable, 3.16.3, on Microsoft Windows [Version 10.0.22621.2861], locale en-US) [✓] Windows Version
> (Installed version of Windows is version 10 or higher) [✓] Android
> toolchain - develop for Android devices (Android SDK version 34.0.0)
> [✗] Chrome - develop for the web (Cannot find Chrome executable at
> .\Google\Chrome\Application\chrome.exe)
>     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✗] 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
> 2023.1) [✓] VS Code (version 1.85.0) [✓] Connected device (2 available) [!] Network resources
>     ✗ A cryptographic error occurred while checking "https://pub.dev/": Handshake error in client
>       You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
>       installed on your computer.
>     ✗ A cryptographic error occurred while checking "https://storage.googleapis.com/": Handshake error in client
>       You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
>       installed on your computer.
>     ✗ A cryptographic error occurred while checking "https://maven.google.com/": Handshake error in client
>       You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware
>       installed on your computer.
> 
> ! Doctor found issues in 3 categories. PS C:\Users\Swayamshree>
> flutter pub cache clean This will remove everything inside
> C:\Users\Swayamshree\AppData\Local\Pub\Cache. You will have to run
> `flutter pub get` again in each project. Are you sure? (y/N)? y
> Removing pub cache directory
> C:\Users\Swayamshree\AppData\Local\Pub\Cache. PS C:\Users\Swayamshree>
> flutter doctor PS C:\Users\Swayamshree> flutter doctor PS
> C:\Users\Swayamshree> flutter upgrade Upgrading Flutter to 3.16.5 from
> 3.16.3 in C:\flutter... Checking Dart SDK version... Downloading Dart SDK from Flutter engine 3f3e560236539b7e2702f5ac790b2a4691b32d49...
> Expanding downloaded archive with PowerShell... Building flutter
> tool... Running pub upgrade... Resolving dependencies... Got
> dependencies.
> 
> Upgrading engine... Downloading android-arm-profile/windows-x64
> tools...             1,079ms Downloading
> android-arm-release/windows-x64 tools...               772ms
> Downloading android-arm64-profile/windows-x64 tools...            
> 793ms Downloading android-arm64-release/windows-x64 tools...          
> 760ms Downloading android-x64-profile/windows-x64 tools...            
> 848ms Downloading android-x64-release/windows-x64 tools...            
> 737ms Downloading android-x86 tools...                                
> 4.2s Downloading android-x64 tools...                                    4.1s Downloading android-arm tools...                                    3.6s Downloading android-arm-profile tools...                         1,190ms Downloading android-arm-release tools...                      
> 498ms Downloading android-arm64 tools...                              
> 19.3s Downloading android-arm64-profile tools...                       1,050ms Downloading android-arm64-release tools...                    
> 809ms Downloading android-x64-profile tools...                        
> 1,338ms Downloading android-x64-release tools...                      
> 701ms Downloading android-x86-jit-release tools...                    
> 1,643ms Downloading Web SDK...                                        
> 11.4s Downloading package sky_engine...                                  208ms Downloading flutter_patched_sdk tools...                        
> 421ms Downloading flutter_patched_sdk_product tools...                
> 545ms Downloading windows-x64 tools...                                
> 8.9s Downloading windows-x64-debug/windows-x64-flutter tools...         14.4s Downloading windows-x64/flutter-cpp-client-wrapper tools...        311ms Downloading windows-x64-profile/windows-x64-flutter tools...    
> 13.1s Downloading windows-x64-release/windows-x64-flutter tools...        12.2s Downloading windows-x64/font-subset tools...                       451ms
> 
> Flutter 3.16.5 • channel stable •
> https://github.com/flutter/flutter.git Framework • revision 78666c8dc5
> (11 days ago) • 2023-12-19 16:14:14 -0800 Engine • revision 3f3e560236
> Tools • Dart 3.2.3 • DevTools 2.28.4
> 
> Running flutter doctor... Doctor summary (to see all details, run
> flutter doctor -v): [✓] Flutter (Channel stable, 3.16.5, on Microsoft
> Windows [Version 10.0.22621.2861], locale en-US) [✓] Windows Version
> (Installed version of Windows is version 10 or higher) [✓] Android
> toolchain - develop for Android devices (Android SDK version 34.0.0)
> [✗] Chrome - develop for the web (Cannot find Chrome executable at
> .\Google\Chrome\Application\chrome.exe)
>     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✗] 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
> 2023.1) [✓] VS Code (version 1.85.0) [✓] Connected device (2 available) [✓] Network resources
> 
> ! Doctor found issues in 2 categories. PS C:\Users\Swayamshree>
> flutter doctor Doctor summary (to see all details, run flutter doctor
> -v): [✓] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.22621.2861], locale en-US) [✓] Windows Version
> (Installed version of Windows is version 10 or higher) [✓] Android
> toolchain - develop for Android devices (Android SDK version 34.0.0)
> [✗] Chrome - develop for the web (Cannot find Chrome executable at
> .\Google\Chrome\Application\chrome.exe)
>     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✗] 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
> 2023.1) [✓] VS Code (version 1.85.0) [✓] Connected device (2 available) [✓] Network resources
> 
> ! Doctor found issues in 2 categories.