cursor icon indicating copy to clipboard operation
cursor copied to clipboard

runtime error show when install C lang server

Open clipsheep6 opened this issue 2 years ago • 2 comments
trafficstars

log here , ubuntu 22.04.2

./Cursor-0.1.3.AppImage 
16:49:49.267 › Made main window
16:49:49.292 › setting up handle get_folder
16:49:49.292 › setting up handle getClipboard
16:49:49.293 › setting up handle get_file
16:49:49.293 › ---------------------first one 0
16:49:49.326 › -------------error
16:49:49.326 › Error: Command failed: command -v zsh
    at checkExecSyncError (node:child_process:865:11)
    at Object.execSync (node:child_process:936:15)
    at Object.execSync (node:electron/js2c/asar_bundle:2:12709)
    at /tmp/.mount_CursorwESClR/resources/app.asar/.webpack/main/index.js:8:884962
    at App.<anonymous> (/tmp/.mount_CursorwESClR/resources/app.asar/.webpack/main/index.js:8:885311)
    at App.emit (node:events:525:35)
16:49:49.329 › ---------------------first one 1
16:49:49.344 › -------------after
16:49:49.345 › setting up index
16:49:49.345 › setup index
16:49:50.538 › found settings
16:49:50.602 › ----------STARTING WATCHER
16:49:50.604 › starting server for copilot
16:49:50.605 › Store has language copilot {
  name: 'copilot',
  running: true,
  downloadedInfo: {
    isNode: true,
    command: '/tmp/.mount_CursormOWkC6/resources/lsp/copilot/dist/agent.js',
    args: []
  }
}
16:49:50.624 › !!!!!!!!!Finished spawning child process copilot
16:49:50.625 › created connection copilot
16:49:50.629 › starting server for copilot
16:49:50.630 › Store has language copilot {
  name: 'copilot',
  running: true,
  downloadedInfo: {
    isNode: true,
    command: '/tmp/.mount_CursormOWkC6/resources/lsp/copilot/dist/agent.js',
    args: []
  }
}
16:49:50.637 › !!!!!!!!!Finished spawning child process copilot
16:49:50.638 › created connection copilot
16:49:50.710 › lang copilot stderr: node:internal/modules/cjs/loader:966
  throw err;
  ^

Error: Cannot find module '/tmp/.mount_CursormOWkC6/resources/lsp/copilot/dist/agent.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
    at Module._load (node:internal/modules/cjs/loader:811:27)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

[216543:0323/164952.546090:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
16:49:53.138 › Store does not have language downloaded c
16:49:53.140 › INSTALLING
16:49:53.666 › Error occurred in handler for 'installLS': Error: EROFS: read-only file system, mkdir '/tmp/.mount_CursorwESClR/resources/lsp/c'
    at Object.mkdirSync (node:fs:1386:3)
    at Ne.<anonymous> (/tmp/.mount_CursorwESClR/resources/app.asar/.webpack/main/index.js:8:821630)
    at Generator.next (<anonymous>)
    at o (/tmp/.mount_CursorwESClR/resources/app.asar/.webpack/main/index.js:8:816034)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[216543:0323/165022.820603:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[216543:0323/165022.822620:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

clipsheep6 avatar Mar 23 '23 08:03 clipsheep6

@clipsheep6 , @truell20 this issue fixed PR created here: https://github.com/getcursor/cursor/pull/214

alexwebdevs avatar Mar 24 '23 09:03 alexwebdevs

@alexwebdevs issue still exist , run with Cursor-0.1.6.AppImage

16:10:16.334 › Store does not have language downloaded c
16:10:16.334 › INSTALLING
16:10:17.097 › Error occurred in handler for 'installLS': Error: EROFS: read-only file system, mkdir '/tmp/.mount_CursorQ4EeOu/resources/lsp/c'
    at Object.mkdirSync (node:fs:1386:3)
    at Me.<anonymous> (/tmp/.mount_CursorQ4EeOu/resources/app.asar/.webpack/main/index.js:8:831376)
    at Generator.next (<anonymous>)
    at o (/tmp/.mount_CursorQ4EeOu/resources/app.asar/.webpack/main/index.js:8:825782)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

clipsheep6 avatar Mar 25 '23 08:03 clipsheep6

I temporarily solved that problem on my Linux after I clone the code, and add a if clause here https://github.com/getcursor/cursor/blob/5cd4edd7d0d8906241c5612b7c9e2fec3ece0c33/src/main/lsp.ts#L227-L229

             if (languageInfo.downloadedInfo != null) {
-                return languageInfo.downloadedInfo
+                if (fs.existsSync(languageInfo.downloadedInfo.command)) {
+                    return languageInfo.downloadedInfo
+                }
             }

Jonkimi avatar Mar 27 '23 03:03 Jonkimi

issue still exist , run with Cursor-0.1.12.AppImage

Error occurred in handler for 'installLS': Error: EROFS: read-only file system, mkdir '/tmp/.mount_cursortJ97Tg/resources/lsp/c'
    at Object.mkdirSync (node:fs:1386:3)
    at Kt.<anonymous> (/tmp/.mount_cursortJ97Tg/resources/app.asar/.webpack/main/index.js:8:863516)
    at Generator.next (<anonymous>)
    at o (/tmp/.mount_cursortJ97Tg/resources/app.asar/.webpack/main/index.js:8:857700)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

czliu avatar Mar 30 '23 23:03 czliu

Should be fixed in newest version 🙂

truell20 avatar Apr 08 '23 07:04 truell20