Home > OS >  I'm can't upgrade flutter/dart - I'm getting a failure accessing storage.googleapis.c
I'm can't upgrade flutter/dart - I'm getting a failure accessing storage.googleapis.c

Time:05-24

I'm having a problem upgrading to Flutter 3.0. When I do an upgrade most of the processes runs without a problem, but I keep getting an error upgrading the dart sdk. Here's what I see:

Downloading Darwin arm64 Dart SDK from Flutter engine caaafc5604ee9172293eb84a381be6aadd660317...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 1 seconds. 3 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 2 seconds. 2 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 4 seconds. 1 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0curl: (6) Could not resolve host: storage.googleapis.com
/Users/jai/Dev/Flutter/bin/internal/update_dart_sdk.sh: line 156: return: can only `return' from a function or sourced script
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0
curl: (7) Failed to connect to storage.googleapis.com port 443 after 7330 ms: Bad file descriptor

Failed to retrieve the Dart SDK from: https://storage.googleapis.com/flutter_infra_release/flutter/caaafc5604ee9172293eb84a381be6aadd660317/dart-sdk-darwin-arm64.zip
If you're located in China, please see this page:
  https://flutter.dev/community/china

A couple of points of note:

  1. I see the same result when I try to upgrade dart by itself.
  2. I am not, in fact, in china (I'm in the U.S.)

Any thoughts?

CodePudding user response:

I found the problem - I was being silently blocked by a firewall tool I recently added (which is supposed to report when something is trying to make an external connection rather than block it).

CodePudding user response:

Is the new firewall Lulu? I'm a bit out of context, but these are my two cents: Since you are on MacOS I would suggest managing flutter (and the rest of your software) through homebrew. IF you are already using homebrew, my solution would have been brew reinstall flutter. That way you would know 100% that there is a connection issue and this is not a specific Flutter SDK problem! Also, homebrew would be able to upgrade your flutter version (or any other program) automatically! :) Package managers FTW!

P.S brew will automatically update the ENV variables for you (in most cases)

  • Related