1

When I had previously setup flutter, all was working well, however, now all of the flutter commands are resulting in this error:

Error: Error when reading '../../../../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (1 tries left) Command 'pub upgrade' still failed after 10 tries, giving up.```

How do I solve this?

3
  • connect your computer to the Internet - seems it tries to upgrade your flutter installation Commented Jan 10, 2020 at 17:28
  • It is connected to the internet and I've tried it several times. Is there anything else I can try? @pskink Commented Jan 10, 2020 at 17:31
  • hmmm, If London is not in China behind the Great Firewall, then I have no idea... Commented Jan 10, 2020 at 17:33

1 Answer 1

1

Looks like something went wrong while downloading the dart sdk. Can you delete the cache folder inside bin and then run flutter doctor again? What's the output?

Are you by any chance behind a firewall (or using a proxy) that might be blocking the download of the dart sdk?

Sign up to request clarification or add additional context in comments.

1 Comment

I thought it had fixed it but the error returned when I ran flutter pub get. I have also checked that I'm not using any proxies or behind a firewall that could block the sdk download. @masumbillahsanjid

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.