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

Serial monitor extension shows blank pane #550

Open
IvanVeloz opened this issue Oct 18, 2024 · 2 comments
Open

Serial monitor extension shows blank pane #550

IvanVeloz opened this issue Oct 18, 2024 · 2 comments

Comments

@IvanVeloz
Copy link

Using this version of VScode, the Serial Monitor extension (ms-vscode.vscode-serial-monitor) shows a blank pane as seen below. Normally it should look like the animation shown on the marketplace.

image

I found these logs by Ctrl+Shift+P then "Developer: Show Logs..." then "Serial Monitor Logging".

2024-10-18T15:39:40.465Z [info] [vscode-serial-monitor] Activating extension
2024-10-18T15:39:43.440Z [debug] [vscode-serial-monitor.monitor] VsCodeHostAdapter [webview -> host]: {"service":"monitorHost","type":"initialize","kind":"request","messageId":0}
2024-10-18T15:39:43.450Z [debug] [vscode-serial-monitor.monitor] VsCodeHostAdapter [webview <- host]: {"service":"monitorHost","type":"initialize","kind":"exception","messageId":0,"payload":{"message":"spawn udevadm ENOENT","stack":"Error: spawn udevadm ENOENT\n\tat ChildProcess._handle.onexit (node:internal/child_process:286:19)\n\tat onErrorNT (node:internal/child_process:484:16)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)","errno":-2,"code":"ENOENT","syscall":"spawn udevadm","path":"udevadm","spawnargs":["info","-e"]}}
2024-10-18T15:39:43.451Z [error] [vscode-serial-monitor.monitor] Failed to initialize serial monitor view {"message":"spawn udevadm ENOENT","stack":"Error: spawn udevadm ENOENT\n\tat ChildProcess._handle.onexit (node:internal/child_process:286:19)\n\tat onErrorNT (node:internal/child_process:484:16)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)","errno":-2,"code":"ENOENT","syscall":"spawn udevadm","path":"udevadm","spawnargs":["info","-e"]}
@IvanVeloz
Copy link
Author

I think the extension is trying to call udevadm, a command, and that is not included in the flatpak:

sh-5.2$ udevadm
sh: udevadm: command not found

If I try it on the host then:

ivan@ivan-pc:~$ udevadm
Command verb required (one of info, trigger, settle, control, monitor, hwdb, test, test-builtin, wait, lock, verify, version, help).

Presumably, the extension uses udevadm to scan for serial ports and their names.

@IvanVeloz
Copy link
Author

IvanVeloz commented Oct 18, 2024

A workaround:

  • Create a file touch $HOME/.var/app/com.visualstudio.code/data/node_modules/bin/udevadm.
  • Edit its contents:
#!/bin/sh
flatpak-spawn --host udevadm "$@"
  • Make it executable: chmod +x $HOME/.var/app/com.visualstudio.code/data/node_modules/bin/udevadm
  • Reopen VScode.

image

I believe no permission changes are necessary (i.e. no changes on Flatseal or equivalents).

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

1 participant