我无法诊断以下错误的原因。 Here是可复制的存储库。 (在结帐assertion-failure
分支时要小心)
有时在通过Cmd + Shift + F5在vscode中快速重复热重装时会发生此错误。
平台是网络。 Android可能由于刷新速度而无法重现这一点。
删除网络请求并没有发生。
Restarted application in 149ms.
════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown building TabNavigation:
Assertion failed:
../…/widgets/routes.dart:1396
_scopeKey.currentState != null
"Tried to remove a willPop callback from a route that is not currently in the tree."
When the exception was thrown, this was the stack
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 216:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 24:3 assertFailed
packages/flutter/src/widgets/routes.dart 1396:22 removeScopedWillPopCallback
packages/flutter/src/widgets/will_pop_scope.dart 62:9 didUpdateWidget
packages/flutter/src/widgets/framework.dart 4862:57 update
...
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
Assertion failed:
../…/rendering/binding.dart:315
!_debugMouseTrackerUpdateScheduled
is not true
flutter doctor -v
[✓] Flutter (Channel master, 1.24.0-2.0.pre.111, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-KR)
• Flutter version 1.24.0-2.0.pre.111 at /Users/jeiea/.asdf/installs/flutter/1.22.1-stable
• Framework revision fe189baf34 (4 days ago), 2020-10-21 22:25:53 -0400
• Engine revision f459a86610
• Dart version 2.11.0 (build 2.11.0-242.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/jeiea/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.1, Build version 12A7403
• CocoaPods version 1.9.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
? https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
? https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.50.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.1
[✓] Connected device (2 available)
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 86.0.4240.111
• No issues found!