Skip to content Skip to sidebar Skip to footer

Could Not Resolve Url "https://pub.dartlang.org". Error (69): Unable To 'pub Upgrade' Flutter Tool. Retrying In Five Seconds... (9 Tries Left)

Could not resolve URL 'https://pub.dartlang.org'. Error (69): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left) that is the error in flutter when i c

Solution 1:

What didn't work for me:-

flutter clean

flutter pub cache repair

And what WORKED!

killall-9dart//THIS STOPPED THE CONTINUE REQUEST

After changing the Wifi/Internet Connection, it worked strangely!

It seems some DNS cache issue (not 100% sure), but I am happy that it worked :)

Solution 2:

This would also mean that flutter might not be able to connect to your device if you're trying flutter run onto an Android device.

The solution for this would be to change the DNS address of your network to 8.8.8.8(Google's DNS) or any other address:

MacOSX:

  1. Open "System Preferences"

  2. Click on "Network"

  3. Select the network which your computer is connected and click on "Advanced"

  4. Select "DNS", Select the "+" button, type "8.8.8.8" (Google's DNS) or if you prefer OpenDNS, "208.67.222.222"

  5. Select "Ok" and "Apply"

Windows & Linux: https://developers.google.com/speed/public-dns/docs/using

After this reopen the terminal and try again.

Solution 3:

I had run into this problem earlier today! The thing I discovered was my wifi wasn't working properly and my laptop went to airplane mode. I would suggest to check the network connection is working or not at that very moment. And things are more easy to solve than it seems, so chill and keep finding answer with a cool head. Don't be like me and waste 2 hours of development time. Peace.

Solution 4:

Try to see if you can reach https://pub.dev/ in your browser

If it is accessible, declare PUB_HOSTED_URL as a system environment variable and give it the value https://pub.dev/

Then exit and reopen your cmd window and try again.

Occasionally, I switch ISP or use a VPN to connect cause I found out that I can't connect when I use a particular network.

Post a Comment for "Could Not Resolve Url "https://pub.dartlang.org". Error (69): Unable To 'pub Upgrade' Flutter Tool. Retrying In Five Seconds... (9 Tries Left)"