Dart-Code: Opening a loose file (without an active workspace) in LSP results in failed LSP requests

  • File -> Close Folder in VS Code to ensure no folders open
  • File -> Open -> pick a single .dart file

A message pops up about requests failing:

[Error - 10:28:35 AM] Request textDocument/documentSymbol failed.
  Message: Invalid file path
  Code: -32003 
/Users/danny/Desktop/darttest/foo.dart
[Error - 10:28:35 AM] Request textDocument/codeAction failed.
  Message: Invalid file path
  Code: -32003 
/Users/danny/Desktop/darttest/foo.dart

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Is this fix available now on the stable dart channel?

facing the same issue here, restarting not fix it.

@MarceloFV glad you sorted it - although it’s a shame it required so much effort.

If it comes back, please do file an issue in this repo so we can track it down. Thanks!