Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

273

I fixed that by:

  1. Ctrl+C to stop infinite error loop.
  2. Kill the Dart process in Windows Task Manager.
  3. Delete the cache folder located in flutter/bin directory.
  4. Run in command line flutter pub cache repair.
  5. Run flutter doctor
Share:
273
G H Prakash
Author by

G H Prakash

🎯 Learn, Contribute and Grow

Updated on January 03, 2023

Comments

  • G H Prakash
    G H Prakash over 1 year

    I am trying for flutter doctor and the following error was shown

    Running pub upgrade...
    The system cannot find the path specified.
    Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
    
    Waiting for 2 seconds, press CTRL+C to quit ...
    Terminate batch job (Y/N)?
    

    enter image description here

    the above initializing was shown for 4 hours. What may be the issue? Can anyone please help with this

    • Ravindra S. Patil
      Ravindra S. Patil over 2 years
      which OS you used Mac or Windows?
    • G H Prakash
      G H Prakash over 2 years
      windows 10. Can you please help me with this
    • Hardik Mehta
      Hardik Mehta over 2 years
    • Abhijith
      Abhijith over 2 years
      download latest version from flutter.dev and extract it somewhere and and use that path in your project and and do it globaly by updating new path in environment variable setting.also make sure you have stable connection when upgrading or updating packages
    • G H Prakash
      G H Prakash over 2 years
      Any body please..
  • G H Prakash
    G H Prakash over 2 years
    there is no Dart process in task manager
  • G H Prakash
    G H Prakash over 2 years
    No use. anyways thanks for the reply