Prevent flutter pub get from retrying - flutter

Someone typed a private package url wrongly in pub spec yaml file.
As a result, pub get kept retrying but obviously never succeeded. This has wasted our github action build minutes.
How to prevent pub get from retrying after first failure?
get failed (server unavailable) -- attempting retry 8 in 64 seconds...

Try this
- name: run pub get
run: flutter pub get
timeout-minutes: 2
It should stop trying after 2 minutes

Related

Flutter giving pub get failed (server unavailable)

Got socket error trying to find package watcher at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Got socket error trying to find package watcher at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
Got socket error trying to find package test at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...
Restart your router! Works for me several times.
Make sure your network is not behind a proxy
Make sure you can ping to pub.dev without any packet loss
Try to close all of your dart.exe processes before retying to perform the flutter pub get
Try to delete an existing package from your pubspec.yaml and re-get it to see if it works
Try to manually add the package to your project

hi when i want add package to project recived to error down

===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 431:12 Entrypoint._get
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 265:7 Entrypoint.acquireDependencies
This is an unexpected error. Please run
dart pub --trace get --no-precompile
and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
HTTP error 403: Forbidden
package:pub/src/http.dart 229:5 _ThrowingClient.send
its happening because your network connection is not proper or the server is not allowed to your country, or something wrong with your flutter
here is some ways to fix that problem i know
1-
use a vpn or proxy (its showing cant connect to the server so try to change the IP)
2-
check this link if vpn method is not working - https://dart.dev/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall
3 -
try to upgrade your flutter just by one command
flutter upgrade
4 -
if its not working try to clean by this command
flutter clean
5 -
if anything wont working try to reinstall flutter (not recommended )

Flutter pub get failed (server unavailable) - Hanshake error in client

Every time I run
flutter pub get
on my project, I get the floowing error.
Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:359))
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
The issue came after I formatted my laptop and installed flutter all over again. My internet is fine and fast, I have been using it for a long time to develop apps.
flutter doctor runs well and doesn't return any issue.
What could be the problem?

Unable to get percent_indicator dependency in flutter

I'm trying to use percent_indicator in my flutter project. When I give flutter pub get the following error I'm getting. This occurs only for this dependency. I tried the solution mentioned in the following link
https://github.com/flutter/flutter/issues/46641#issuecomment-631359661
https://stackoverflow.com/a/65785014/9455775
Error I'm getting
Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:354))
pub upgrade failed (server unavailable) -- attempting retry 1 in 1 second...
Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:354))
pub upgrade failed (server unavailable) -- attempting retry 2 in 2 seconds...
.
.
.
.
(Goes on )
But still no use.. Please let me know what went wrong here .
1- try to disable your antivirus | firewall
2- try to use vpn
3- run your cmd promt with anadministrator privileges and try again
restart your IDE before trying again
Created new project and added the dependency. It worked for me

Flutter Connection terminated during handshake

I have been developing Flutter application with Android studio. but all of a sudden I am stuck with a strange issue which i cant solve . I cant run the application in anyway. it just shows:
Running "flutter pub get" in my_payment...
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...
I tried to restart my android studio/pc and the router as well but with no luck.
My flutter doctor reports are all ok
can anybody please help me to sort it out?
Your company/ISP/country blocking pub.dev
Use VPN
VPN - lets you to visit pub.dev with other coutry's IP.