Open nohupped opened 4 years ago
Thanks for the detailed report! Couple of things to try
What is the output of chrome://sandbox/
in your chrome browser ?
Can you run vscode with --verbose
flag and attach the output when you click the link with chrome as default browser
Does this work if you use firefox as default browser ?
Can you download electron fiddle https://github.com/electron/fiddle/releases/tag/v0.13.1 and try the following snippet https://gist.github.com/deepak1556/3acc57db2e600a3b60773217e9ad6ce6
Thank you for looking into this. Please find the information below.
- What is the output of chrome://sandbox/ in your chrome browser ?
Sandbox Status
Layer 1 Sandbox Namespace
PID namespaces Yes
Network namespaces Yes
Seccomp-BPF sandbox Yes
Seccomp-BPF sandbox supports TSYNC Yes
Ptrace Protection with Yama LSM (Broker) Yes
Ptrace Protection with Yama LSM (Non-broker) No
You are adequately sandboxed.
- Can you run vscode with --verbose flag and attach the output when you click the link with chrome as default browser
Clicked twice on the URL after starting vscode in verbose mode.
❯ code --verbose --disable-extensions ✔ 6090 07:55:58
Gtk-Message: 07:56:05.621: Failed to load module "canberra-gtk-module"
[main 2020-03-19T23:56:05.800Z] Starting VS Code
[main 2020-03-19T23:56:05.801Z] from: /var/lib/snapd/snap/code/27/usr/share/code/resources/app
[main 2020-03-19T23:56:05.801Z] args: {
_: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
version: false,
help: false,
telemetry: false,
'list-extensions': false,
'show-versions': false,
verbose: true,
status: false,
'prof-startup': false,
'disable-extensions': true,
'disable-gpu': false,
'extension-development-confirm-save': false,
logExtensionHostCommunication: false,
'skip-getting-started': false,
'skip-release-notes': false,
'sticky-quickopen': false,
'disable-restore-windows': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false,
'disable-user-env-probe': false,
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
force: false,
trace: false,
'force-user-env': false,
'no-proxy-server': false,
nolazy: false,
'force-renderer-accessibility': false,
'ignore-certificate-error': false,
'allow-insecure-localhost': false
}
===========snipped until Ctrl+Click the url===========
[17977:0320/075642.903545:INFO:CONSOLE(1647)] "%cTRACE color: #888 [text file model] load() - enter file:///home/nohup/tmp.txt", source: file:///var/lib/snapd/snap/code/27/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1647)
[17977:0320/075646.490460:INFO:CONSOLE(1647)] "%cTRACE color: #888 [storage state.vscdb] updateItems(): insert(Map(1) {memento/workbench.editors.files.textFileEditor => {"textEditorViewState":[["vscode-userdata:/home/nohup/.config/Code/User/settings.json",{"0":{"cursorState":[{"inSelectionMode":true,"selectionStart":{"lineNumber":52,"column":17},"position":{"lineNumber":52,"column":20}}],"viewState":{"scrollLeft":0,"firstPosition":{"lineNumber":30,"column":1},"firstPositionDeltaTop":-12},"contributionsState":{"editor.contrib.folding":{"lineCount":134,"provider":"syntax"},"editor.contrib.wordHighlighter":false}}}],["file:///home/nohup/tmp.txt",{"0":{"cursorState":[{"inSelectionMode":false,"selectionStart":{"lineNumber":1,"column":9},"position":{"lineNumber":1,"column":9}}],"viewState":{"scrollLeft":0,"firstPosition":{"lineNumber":1,"column":1},"firstPositionDeltaTop":0},"contributionsState":{"editor.contrib.folding":{"lineCount":1,"provider":"indent"},"editor.contrib.wordHighlighter":true}}}]]}}), delete(Set(0) {})", source: file:///var/lib/snapd/snap/code/27/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1647)
[17977:0320/075646.490913:INFO:CONSOLE(1647)] "%cTRACE color: #888 [storage state.vscdb] Trace (event): BEGIN TRANSACTION", source: file:///var/lib/snapd/snap/code/27/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1647)
[17977:0320/075646.491106:INFO:CONSOLE(1647)] "%cTRACE color: #888 [storage state.vscdb] Trace (event): INSERT INTO ItemTable VALUES ('memento/workbench.editors.files.textFileEditor','{"textEditorViewState":[["vscode-userdata:/home/nohup/.config/Code/User/settings.json",{"0":{"cursorState":[{"inSelectionMode":true,"selectionStart":{"lineNumber":52,"column":17},"position":{"lineNumber":52,"column":20}}],"viewState":{"scrollLeft":0,"firstPosition":{"lineNumber":30,"column":1},"firstPositionDeltaTop":-12},"contributionsState":{"editor.contrib.folding":{"lineCount":134,"provider":"syntax"},"editor.contrib.wordHighlighter":false}}}],["file:///home/nohup/tmp.txt",{"0":{"cursorState":[{"inSelectionMode":false,"selectionStart":{"lineNumber":1,"column":9},"position":{"lineNumber":1,"column":9}}],"viewState":{"scrollLeft":0,"firstPosition":{"lineNumber":1,"column":1},"firstPositionDeltaTop":0},"contributionsState":{"editor.contrib.folding":{"lineCount":1,"provider":"indent"},"editor.contrib.wordHighlighter":true}}}]]}')", source: file:///var/lib/snapd/snap/code/27/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1647)
[17977:0320/075646.491255:INFO:CONSOLE(1647)] "%cTRACE color: #888 [storage state.vscdb] Trace (event): END TRANSACTION", source: file:///var/lib/snapd/snap/code/27/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1647)
===========End of snippet===========
- Does this work if you use firefox as default browser ?
No, it doesn't work with Firefox as the default browser either.
- Can you download electron fiddle https://github.com/electron/fiddle/releases/tag/v0.13.1 and try the following snippet https://gist.github.com/deepak1556/3acc57db2e600a3b60773217e9ad6ce6
The above steps worked. The output inside the electron fiddle terminal was
Saving files to temp directory...
Saved files to /tmp/tmp-467856Ft8CUf9uClYx
Electron v8.1.1 started.
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397
Opening in existing browser session.
the output in the new electron window was
Hello World!
We are using Node.js 12.13.0, Chromium 80.0.3987.141, and Electron 8.1.1.
and bing opened in a new chrome tab.
Thank you.
Thanks for the update!
1) I mainly wanted to verify if chrome was using setuid sandbox on the system since there is a know issue with electron. But its using namespace sandbox so thats not the issue here.
4) I missed mentioning this, can you try the example on fiddle with electron 7.1.11 ?
Also just to clarify do you see this issue with clicking links from any file like markdown, release notes or just from extension pages ?
Thank you again. To answer your question,
- I missed mentioning this, can you try the example on fiddle with electron 7.1.11 ?
I tried this and it is working. The output from within the fiddle console (with an error and a warning) was
Saving files to temp directory...
Saved files to /tmp/tmp-4527wx7gIyCICLr4
Electron v7.1.11 started.
[253336:0321/135529.940337:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
Opening in existing browser session.
(electron:253284): IBUS-WARNING **: 13:55:30.779: Unable to connect to ibus: Could not connect: Connection refused
A new electron window was opened with the following content
Hello World!
We are using Node.js 12.8.1, Chromium 78.0.3904.130, and Electron 7.1.11.
and bing was opened in a new tab in chrome.
Also just to clarify do you see this issue with clicking links from any file like markdown, release notes or just from extension pages ?
Yes, I see it from every type of files that I've checked(markdown, text files, release notes and programming language specific files where hyperlinks are in comments are the ones I tried.)
I don't know if it is worth mentioning, but if it helps, I noticed that after the ctrl+click, the kde-open5
to open https://bing.com/ is the child process of xdg-open
which makes sense, but xdg-open
has a ppid
of 1
(systemd). I was expecting its parent to be vscode
's pid instead of systemd
's pid.
UID PID PPID PGID SID C STIME TTY TIME CMD
nohup 26401 1 26400 26400 0 13:19 ? 00:00:00 /bin/sh /usr/bin/xdg-open https://bing.com/
nohup 26402 26401 26400 26400 0 13:19 ? 00:00:00 kde-open5 https://bing.com/
Thanks for the info, helps!
but xdg-open has a ppid of 1 (systemd). I was expecting its parent to be vscode's pid instead of systemd's pid.
What is the pid of xdg-open
in the case of using electron fiddle ?
Thank you again. To answer your question,
What is the pid of xdg-open in the case of using electron fiddle ?
UID PID PPID PGID SID C STIME TTY TIME CMD
nohup 24095 23942 23015 2053 0 04:54 pts/1 00:00:00 /home/nohup/.config/Electron Fiddle/electron-bin/7.1.11/electron --type=renderer --field-trial-handle=11377938143948159513,14737777447393864844,131072 --disable-features=SpareRendererForSitePerProcess --lang=en-US --app-path=/tmp/tmp-23234AEXM1qaatsYw --node-integration --no-sandbox --no-zygote --background-color=#fff --num-raster-threads=4 --enable-main-frame-before-activation --service-request-channel-token=8500472037737174375 --renderer-client-id=5 --no-v8-untrusted-code-mitigations --shared-files=v8_context_snapshot_data:100,v8_natives_data:101
nohup 24143 24095 23015 2053 0 04:54 pts/1 00:00:00 /bin/sh /usr/bin/xdg-open https://bing.com/
nohup 24147 24143 23015 2053 0 04:54 pts/1 00:00:00 kde-open5 https://bing.com/
When using fiddle
, the ppid of kde-open5
is that of xdg-open
and the ppid of xdg-open
is that of Electron
(the fiddle application).
A quick update. I checked if this is existing in the normal package installation and found that this issue exists only with the snap
installation of vscode. When I installed it via pacman
, the links are working as expected. My snapd configuration is default. Is there something that I need to do to fix this problem? Please advise if I should change the title of this issue, or should I be raising a new issue to address this.
Thank you.
Same output of --verbose
.
But I get this with require('electron').shell.openExternal('https://google.com')
Uncaught Error: Check dependency list! Synchronous require cannot resolve module 'electron'. This is the first mention of this module!
I'm also on snap-built version.
I'm on Manjaro and seeing the same thing with the snap version. Please help! :)
use the version from the official arch linux repo https://aur.archlinux.org/visual-studio-code-bin.git
Hello, I found an existing issue https://github.com/Microsoft/vscode/issues/50139 but it is marked as closed, hence creating a new issue.
Operating System: Arch Linux KDE Plasma Version: 5.18.3 KDE Frameworks Version: 5.68.0 Qt Version: 5.14.1 Kernel Version: 5.5.9-arch1-2 OS Type: 64-bit Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz Memory: 7.6 GiB of RAM
I managed to get the
strace
of the process if that is going to be of any help.Not sure if it is related and would be of any help but
journalctl
also started showing the following error after the above process keeps crashing.My default association for url opening is Chrome, and opening the same url from terminal using
/bin/sh /usr/bin/xdg-open https://bing.com
works.Apologies if this issue doesn't belong here. I am not sure if this needs to be raised with vscode or KDE. Thank you.