Skip to content

[Bug] Quick Fix failure: _dart.applySnippetTextEdit command not found #6155

Closed

Description

@khusantoy

Steps to reproduce

When trying to use the Quick Fix menu (Refactor action) to wrap a widget (e.g., Wrap with SizedBox) in Flutter, an error toast appears:
Actual command not found, wanted to execute _dart.applySnippetTextEdit /5044

  1. Open a Flutter/Dart project in VS Code / Cursor.
  2. Select or put the cursor on a widget (e.g., ElevatedButton).
  3. Press Cmd + . (or Ctrl + .) to open the Quick Fix / Refactor menu
  4. Click on Wrap with SizedBox (or any other wrap option).
  5. The error notification pops up and the text edit is not applied.

Expected results

The selected widget should be wrapped with SizedBox automatically without errors.

Actual results

An error toast pops up with the message:
Actual command not found, wanted to execute _dart.applySnippetTextEdit /5044
The widget is not wrapped, and no code changes are applied.

Code sample

Code sample
ElevatedButton(
  onPressed: () {}, 
  child: const Text("Ba'tafsil ko'rish"),
)

Screenshots or Video

Screenshots / Video demonstration Image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.44.9, on macOS 26.6.2 25G83 darwin-arm64, locale en-UZ)
[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 26.6)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for I.S.K.A.N.D.A.R. Ensure the device is unlocked and
      attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 1 category.

Activity

  1. khusantoy commented on Aug 26, 2026

    @khusantoy
    Author
    Image Same in Cursor
  2. DanTup commented on Aug 26, 2026

    @DanTup
    Member

    I was able to reproduce the second error (logAction), which I think might be a race with startup. However I've not managed to reproduce the first error (when applySnippetTextEdit fails).

    Can you confirm which version of the Dart extension you have installed in VS Code, and whether you can reproduce this:

    1. After the first analysis has completed (or does it only occur if you invoke it during startup/initial analysis?)
    2. In a completely fresh VS Code session, or only after coding for a while (or some kind of error that might have restarted the analysis server)

    Thanks!

  3. added
    awaiting infoRequires more information from the customer to progress
    on Aug 26, 2026
  4. added this to the v3.144.0 milestone on Aug 26, 2026
  5. DanTup commented on Aug 26, 2026

    @DanTup
    Member

    This might be a VS Code issue, I see it was also reported by other extensions at microsoft/vscode#331834

  6. khusantoy commented on Aug 27, 2026

    @khusantoy
    Author

    Dart extension version: 3.140.0
    Flutter extension version: 3.140.0
    Vscode version: 1.134.0

  7. added and removed
    awaiting infoRequires more information from the customer to progress
    on Aug 27, 2026
  8. DanTup commented on Aug 27, 2026

    @DanTup
    Member

    Thanks! I'm pretty certain now that this is a VS Code issue (it appears to stash the commands in a cache, but then disposes that cache too quickly). I'll keep this open until there has been a response on that issue. confirming (or a fix) just in case there's something we need to do though.

  9. DanTup commented on Sep 1, 2026

    @DanTup
    Member

    This was indeed a VS Code bug and has been fixed for the upcoming v1.136.0 release of VS Code (see microsoft/vscode#331834).

  10. modified the milestones: v3.144.0, v3.142.0 on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions