pub icon indicating copy to clipboard operation
pub copied to clipboard

If HTTP requests fails without connection suggest --offline

Open jonasfj opened this issue 5 years ago • 3 comments

TODO:

  • [ ] Find out how requests fail if there is no network access.
  • [ ] Suggest in error message that the users tries with --offline, if they don't have an internet access at the moment.

Careful that we don't recommend --offline whenever someone is blocked by proxy or other thing.

Goal: If people are trying to do pub get without internet access, how are they supposed to discover --offline if the error message doesn't inform them? They can't google for an answer..

jonasfj avatar Feb 01 '21 14:02 jonasfj

On macos I get:

 HTTP error:
    SocketException: Failed host lookup: 'pub.dartlang.org' (OS Error: nodename nor servname provided, or not known, errno = 8)

sigurdm avatar Feb 23 '21 11:02 sigurdm

On Windows using git bash I get:

Resolving dependencies...
It looks like pub.dartlang.org is having some trouble.
Pub will wait for a while before trying to connect again.
Git error. Command: `git clone --mirror ...

tusharojha avatar Feb 23 '21 13:02 tusharojha

Still relevant

sigurdm avatar Aug 28 '25 08:08 sigurdm