Skip to content

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

Closed

Description

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

Activity

  1. added this to the v3.68.1 milestone on Jul 3, 2023
  2. added
    in editorRelates to code editing or language features
    on Jul 3, 2023
  3. DanTup commented on Jul 4, 2023

    @DanTup
    Member

    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!

  4. ykiran commented on Jul 5, 2023

    @ykiran

    @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

  5. DanTup commented on Jul 5, 2023

    @DanTup
    Member

    @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.

  6. ykiran commented on Jul 5, 2023

    @ykiran

    @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.

  7. DanTup commented on Jul 5, 2023

    @DanTup
    Member

    @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).

  8. dht-hedaihua commented on Jul 23, 2023

    @dht-hedaihua

    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?

  9. DanTup commented on Jul 23, 2023

    @DanTup
    Member

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions