MiderWong / homebrew-flutter

Homebrew formula for Flutter.
BSD 3-Clause "New" or "Revised" License
134 stars 16 forks source link

Install fails when cip.cc is unreachable #2

Closed incidentist closed 5 years ago

incidentist commented 5 years ago

I'm trying to install flutter via homebrew using this tap, but the install fails because the cip.cc url it's trying to reach is not found. This should be wrapped in a try/catch that doesn't stop the install.


>  brew install flutter
==> Installing flutter from miderwong/flutter
==> Cloning https://github.com/flutter/flutter.git
Updating /Users/incidentist/Library/Caches/Homebrew/flutter--git
==> Checking out branch stable
Already on 'stable'
Your branch is up to date with 'origin/stable'.
HEAD is now at 8661d8a Test text paint orders by color (#27983)
Error: An exception occurred within a child process:
  SocketError: Failed to open TCP connection to www.cip.cc:80 (getaddrinfo: nodename nor servname provided, or not known)```
MiderWong commented 5 years ago

Sorry about it. The above error occurs because of a problem with the method of obtaining geographic location through an IP address (obtained by accessing http://www.cip.cc).

Please show the response of the following command:

ping www.cip.cc
incidentist commented 5 years ago
>  ping www.cip.cc
ping: cannot resolve www.cip.cc: Unknown host

I run a PiHole adblocker on my local network, and when I disabled it, the install worked. I verified that cip.cc isn't blacklisted, so I'm not sure what's going on there, but it does seem like the script should minimize the number of servers it absolutely needs to access in order for the install to work.

MiderWong commented 5 years ago

Yes, you're right, but the script still has to consider the geographical differences, I will continue to optimize the script, thank you for your advice.

MiderWong commented 5 years ago

Please show the response of the following command:

curl http://api.db-ip.com/v2/free/self/ipAddress
MiderWong commented 5 years ago

Discarded cip.cc changed to api.db-ip.com