-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Today (but not on Friday) I'm having trouble getting tests to run in VSCode. It is basically telling me that all the symbols in dart:ui aren't defined (Offset, Size, etc.), or the Flutter SDK isn't available. The test runs fine from the command line, and flutter doctor isn't giving me anything actionable.
I've tried clicking the "Run" link on several tests, and they either have massive errors because of undefined symbols that are definitely defined (I can even command-click on them!), or they simply say "The Flutter SDK is not available. Exited (255)." when I click the "Run" link in VSCode.
By contrast, running them on the command line works fine:
> cd packages/flutter
> flutter test test/material/page_test.dart
Resolving dependencies...
file 6.1.4 (7.0.0 available)
material_color_utilities 0.5.0 (0.8.0 available)
platform 3.1.1 (3.1.2 available)
process 4.2.4 (5.0.0 available)
webkit_inspection_protocol 1.2.0 (1.2.1 available)
Got dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
00:08 +34: All tests passed!
flutter doctor -v
> flutter doctor -v
[✓] Flutter (Channel main, 3.14.0-14.0.pre.108, on macOS 13.5.1 22G90 darwin-arm64, locale en)
• Flutter version 3.14.0-14.0.pre.108 on channel main at /Users/gspencer/code/flutter
• Upstream repository git@github.com:flutter/flutter.git
• Framework revision 6c5642167f (80 minutes ago), 2023-09-05 16:48:50 -0500
• Engine revision f4975e04f3
• Dart version 3.2.0 (build 3.2.0-134.0.dev)
• DevTools version 2.27.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/gspencer/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /Users/gspencer/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)
[✓] Android Studio (version 4.0)
• Android Studio at /Users/gspencer/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6514223/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)
[✓] IntelliJ IDEA Community Edition (version 2022.1.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 70.0.4
• Dart plugin version 221.5921.27
[✓] VS Code (version 1.81.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.72.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.5.1 22G90 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.140
[✓] Network resources
• All expected network resources are available.
• No issues found!
flutter doctor (run by the IDE, in output pane)
[!] Flutter (Channel main, 3.14.0-14.0.pre.108, on macOS 13.5.1 22G90 darwin-arm64, locale en)
• Flutter version 3.14.0-14.0.pre.108 on channel main at /Users/gspencer/code/flutter
! The flutter binary is not on your path. Consider adding /Users/gspencer/code/flutter/bin to your path.
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.6/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/gspencer/code/flutter. Consider adding /Users/gspencer/code/flutter/bin to the front of your path.
• Upstream repository git@github.com:flutter/flutter.git
• Framework revision 6c5642167f (68 minutes ago), 2023-09-05 16:48:50 -0500
• Engine revision f4975e04f3
• Dart version 3.2.0 (build 3.2.0-134.0.dev)
• DevTools version 2.27.0
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/gspencer/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /Users/gspencer/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)
[✓] Android Studio (version 4.0)
• Android Studio at /Users/gspencer/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6514223/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)
[✓] IntelliJ IDEA Community Edition (version 2022.1.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 70.0.4
• Dart plugin version 221.5921.27
[✓] VS Code (version 1.81.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.72.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.5.1 22G90 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.140
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Here are my dart settings in settings.json:
"dart.flutterSdkPath": "/Users/gspencer/code/flutter",
"dart.debugSdkLibraries": true,
"dart.debugExternalPackageLibraries": true,
"dart.env": {
"FLUTTER_ROOT": "/Users/gspencer/code/flutter"
},
"dart.flutterCreateOrganization": "dev.flutter",
"dart.lineLength": 120,
"dart.openTestView": [
"testRunStart"
],
"dart.debugExternalLibraries": true,
"dart.previewLsp": true,
"dart.flutterSdkPaths": [
"/Users/gspencer/code/flutter"
],
"[dart]": {
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": false,
"editor.formatOnType": false,
"editor.rulers": [
80,
100
],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
},
"dart.promptToGetPackages": false,
"dart.runPubGetOnPubspecChanges": "never",I've tried doing all the paranoid things:
- Sync to HEAD
- reload VSCode
git clean -dxfrm -rf ~/.pub-cacherm -rf ~/.dartServer- reboot the machine
and it's still happening.