Skip to content

dart.flutterSdkPath is not a valid SDK folder when following symlink #4625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jul 3, 2023 · 8 comments
Closed

dart.flutterSdkPath is not a valid SDK folder when following symlink #4625

ghost opened this issue Jul 3, 2023 · 8 comments
Labels
in editor Relates to code editing or language features is bug
Milestone

Comments

@ghost
Copy link

ghost commented Jul 3, 2023

Describe the bug
Warning "The SDK configured in dart.flutterSdkPath is not a valid SDK folder." appears when SDK configured via symlink: fvm as example.

To Reproduce
Steps to reproduce the behavior:

  1. Set dart.flutterSdkPath to ".fvm/flutter_sdk"

Expected behavior
Should not appear

Screenshots
Снимок экрана 2023-07-04 в 03 01 10

Please complete the following information:

  • Operating System and version: macOS Ventura 13.3.1 (a)
  • VS Code version: 1.79.2
  • Dart extension version: v3.68.0
  • Dart/Flutter SDK version: 3.10.5
@ghost ghost added the is bug label Jul 3, 2023
@ghost
Copy link
Author

ghost commented Jul 3, 2023

[03:09:41] [General] [Info] Searching for flutter
[03:09:41] [General] [Info]     Looking for flutter in:
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/.fvm/flutter_sdk
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/.fvm/flutter_sdk/bin
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.3.9/bin/
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker/.flutter
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker/.flutter/bin
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker/vendor/flutter
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/packages/calendar_range_picker/vendor/flutter/bin
[03:09:41] [General] [Info]         /Users/dms/flutter-sdk
[03:09:41] [General] [Info]         /Users/dms/flutter-sdk/bin
[03:09:41] [General] [Info]         /google/flutter
[03:09:41] [General] [Info]         /google/flutter/bin
[03:09:41] [General] [Info]         /Users/dms/.rbenv/shims
[03:09:41] [General] [Info]         /Users/dms/.rbenv/shims/bin
[03:09:41] [General] [Info]         /Users/dms/.goenv/shims
[03:09:41] [General] [Info]         /Users/dms/.goenv/shims/bin
[03:09:41] [General] [Info]         /opt/homebrew/opt/python@3.9/libexec/bin
[03:09:41] [General] [Info]         /Users/dms/.nvm/versions/node/v15.14.0/bin
[03:09:41] [General] [Info]         /opt/homebrew/bin
[03:09:41] [General] [Info]         /opt/homebrew/sbin
[03:09:41] [General] [Info]         /usr/local/bin
[03:09:41] [General] [Info]         /System/Cryptexes/App/usr/bin
[03:09:41] [General] [Info]         /usr/bin
[03:09:41] [General] [Info]         /bin
[03:09:41] [General] [Info]         /usr/sbin
[03:09:41] [General] [Info]         /sbin
[03:09:41] [General] [Info]         /Library/Apple/usr/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/default/bin
[03:09:41] [General] [Info]         /Users/dms/.pub-cache/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/tools
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/tools/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/platform-tools
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/platform-tools/bin
[03:09:41] [General] [Info]         /Users/dms/.goenv/versions/1.18.0/bin
[03:09:41] [General] [Info]         /Users/dms/Developer/Go/1.18.0/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts/bin
[03:09:41] [General] [Info]     Found at:
[03:09:41] [General] [Info]         /Users/dms/Developer/DartPackages/.fvm/flutter_sdk/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.3.9/bin/
[03:09:41] [General] [Info]         /Users/dms/.fvm/default/bin
[03:09:41] [General] [Info] Following symlink: /Users/dms/Developer/DartPackages/.fvm/flutter_sdk/bin/flutter ==> /Users/dms/.fvm/versions/3.10.5/bin/flutter
[03:09:41] [General] [Info] Following symlink: /Users/dms/.fvm/default/bin/flutter ==> /Users/dms/.fvm/versions/master/bin/flutter
[03:09:41] [General] [Info]     Candidate paths to be post-filtered:
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.3.9
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/master
[03:09:41] [General] [Info]     Found at /Users/dms/.fvm/versions/3.10.5
[03:09:41] [General] [Info]     Returning SDK path /Users/dms/.fvm/versions/3.10.5 for flutter
[03:09:41] [General] [Info] Searching for dart
[03:09:41] [General] [Info]     Looking for dart in:
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk/bin
[03:09:41] [General] [Info]         /Users/dms/.rbenv/shims
[03:09:41] [General] [Info]         /Users/dms/.rbenv/shims/bin
[03:09:41] [General] [Info]         /Users/dms/.goenv/shims
[03:09:41] [General] [Info]         /Users/dms/.goenv/shims/bin
[03:09:41] [General] [Info]         /opt/homebrew/opt/python@3.9/libexec/bin
[03:09:41] [General] [Info]         /Users/dms/.nvm/versions/node/v15.14.0/bin
[03:09:41] [General] [Info]         /opt/homebrew/bin
[03:09:41] [General] [Info]         /opt/homebrew/sbin
[03:09:41] [General] [Info]         /usr/local/bin
[03:09:41] [General] [Info]         /System/Cryptexes/App/usr/bin
[03:09:41] [General] [Info]         /usr/bin
[03:09:41] [General] [Info]         /bin
[03:09:41] [General] [Info]         /usr/sbin
[03:09:41] [General] [Info]         /sbin
[03:09:41] [General] [Info]         /Library/Apple/usr/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
[03:09:41] [General] [Info]         /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/default/bin
[03:09:41] [General] [Info]         /Users/dms/.pub-cache/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/tools
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/tools/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/platform-tools
[03:09:41] [General] [Info]         /Users/dms/Library/Android/sdk/platform-tools/bin
[03:09:41] [General] [Info]         /Users/dms/.goenv/versions/1.18.0/bin
[03:09:41] [General] [Info]         /Users/dms/Developer/Go/1.18.0/bin
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts
[03:09:41] [General] [Info]         /Users/dms/Library/Application Support/JetBrains/Toolbox/scripts/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk/bin
[03:09:41] [General] [Info]     Found at:
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/default/bin
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk/bin
[03:09:41] [General] [Info] Following symlink: /Users/dms/.fvm/default/bin/dart ==> /Users/dms/.fvm/versions/master/bin/dart
[03:09:41] [General] [Info]     Candidate paths to be post-filtered:
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/master
[03:09:41] [General] [Info]         /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk
[03:09:41] [General] [Info]     Found at /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk
[03:09:41] [General] [Info]     Returning SDK path /Users/dms/.fvm/versions/3.10.5/bin/cache/dart-sdk for dart

