[tool_crash] NoSuchMethodError: NoSuchMethodError: The method ‘cancel’ was called on null.Receiver: nullTried calling: cancel()

Command

flutter doctor

Steps to Reproduce

Logs

NoSuchMethodError: NoSuchMethodError: The method ‘cancel’ was called on null.
Receiver: null
Tried calling: cancel()

#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      AnsiSpinner.finish (package:flutter_tools/src/base/logger.dart:969:11)
#2      Status.stop (package:flutter_tools/src/base/logger.dart:750:5)
#3      AnsiStatus.stop (package:flutter_tools/src/base/logger.dart:1051:11)
#4      ArtifactUpdater._downloadArchive (package:flutter_tools/src/cache.dart:1506:16)
<asynchronous suspension>
#5      ArtifactUpdater.downloadZipArchive (package:flutter_tools/src/cache.dart:1442:12)
#6      MaterialFonts.updateInner (package:flutter_tools/src/cache.dart:607:28)
#7      CachedArtifact.update (package:flutter_tools/src/cache.dart:573:11)
#8      Cache.updateAll (package:flutter_tools/src/cache.dart:452:24)
#9      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:923:27)
#10     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:831:33)
#11     _rootRunUnary (dart:async/zone.dart:1198:47)
#12     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#13     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#15     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#16     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#17     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#18     _rootRun (dart:async/zone.dart:1190:13)
#19     _CustomZone.run (dart:async/zone.dart:1093:19)
#20     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#21     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#22     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#23     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.5 19F101, locale
    en)
    • Flutter version 1.22.0-12.1.pre at /Users/yizhoumao/Development/flutter
    • Framework revision 8b3760638a (3 days ago), 2020-09-15 17:47:13 -0700
    • Engine revision 4654fc6cf6
    • Dart version 2.10.0 (build 2.10.0-110.3.beta)
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, set
      ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.


[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).

[✓] VS Code (version 1.49.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome
      85.0.4183.102

! Doctor found issues in 2 categories.

Flutter Application Metadata

No pubspec in working directory.

1 possible answer(s) on “[tool_crash] NoSuchMethodError: NoSuchMethodError: The method ‘cancel’ was called on null.Receiver: nullTried calling: cancel()