简体   繁体   中英

Bad state: Future already completed in Flutter

I'm getting this error with any flutter command on Big Sur:

Bad state: Future already completed
#0      _AsyncCompleter.complete (dart:async/future_impl.dart:43:31)
#1      _NativeSocket.startConnect.<anonymous closure>.connectNext.<anonymous closure> (dart:io-patch/socket_patch.dart:682:23)
#2      _NativeSocket.issueWriteEvent.issue (dart:io-patch/socket_patch.dart:1102:14)
#3      _NativeSocket.issueWriteEvent (dart:io-patch/socket_patch.dart:1109:12)
#4      _NativeSocket.multiplex (dart:io-patch/socket_patch.dart:1130:11)
#5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (6 tries left)

the only thing I changed was install AdGuard but I completely remove it. Now I can't get rid of this error after trying different methods to fix it.

I also have Bitdefender but don't think this is related because I had this install since very beginning (also this is a requirement from my company and I cannot modify anything here)

Approach 1:

Try using flutter config --no-analytics . It should be working fine.

Refrence .

Approach 2:

If you are using third party antivirus programs try to uninstall and reinstall the program or deactivate the option "Scan secure connection" on Web Shield (Core Shields)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM