9

I have an app, it is very simple and I keep getting this error:

pub get failed (server unavailable) -- attempting retry 1 in 1 second... Because bascis depends on integration_test any from sdk which doesn't exist (could not find package integration_test in the Flutter SDK), version solving failed.

I have tried

Pup upgrade, Pub get.

How can I get rid of this error?

Mohamed AbdelraZek
  • 2,503
  • 4
  • 25
  • 36

4 Answers4

15

I had the same error after changing my channel from master to stable. I was able to fix it by removing (or commenting out) the following library from pubspec.yaml

dev_dependencies:
#  integration_test:
#    sdk: flutter
Texv
  • 1,225
  • 10
  • 14
  • This also helped me when I was installing Flutter (default is stable, I did not know) on Mac OS and building my project there, while previously using Flutter (beta) on Windows – Timotej Leginus Jan 29 '21 at 02:46
2

I experienced this when I was trying to setup a flutter web project without enabling flutter web on my PC. I enabled flutter for web and everything was okay.

emmaakachukwu
  • 515
  • 1
  • 7
  • 16
2

For me had to comment out sdk part like so:

dev_dependencies:
  integration_test:
   # sdk: flutter
Adelina
  • 10,915
  • 1
  • 38
  • 46
1

It is likely due to your network problem. Because the output says (server unavailable).

Ways to debug this:

  1. Try curl https://google.com to see whether your command line can connect to network.
  2. Also try, for example, curl https://flutter.dev (or, try to curl the actual url your pub get is trying to access.

This may due to, for example, your network is broken. Or because you have a broken VPN, broken proxy, etc.

ch271828n
  • 15,854
  • 5
  • 53
  • 88
  • I got this log after running curl next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. – Mohamed AbdelraZek Dec 31 '20 at 12:31
  • curl "https://www.example.com" --ssl-no-revoke -x 127.0.0.1:8081 From https://stackoverflow.com/questions/54938026/curl-unknown-error-0x80092012-the-revocation-function-was-unable-to-check-r and got Failed to connect to 127.0.0.1 port 8081: Connection refused – Mohamed AbdelraZek Dec 31 '20 at 12:35
  • @MohamedAbdelraZek Then sounds like your network has problem. It is not a Flutter problem :) – ch271828n Dec 31 '20 at 13:01