Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed (X11, Manjaro/Arch) #36

Open
peter-lyons-kehl opened this issue Oct 25, 2022 · 6 comments
Open

Command failed (X11, Manjaro/Arch) #36

peter-lyons-kehl opened this issue Oct 25, 2022 · 6 comments

Comments

@peter-lyons-kehl
Copy link

peter-lyons-kehl commented Oct 25, 2022

Thank you for Chronicler, Timothy.

Unfortunately, it fails on:

  • Manjaro (a stable sister of Arch) x64 Linux, up-to-date (but 5.19 kernel 5.19.16-2-MANJARO #1 SMP PREEMPT_DYNAMIC - I'll try with 6.0, too),
  • X11, GNOME 42.4
  • VS Code 1.72.2
    • Version: 1.72.2
    • Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
    • Date: 2022-10-12T22:16:26.920Z
    • Electron: 19.0.17
    • Chromium: 102.0.5005.167
    • Node JS reported by VS Code is 16.14.2, but the below npx commands seem to be using Node 18.10.0)
    • V8: 10.2.154.15-electron.0
    • OS: Linux x64 5.19.16-2-MANJARO
    • Sandboxed: No
      image

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

peter-lyons-kehl commented Oct 26, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants