Reputation: 740
It's really frustrating, wasted 3 days to get rid of but still on stuck problem showing on macos catalina version 10.15.1 and windows 7 also. My two PC's showing same error. First when i tried to 'get packages'
it's showing this '/Users/mamun/Developer/flutter/bin/flutter --no-color packages get Waiting for another flutter command to release the startup lock...'
after few moments it's showing..
'/Users/mamun/Developer/flutter/bin/flutter --no-color packages get
Running "flutter pub get" in flutterx...
Connection terminated during handshake
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Connection terminated during handshake
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...,
tried this Waiting for another flutter command to release the startup lock
& https://github.com/dart-lang/pub/issues/1729 also.
Upvotes: 16
Views: 39503
Reputation: 1040
Recently, I came to China and I face this problem a lot. Here I must use VPN at all. I tried various methods. The thing I realized is that the issue is mainly found when I use a broadband connection. I can recover it when I use a hotspot internet(with vpn/without vpn).
Upvotes: 0
Reputation: 11249
In my case I had created a different port to use for release mode, but forgot to make a forward rule for the routeur. (thankfully quickly realized my oversight).
Go to your routeur by typing the address 192.168.1.1 in your local browser then enter your routeur password.
Once done go to Advanced -> Security & Firewall -> Port Forwarding -> Add new rule:
Protocol: TCP
Schedule: Always
Original port: the port you are using, like 3000
Forward port: same port as above
Forward address: local address of your server: 192.168.1.x
Upvotes: 0
Reputation: 239
this error might not be from your flutter app. Test the url or endpoint on postman. The server may not be reachable. you can test with curl, paste this on your terminal.
curl -v http://localhost:8082/spring-rest/foos/9
replace the url with the url request that fails.
Upvotes: 0
Reputation: 491
Turn on and Off your emulator connection, it will fix it,
Upvotes: 1
Reputation: 1346
I was using Hotspot VPN when I faced this issue. Disabling the hotspot worked for me. You can check by disabling any HotSpot or VPN.
Upvotes: -1
Reputation: 1
Download the stable version instead of the clone via git:
C:\src>git clone https://github.com/flutter/flutter.git -b stable)
Upvotes: -2
Reputation: 3349
Use VPN. Or download package from github.
dependencies:
flutter:
sdk: flutter
carousel_pro:
git:
url: https://github.com/jlouage/flutter-carousel-pro.git
ref: master
detailed answer is here:
Upvotes: 0
Reputation: 3349
Use vpn. If you are not using not prepackaged packages: stop the process with "ctrl + c" and try it on project location:
flutter pub get --offline
Upvotes: 0
Reputation: 1301
This is a country-specific problem. In some countries, you got this error like Bangladesh and some African countries. I got a solution to this problem, that is use VPN software when you want to get Packages. VPN software uses other country's IP addresses where this google service works perfectly, So you can easily download packages.
Upvotes: 21
Reputation: 740
Fixed the issue, my Local Isp blocked pub.dartlang.org that's why it happens.
Upvotes: 0