tools icon indicating copy to clipboard operation
tools copied to clipboard

πŸ› VSCode extension keeps crashing

Open jpike88 opened this issue 2 years ago β€’ 5 comments

Environment information

CLI:
  Version:              10.0.1
  Color support:        true

Platform:
  CPU Architecture:     aarch64
  OS:                   macos

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"

Rome Configuration:
  Status:               unset

Workspace:
  Open Documents:       0

Discovering running Rome servers...

Running Rome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή The client isn't connected to any server but rage discovered this running Rome server.

Server:
  Version:              10.0.1
  Name:                 rome_lsp
  CPU Architecture:     aarch64
  OS:                   macos

Workspace:
  Open Documents:       0

Rome Server Log:

⚠ Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

┐rome_cli::commands::daemon::Running Server{pid=67152}
β”œβ”€48ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€57ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€58ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€58ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€59ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€59ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(1)}
β”œβ”€β”˜
β”œβ”€3895ms WARN tower_lsp::service::pending client asked to cancel request 1, but no such pending request exists, ignoring
β”œβ”€11558ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€116548ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€116550ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€116550ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€116550ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€116550ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€116550ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€128375ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
┐rome_cli::commands::daemon::Running Server{pid=67418}
β”œβ”€50ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€189ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€190ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€190ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€190ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€190ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€212ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€3603ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€3686ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€3687ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€3688ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€3688ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€3688ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€3688ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€3784ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€4410ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€4471ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€4474ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€4474ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€4474ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€4474ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€4474ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€4559ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€7455ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€7515ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€7518ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€7518ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€7518ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€7518ms ERROR rome_service::configuration Could not find the file configuration at "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€7518ms ERROR rome_service::configuration Reason: Os { code: 2, kind: NotFound, message: "No such file or directory" }
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€7588ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€9120ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€244338ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€301405ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€301406ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€301407ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€301407ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€301407ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€301746ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€301746ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€305618ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
┐rome_cli::commands::daemon::Running Server{pid=67601}
β”œβ”€50ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€170ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€171ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€171ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€171ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€193ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€1127ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€1188ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€1190ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€1190ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€1190ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€1190ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€1292ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€4815ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€4877ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€4878ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€4878ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€4878ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€4878ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€4971ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€5389ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€5451ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€5453ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€5454ms INFO rome_lsp::server Attempting to load the configuration from 'rome.json' file
β”œβ”€5454ms INFO rome_service::configuration Attempting to load the configuration file at path "/Users/joshpike/Projects/aquipa/rome.json"
β”œβ”€β”rome_fs::fs::os::OsFile::read_to_string{}
β”œβ”€β”˜
β”œβ”€5454ms INFO rome_lsp::session Configuration found, and it is valid!
β”œβ”€β”rome_lsp::session::update_workspace_settings{}
β”‚ β”œβ”€β”rome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None } }}
β”‚ β”‚ β”œβ”€β”rome_service::settings::merge_with_configuration{configuration=Configuration { files: None, formatter: None, linter: Some(LinterConfiguration { enabled: true, rules: Some(Rules { recommended: Some(true), a11y: None, complexity: None, correctness: None, nursery: None, security: None, style: None }), ignore: None }), javascript: None }}
β”‚ β”‚ β”œβ”€β”˜
β”‚ β”œβ”€β”˜
β”œβ”€β”˜
β”œβ”€β”rome_js_parser::parse::parse{file_id=FileId(0)}
β”œβ”€β”˜
β”œβ”€5532ms WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
β”œβ”€5852ms WARN rome_lsp::handlers::analysis unknown code action kind CodeActionKind("source.fixAll.eslint") requested
β”œβ”€11646ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€11647ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
β”œβ”€43726ms INFO rome_lsp::server Starting Rome Language Server...
β”œβ”€43726ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)


### What happened?

add simple Rome.json per the 'getting started' guide
try to use vscode extension on project

### Expected result

rome to not crash

### Code of Conduct

- [X] I agree to follow Rome's Code of Conduct

jpike88 avatar Nov 29 '22 05:11 jpike88

Unfortunately the logs don't really contain anything useful about the crash, and I could not reproduce the issue on Rome 10.0.1, with v0.18.1 of the extension and the following configuration file:

{
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  }
}

Would you be able to share a minimal project that exhibits the issue ?

leops avatar Nov 29 '22 08:11 leops

Yes, endless crash

image

dreamer2q avatar Dec 08 '22 02:12 dreamer2q

Is there any output shown when you click on Go to output. If so, can you share it with us?

MichaReiser avatar Dec 08 '22 11:12 MichaReiser

I’m incredibly busy… is there some sort of telemetry that could assist in this?

jpike88 avatar Dec 08 '22 11:12 jpike88

After updating to 0.19.0, VSC shows:

Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.rome(lint/a11y/useKeyWithClickEvents) even with "useKeyWithClickEvents": "off"

After updating to 0.20.0, the message stays the same, but trying to restart LSP server results in continuous crashing.

Current rome.json config:

{
  "formatter": {
    "indentStyle": "tab",
    "lineWidth": 110
  },
  "linter": {
    "enabled": true,
    "rules": {
      "correctness": {
        "recommended": true,
        "noDelete": "off"
      },
      "style": {
        "recommended": true,
        "useBlockStatements": "off",
        "noImplicitBoolean": "off"
      },
      "a11y": {
        "recommended": true,
        "useKeyWithClickEvents": "off"
      }
    }
  }
}

Rome output (0.20.0) :

[cli-stdout] data 62
[cli] exit 0
Connecting to "/var/folders/mj/_0y6l9912494g98yxq26_3xr0000gn/T/rome-socket-" ...
[Info  - 17:04:41] Server initialized with PID: 4485
[cli-stdout] data 62
[cli-stderr] end
[cli] exit 0
[cli-stderr] close
[cli-stdout] end
Connecting to "/var/folders/mj/_0y6l9912494g98yxq26_3xr0000gn/T/rome-socket-" ...
[cli] close 0
[cli-stdout] close
[Error - 17:04:45] Rome client: couldn't create connection to server.
Error: connect ECONNREFUSED /var/folders/mj/_0y6l9912494g98yxq26_3xr0000gn/T/rome-socket-
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
[Error - 17:04:45] Restarting client failed
Error: connect ECONNREFUSED /var/folders/mj/_0y6l9912494g98yxq26_3xr0000gn/T/rome-socket-
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
[cli-stderr] end
[cli-stdout] end
[cli-stdout] close
[cli] close 0
[cli-stderr] close

Rollback to 0.18.1 works fine.

Rados51 avatar Dec 08 '22 16:12 Rados51

not having this issue anymore. closing

jpike88 avatar Dec 12 '22 17:12 jpike88

in other news, I've decided to move my whole development team to Rome! I'm fed up with eslint being the memory hog it is, and confident the Rome team are onto something that will finally bring native performance to linting and formatting. Good luck guys and I'll contribute however I can!

jpike88 avatar Dec 12 '22 17:12 jpike88

I should add the caveat that we're only using the Rome linter for now, as the formatter does not have any visibility on html in angular decorators (like in screenshot). So we will stick with Prettier until that is a feature (which I've opened an issue about): Screenshot 2022-12-13 at 12 40 36 am

jpike88 avatar Dec 12 '22 17:12 jpike88