0

how to fix HTTP Host Availability in flutter doctor :


[!] HTTP Host Availability
    X HTTP host "https://cocoapods.org/" is not reachable. Reason: An error occurred while checking the HTTP host:
      Connection terminated during handshake
    X HTTP host "https://maven.google.com/" is not reachable. Reason: An error occurred while checking the HTTP host:
      Connection terminated during handshake
    X HTTP host "https://pub.dev/" is not reachable. Reason: An error occurred while checking the HTTP host: Connection
      terminated during handshake
    X HTTP host "https://cloud.google.com/" is not reachable. Reason: An error occurred while checking the HTTP host:
      Connection terminated during handshake

! Doctor found issues in 1 category.

sorry, i don't know that

Gerhard
  • 22,678
  • 7
  • 27
  • 43

3 Answers3

0

It basically is a checks for connectivity to the resources you need for Flutter Development. You need to check your connection if it is an issue during running flutter doctor.

By doing a little bit of digging we can also find the actual file in flutter code for http host validation: https://github.com/flutter/flutter/blob/eb1a851f5843efb6cecab020467a2ffea48fd1d3/packages/flutter_tools/lib/src/http_host_validator.dart

Risheek Mittal
  • 1,077
  • 2
  • 18
0

check your internet connection, I faced this issue too and gone after I tried with better connection.

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 6.3.9600],
    locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.
0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.3)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.74.1)
[√] Connected device (3 available)
[√] HTTP Host Availability

* No issues found!
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 20 '22 at 13:33
0

Run this command in terminal:

flutter pub cache repair
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
raghav042
  • 679
  • 6
  • 14
  • Your answer could be improved by adding more information on how the proposed solution solves the problem and how it helps the OP. – Tyler2P Mar 11 '23 at 14:12