Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 VSCode extension shows "Request textDocument/codeAction failed." error for every new JS/TS/JSON file despite "rome.requireConfiguration": "true" #4322

Closed
1 task done
lgarron opened this issue Mar 24, 2023 · 3 comments · Fixed by #4327
Labels
A-Project Area: project configuration and loading S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@lgarron
Copy link

lgarron commented Mar 24, 2023

Environment information

N/A (`rome` is not installed in affected projects)

This is using the Rome extension pre-release, v0.21.20230324

What happened?

  1. Install v0.21.20230324 of the Rome extension for VSCode.
  2. Set "rome.requireConfiguration": true in VSCode.
  3. Open a project without rome.json.
  4. Create a new file ending in .js, .ts, or .json.

The following message pops up for every keystroke in the new file:
Request textDocument/codeAction failed. / Source: Rome (Extension) / Go to output

Expected result

The extension should not be trying to format or show an error like this, if rome.json is not present in the current project.

Workaround

I can work around this by reloading the entire VSCode window after creating a new file. This is a reasonable price to pay for using a pre-release that otherwise handles "rome.requireConfiguration": true perfectly! 😺

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@lgarron lgarron added the S-To triage Status: user report of a possible bug that needs to be triaged label Mar 24, 2023
@lgarron lgarron changed the title 🐛 VSCode extension shows "Request textDocument/codeAction failed." error for every new JS/TS file despite "rome.requireConfiguration": "true" 🐛 VSCode extension shows "Request textDocument/codeAction failed." error for every new JS/TS/JSON file despite "rome.requireConfiguration": "true" Mar 24, 2023
@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Project Area: project configuration and loading and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Mar 24, 2023
@ematipico ematipico self-assigned this Mar 24, 2023
@denbezrukov
Copy link
Contributor

Hm,
I can't reproduce the issue =(
Could you please show Rome trace output?
I guess you also have to turn on logs: "rome_lsp.trace.server": "verbose"

@ematipico
Copy link
Contributor

@lgarron Please, next time you file an issue, make sure to add the output of the Rome rage command.

That command will also contain logging coming from the LSP (VSCode), which can be useful for debugging purpose.

@lgarron
Copy link
Author

lgarron commented Mar 27, 2023

@lgarron Please, next time you file an issue, make sure to add the output of the Rome rage command.

... sure? 😝

> npx rome rage
Need to install the following packages:
  [email protected]
Ok to proceed? (y)

In any case, I'm about to reset the computer that this is happening on, so I won't have an active repro. I can wait until the next stable version to see if there's still an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Project Area: project configuration and loading S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants