arciisine / vscode-chronicler

VS Code Screen Recording
MIT License
61 stars 13 forks source link

Command failed (X11, Manjaro/Arch) #36

Open peter-lyons-kehl opened 1 year ago

peter-lyons-kehl commented 1 year ago

Thank you for Chronicler, Timothy.

Unfortunately, it fails on:

Side note: ctrl+alt+shift+r doesn't seem to trigger Chronicler for me. It opens some kind of screenshot app/plugin (and not VS Code-specific: it opens it regardless of VS Code). So far I haven't figured out what that is. So for now I trigger Chronicler with Chronicler: Start Recording with Audio.

When I do start Chronicler, after the initial pause VS Code fails:

Command failed: /opt/visual-studio-code/code /home/pkehl/.vscode/extensions/arcsine.chronicler-0.1.16/node_modules/@arcsine/win-info/bin/win-info-x11.js active node:internal/errors:464 ErrorCaptureStackTrace(err); ^ Error: spawn xwininfo ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:478:16) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn xwininfo', path: 'xwininfo', spawnargs: [ '-id', '46137347' ], cmd: 'xwininfo -id 46137347', stdout: '', stderr: '' }

Troubleshooting (after I hit 'y' to install your npx scripts) - the same errors (except for different window ID) even after a reboot:

npx @arcsine/win-info
node:internal/errors:484
    ErrorCaptureStackTrace(err);
    ^

Error: spawn xwininfo ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xwininfo',
  path: 'xwininfo',
  spawnargs: [ '-id', '75497544' ],
  cmd: 'xwininfo -id 75497544',
  stdout: '',
  stderr: ''
}

Node.js v18.10.0
node:child_process:910
    throw err;
    ^

Error: Command failed: /usr/bin/node /home/pkehl/.npm/_npx/7bdea5cc73c9c05d/node_modules/@arcsine/win-info/bin/win-info-x11.js active
node:internal/errors:484
    ErrorCaptureStackTrace(err);
    ^

Error: spawn xwininfo ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xwininfo',
  path: 'xwininfo',
  spawnargs: [ '-id', '75497544' ],
  cmd: 'xwininfo -id 75497544',
  stdout: '',
  stderr: ''
}

Node.js v18.10.0

    at checkExecSyncError (node:child_process:871:11)
    at Object.execFileSync (node:child_process:907:15)
    at getActiveSync (/home/pkehl/.npm/_npx/7bdea5cc73c9c05d/node_modules/@arcsine/win-info/index.js:55:41)
    at Object.<anonymous> (/home/pkehl/.npm/_npx/7bdea5cc73c9c05d/node_modules/@arcsine/win-info/bin/win-info.js:8:43)
    at Module._compile (node:internal/modules/cjs/loader:1149:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
    at Module.load (node:internal/modules/cjs/loader:1027:32)
    at Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'node:internal/errors:484\n' +
      '    ErrorCaptureStackTrace(err);\n' +
      '    ^\n' +
      '\n' +
      'Error: spawn xwininfo ENOENT\n' +
      '    at ChildProcess._handle.onexit (node:internal/child_process:283:19)\n' +
      '    at onErrorNT (node:internal/child_process:476:16)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n' +
      '  errno: -2,\n' +
      "  code: 'ENOENT',\n" +
      "  syscall: 'spawn xwininfo',\n" +
      "  path: 'xwininfo',\n" +
      "  spawnargs: [ '-id', '75497544' ],\n" +
      "  cmd: 'xwininfo -id 75497544',\n" +
      "  stdout: '',\n" +
      "  stderr: ''\n" +
      '}\n' +
      '\n' +
      'Node.js v18.10.0\n'
  ],
  pid: 112935,
  stdout: '',
  stderr: 'node:internal/errors:484\n' +
    '    ErrorCaptureStackTrace(err);\n' +
    '    ^\n' +
    '\n' +
    'Error: spawn xwininfo ENOENT\n' +
    '    at ChildProcess._handle.onexit (node:internal/child_process:283:19)\n' +
    '    at onErrorNT (node:internal/child_process:476:16)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n' +
    '  errno: -2,\n' +
    "  code: 'ENOENT',\n" +
    "  syscall: 'spawn xwininfo',\n" +
    "  path: 'xwininfo',\n" +
    "  spawnargs: [ '-id', '75497544' ],\n" +
    "  cmd: 'xwininfo -id 75497544',\n" +
    "  stdout: '',\n" +
    "  stderr: ''\n" +
    '}\n' +
    '\n' +
    'Node.js v18.10.0\n'
}

Node.js v18.10.0

and

npx @arcsine/screen-recorder test.mp4
node:internal/errors:863
  const err = new Error(message);
              ^

Error: Command failed: /usr/bin/node /home/pkehl/.npm/_npx/c71e018737289961/node_modules/@arcsine/win-info/bin/win-info-x11.js active
node:internal/errors:484
    ErrorCaptureStackTrace(err);
    ^

Error: spawn xwininfo ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xwininfo',
  path: 'xwininfo',
  spawnargs: [ '-id', '75497544' ],
  cmd: 'xwininfo -id 75497544',
  stdout: '',
  stderr: ''
}

Node.js v18.10.0

    at ChildProcess.exithandler (node:child_process:412:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/usr/bin/node /home/pkehl/.npm/_npx/c71e018737289961/node_modules/@arcsine/win-info/bin/win-info-x11.js active',
  stdout: '',
  stderr: 'node:internal/errors:484\n' +
    '    ErrorCaptureStackTrace(err);\n' +
    '    ^\n' +
    '\n' +
    'Error: spawn xwininfo ENOENT\n' +
    '    at ChildProcess._handle.onexit (node:internal/child_process:283:19)\n' +
    '    at onErrorNT (node:internal/child_process:476:16)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n' +
    '  errno: -2,\n' +
    "  code: 'ENOENT',\n" +
    "  syscall: 'spawn xwininfo',\n" +
    "  path: 'xwininfo',\n" +
    "  spawnargs: [ '-id', '75497544' ],\n" +
    "  cmd: 'xwininfo -id 75497544',\n" +
    "  stdout: '',\n" +
    "  stderr: ''\n" +
    '}\n' +
    '\n' +
    'Node.js v18.10.0\n'
}

Node.js v18.10.0

Please advise.

peter-lyons-kehl commented 1 year ago

If it matters: I have 3 screens (the laptop's built-in, plus two external screens - one over HDMI, the other over a display port-to-VGA).

arciisine commented 1 year ago

Hi @peter-kehl, are you running X11 or potentially running Wayland? The fact that the error is showing up in the x11 information gathering points to something there being amiss.

Due to architectural changes (limitations) in Wayland, getting a list of screens and their dimensions is currently not feasible.

peter-lyons-kehl commented 1 year ago

Hi Timothy @arciisine,

I'm on X11: image

I've temporarily switched to kernel 6.0.2-2 (still on X11), but getting the same errors from VS Code, npx @arcsine/win-info and npx @arcsine/screen-recorder test.mp4.

arciisine commented 1 year ago

So, the error you are getting indicates xwininfo is not installed, which, afaik has been default in X11 installations. Can you try running xwininfo from the CLI to verify it is (or isn't) installed?

peter-lyons-kehl commented 1 year ago

Thank you. Correct: xwininfo was not installed. I've installed it now (it's a package on Manjaro/Arch), will reboot and test. image

peter-lyons-kehl commented 1 year ago

Confirming that it works (once I installed xwininfo & rebooted). Suggest adding a note to README.md that it needs xwininfo to be installed and that it usually comes with X11 but it may be missing.