@DanTup DanTup added this to the v3.68.1 milestone Jul 3, 2023
@DanTup DanTup added the in editor Relates to code editing or language features label Jul 3, 2023
@DanTup DanTup closed this as completed in 0183df2 Jul 4, 2023
@DanTup
Copy link
Member

DanTup commented Jul 4, 2023

Sorry for the bother. I've pushed a new release (v3.68.1 stable, v3.69.20230704 pre-release) that contains a fix for this. Please let me know if you continue to see issues. Thanks!

@ykiran
Copy link

ykiran commented Jul 5, 2023

@DanTup
After updating to v3.68.1, I keep getting the "The SDK configured in dart.flutterSdkPath is not a valid SDK folder".
Also, the path in settings.json to be a non-existent folder and points to flutter windows beta!

Windows 10 Pro (21H2)
VS Code 1.79.2
Flutter 2.10.5
Dart 2.16.2

Screenshot for reference:

image

@DanTup
Copy link
Member

DanTup commented Jul 5, 2023

@ykiran as far as I can see, that's expected behaviour. This warning is to tell you that you have an invalid path in your dart.flutterSdkPath setting (which you do, if it doesn't exist). The fix is to delete that setting, because it's not doing anything.

@ykiran
Copy link

ykiran commented Jul 5, 2023

@ykiran as far as I can see, that's expected behaviour. This warning is to tell you that you have an invalid path in your dart.flutterSdkPath setting (which you do, if it doesn't exist). The fix is to delete that setting, because it's not doing anything.

Ok, but I just wanted to highlight that this started happening only after I updated to the latest version. The sdk path was also not present earlier IIRC.
Thanks anyways.

@DanTup
Copy link
Member

DanTup commented Jul 5, 2023

@ykiran gotcha. That's expected because this warning was added in the latest version (see https://dartcode.org/releases/#:~:text=A%20warning%20will%20now%20be%20shown%20if).

Some users had mistakenly put the path to the flutter binary in this setting (instead of the SDK folder) and it wasn't clear why their chosen SDK was not being used. This warning is to avoid that by encouraging people to remove any invalid SDK settings.

If everything is working fine, the setting can just be deleted, because it's being ignored. The only time you need the setting is if we can't find the SDK via another means (such as looking in PATH).

@dht-hedaihua
Copy link

I upgraded to v3.69.20230719 pre release and deleted the dart.flutterSdkPath configuration item, but this warning will continue to pop up every time I open a new project. But the project is running well. This is really a not good experience. I didn't seem to have this warning before. Recently, I upgraded the version of Flutter using flutter upgrade. Is this related to this operation?

@DanTup
Copy link
Member

DanTup commented Jul 23, 2023

@dht-hedaihua let's continue in #4656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is bug
Projects
None yet
Development

No branches or pull requests

3 participants