the last time when I tried to create a new flutter project, that problem appear to me
The semaphore timeout period has expired.
pub get failed
command: "C:\src\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub --directory packages\flutter_tools get --example"
pub env: {
"FLUTTER_ROOT": "C:\src\flutter",
"PUB_ENVIRONMENT": "flutter_cli:get",
"PUB_CACHE": "C:\Users\ahmed\AppData\Local\Pub\Cache",
}
exit code: 69
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _DefaultPub._runWithStdioInherited (package:flutter_tools/src/dart/pub.dart:468:7)
<asynchronous suspension>
#2 _DefaultPub.get (package:flutter_tools/src/dart/pub.dart:346:5)
<asynchronous suspension>
#3 PubDependencies.update (package:flutter_tools/src/flutter_cache.dart:125:5)
<asynchronous suspension>
#4 Cache.updateAll (package:flutter_tools/src/cache.dart:677:9)
I tried to fix it by deleting cash from flutter-sdk and running flutter pub cache repair on cmd but it didn't work then I delete dart and flutter sdk and download them again and put them paths in system environment and typed flutter doctor and this error still appear to me
I had the same problem and i solved it by running flutter clean , flutter pub upgrade, then flutter pub get
you can solve this running below commands. Not all the time chatgpt gives you rigth answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With