title: Bad state: Future already completed in Flutter
body: <p>I'm getting this error with any flutter command on Big Sur:</p>
  <pre><code>Bad state: Future already completed
  #0      _AsyncCompleter.complete (dart:async/future_impl.dart:43:31)
  #1      _NativeSocket.startConnect.&lt;anonymous closure&gt;.connectNext.&lt;anonymous closure&gt; (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)
  </code></pre>
  <p>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.</p>
  <p>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)</p>