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

Created on 2 Sep 2020  路  10Comments  路  Source: Dart-Code/Dart-Code

  • 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
in editor in lsanalysis server is bug

Most helpful comment

Is this fix available now on the stable dart channel?

All 10 comments

Is this fix available now on the stable dart channel?

The change https://github.com/dart-lang/sdk/commit/047c0f860a51eb54edf074b41b9aa1141abece82 does appear to be in v2.10.4 of the Dart SDK. Are you still seeing issues using that version?

I am on Dart SDK version: 2.12.0-133.2.beta and still see this issue, the only difference is i see this when i am trying to run the app.

@akshayru can you file a new issue and include a screenshot of what you're seeing? Thanks!

This error is happaning to me:
[Error - 11:18:06 PM] Request textDocument/hover failed.
Message: Invalid file path
Code: -32003
.... [any .dart file path that im trying to work here]

@MarceloFV can you file a new issue and include exact details of what's happening and what version of Dart/Flutter you're using? Thanks!

hey, i'v opened a issue to talk about the error, but i'v find the solution and solved it, here's the link: https://github.com/dart-lang/language/issues/1470

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jascodes picture jascodes  路  4Comments

Matt-Gleich picture Matt-Gleich  路  4Comments

mayorbyrne picture mayorbyrne  路  5Comments

ifredom picture ifredom  路  3Comments

e200 picture e200  路  3Comments