Why You See “HTTP Host Availability” Errors in Flutter Doctor

When you run flutter doctor, Flutter checks if your system can reach important servers like:

  • pub.dev – for Flutter/Dart packages
  • cocoapods.org – for iOS dependency management
  • maven.google.com – for Android libraries
  • cloud.google.com – for SDK updates

If these URLs aren’t reachable, you’ll see errors like:

[!] HTTP Host Availability
    âś— HTTP host "https://pub.dev/" is not reachable. 
    Reason: Connection terminated during handshake

This usually means network restrictions, SSL issues, or proxy/firewall blocks.

How to Fix HTTP Host Availability in Flutter Doctor

1. Check Your Internet Connection

  • Open each URL (e.g. https://pub.dev/, https://cocoapods.org/) in a browser.
  • If they don’t open, the issue is network-level (ISP, firewall, etc.).

2. Fix SSL Handshake Issues

  •  “Connection terminated during handshake” means the SSL/TLS negotiation failed.
  • Update your system’s CA certificates:

macOS:

softwareupdate –all –install –force

  •  Restart your Mac after updates.

  • Windows: Make sure Windows Update is fully installed.

Linux (Debian/Ubuntu):

sudo apt-get update && sudo apt-get install –reinstall ca-certificates

3. Check Firewall / Proxy / VPN

Corporate or school networks often block or filter SSL connections.

If behind a proxy, set Flutter’s proxy settings:

export http_proxy=http://username:password@proxy.server:port
export https_proxy=http://username:password@proxy.server:port
  • (Use PowerShell setx on Windows)
  • Try using a VPN to bypass network restrictions.

4. Manually Test with curl

Run:

curl -I https://pub.dev

If you see SSL errors or timeouts, your machine isn’t reaching the server. This confirms it’s a system/network issue.

5. Check System Time & Date

SSL fails if your system clock is wrong.
Make sure your device time is set to automatic (sync with the internet).

6. macOS Specific – CocoaPods Issue

If only cocoapods.org fails:

sudo gem install cocoapods
pod repo update

This refreshes CocoaPods and fixes outdated SSL settings.

7. Flutter clean

You can also run flutter clean and flutter pub cache repair.

Summary

  • Root cause: SSL handshake failed (outdated certificates, proxy/firewall, or VPN issue).
  • Quick fixes: Update system certificates, check firewall/proxy, or use VPN.
  • Why it matters: If Flutter can’t reach pub.dev, maven.google.com, or cocoapods.org, you can’t fetch packages or dependencies for Android/iOS.

Need Help With Flutter Development?

Work with our skilled Flutter developers to accelerate your project and boost its performance.

Hire Flutter Developers

Support On Demand!

Related Q&A