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

Cannot open source files from within file manager (Thunar) #212125

Open
majid4466 opened this issue May 6, 2024 · 20 comments
Open

Cannot open source files from within file manager (Thunar) #212125

majid4466 opened this issue May 6, 2024 · 20 comments
Assignees
Labels
confirmation-pending info-needed Issue requires more information from poster install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package workbench-os-integration Native OS integration issues

Comments

@majid4466
Copy link

majid4466 commented May 6, 2024

Type: Bug

After the most recent update when I double click source files (*.php, *.js, etc.) a new instance of VS code is spawned and nothing is opened, neither in the already open vs code instance nor in the new one.

Files could be opened by dropping them on VS code window and by using the explorer as well as using search results.

My dev box has Xubuntu 20.04 and the file manager I use is Thunar.
Here is the version information from the "About" dialog:

Version: 1.89.0
Commit: b58957e
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 5.4.0-177-generic

VS Code version: Code 1.89.0 (b58957e, 2024-05-01T02:08:25.066Z)
OS version: Linux x64 5.4.0-177-generic
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8500Y CPU @ 1.50GHz (4 x 2949)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 2, 2
Memory (System) 7.65GB (3.81GB free)
Process Argv --unity-launch --crash-reporter-id e0cccab9-1704-45d5-9a6d-97943ca924da
Screen Reader no
VM 0%
DESKTOP_SESSION xubuntu
XDG_CURRENT_DESKTOP XFCE
XDG_SESSION_DESKTOP xubuntu
XDG_SESSION_TYPE x11
Extensions (10)
Extension Author (truncated) Version
vscode-intelephense-client bme 1.10.4
prettier-vscode esb 10.4.0
copilot Git 1.187.0
copilot-chat Git 0.15.2024043005
todo-tree Gru 0.0.226
remote-ssh ms- 0.110.1
remote-ssh-edit ms- 0.86.0
remote-explorer ms- 0.4.3
material-icon-theme PKi 5.1.0
php-debug xde 1.34.0

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes516:30244333
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
chatpanelc:31018788
dsvsc021:30996838
jg8ic977:31013176
pythoncenvpt:31022790
dwnewjupytercf:31035177

@majid4466 majid4466 changed the title Cannot open source files from within Thunar Cannot open source files from within file manager (Thunar) May 6, 2024
@connor4312 connor4312 assigned bpasero and unassigned connor4312 May 6, 2024
@bpasero
Copy link
Member

bpasero commented May 7, 2024

This does not sound like a bug in VS Code but an issue with your setup, but leaving this issue open to see if others hit it as well.

@bpasero bpasero added info-needed Issue requires more information from poster confirmation-pending linux Issues with VS Code on Linux workbench-os-integration Native OS integration issues labels May 7, 2024
@majid4466
Copy link
Author

majid4466 commented May 7, 2024

What inclined me to think this could be a VS Code bug is that it appeared exactly after the last VS Code update. VS Code is my IDE and I use it every day.

If there's something I can do to test which one is the case, I am more than willing to try.

I could think of one test, which is not conclusive but seems to suggest the issue is related to VS Code:
I changed the Open With association of .js files from Visual Studio Code to Sublime Text. Double clicking .js files opened them in Sublime Text without an issue. I then changed the association back to VS Code and the issue was back.
I repeated that with Mousepad with the same results (working with Mousepad and failing with VS Code.)

@bpasero
Copy link
Member

bpasero commented May 7, 2024

So you cannot reproduce when you install 1.88.1?

VS Code Build: e170252f762678dec6ca2cc69aba1570769a5d39

cli-alpine-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_alpine_arm64_cli.tar.gz
cli-alpine-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_alpine_x64_cli.tar.gz
cli-darwin-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_darwin_arm64_cli.zip
cli-darwin-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_darwin_x64_cli.zip
cli-linux-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_linux_arm64_cli.tar.gz
cli-linux-armhf: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_linux_armhf_cli.tar.gz
cli-linux-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_linux_x64_cli.tar.gz
cli-win32-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_win32_arm64_cli.zip
cli-win32-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/vscode_cli_win32_x64_cli.zip
darwin: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCode-darwin.zip
darwin-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCode-darwin-arm64.zip
darwin-universal: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCode-darwin-universal.zip
linux-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-stable-arm64-1712770481.tar.gz
linux-armhf: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-stable-armhf-1712770492.tar.gz
linux-deb-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code_1.88.1-1712770538_arm64.deb
linux-deb-armhf: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code_1.88.1-1712770545_armhf.deb
linux-deb-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code_1.88.1-1712771838_amd64.deb
linux-rpm-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-1.88.1-1712770627.el8.aarch64.rpm
linux-rpm-armhf: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-1.88.1-1712770623.el8.armv7hl.rpm
linux-rpm-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-1.88.1-1712771932.el8.x86_64.rpm
linux-snap-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-stable-x64-1712773445.snap
linux-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/code-stable-x64-1712770462.tar.gz
win32-arm64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCodeSetup-arm64-1.88.1.exe
win32-arm64-archive: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCode-win32-arm64-1.88.1.zip
win32-arm64-user: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCodeUserSetup-arm64-1.88.1.exe
win32-x64: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCodeSetup-x64-1.88.1.exe
win32-x64-archive: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCode-win32-x64-1.88.1.zip
win32-x64-user: https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCodeUserSetup-x64-1.88.1.exe

@ferby88
Copy link

ferby88 commented May 8, 2024

I'm also experiencing the same issue with the Dolphin file manager after the last update, opening a file with the "Open file" dialog o dragging it to an opened Code window works fine.

Code is installed through the snap package manager.

These are the information displayed in the About dialog:

Version: 1.89.0
Commit: b58957e
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-28-generic snap

@bpasero
Copy link
Member

bpasero commented May 8, 2024

Please downgrade and see if its not reproducible then: #212125 (comment)

@ferby88
Copy link

ferby88 commented May 8, 2024

I can confirm that reverting Code with the "snap revert" command resolved the issue, the current installation details are the following:

Version: 1.88.1
Commit: e170252
Date: 2024-04-10T17:34:12.840Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-28-generic snap

@bpasero
Copy link
Member

bpasero commented May 8, 2024

Interesting, can you add a --verbose to the command line invocation or configure VS Code runtime arguments and add:

"log-level": "trace"
image

And then attach the logs folder with a clean startup via your finder. Maybe also comparing 1.89 to 1.90.

@bpasero
Copy link
Member

bpasero commented May 8, 2024

@majid4466 are you also on Snap?

Does this reproduce when not using Snap but Deb?

@majid4466
Copy link
Author

Yes, I have VS Code installed as a Snap package.

I am hesitant to experiment with my development machine by uninstalling VS Code and testing the deb version. If I get the chance to install the deb version on another machine I will report the result here.

@bpasero
Copy link
Member

bpasero commented May 8, 2024

Thanks

@bpasero
Copy link
Member

bpasero commented May 8, 2024

But it would still be interesting to get at the verbose logs when it works vs when it does not work.

@ferby88
Copy link

ferby88 commented May 9, 2024

I tried to reproduce the issue on another workstation and a virtual machine but the snap package 1.89.0 works fine.
It seems to be an issue with the snap refresh process and not with the version itself.

If I find some time today I will retry to upgrade Code again on the pc that presented the issue and let you know the result.

@bpasero
Copy link
Member

bpasero commented May 9, 2024

Yeah I am not expecting a regression in VS Code but a setup/install issue.

@ferby88
Copy link

ferby88 commented May 9, 2024

I attached the log generated by opening a file from file manager with both Code versions.
version-1.88.1-logs.zip
version-1.89.0-logs.zip

@bpasero
Copy link
Member

bpasero commented May 9, 2024

Yeah, as expected, in version 1.89 the instance receives the following argument for opening:

args: {"_":["/home/fabio/Downloads/New Folder/test.txt"]

And in 1.90:

args: {"_":[]

So on the way of opening from the finder to VS Code, the argument is either never passed or lost.

@bpasero bpasero assigned Tyriar and unassigned bpasero May 9, 2024
@bpasero bpasero added install-update VS Code installation and upgrade system issues snap Issues related to the snap package labels May 9, 2024
@bpasero
Copy link
Member

bpasero commented May 9, 2024

Moving to Daniel and Deepak as this seems Snap install related, I doubt we changed something how we create the Snap file, but I am not sure either.

@yukina3230
Copy link

I have the same issue on Gnome Nautilus, double click on the file in the file manager launches a new empty instance of VSCode. I'm using Arch and VSCode is installed through AUR.

Version: 1.89.1
Commit: dc96b83
Date: 2024-05-07T05:16:23.416Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.8.9-arch1-2

@Sherevv
Copy link

Sherevv commented May 15, 2024

have the same issue on Gnome Nautilus, double click on the file in the file manager launches a new empty instance of VSCode. I'm using Arch and VSCode is installed through AUR.

same for me

@leukipp
Copy link

leukipp commented May 20, 2024

Same problem with thunar file manager on ubuntu:

Version: 1.89.1
Commit: dc96b83
Date: 2024-05-07T05:16:23.416Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 5.15.0-76-generic

Installed through the deb package from apt repo http://packages.microsoft.com/repos/code stable main.

@leukipp
Copy link

leukipp commented May 20, 2024

I can confirm that reverting Code with the "snap revert" command resolved the issue, the current installation details are the following:


After downgrading to 1.89.0 the issue still exists:

# downgrading code from 1.89.1-1715060508 to 1.89.0-1714530869
sudo apt install code=1.89.0-1714530869

First buggy version (.deb)

Version: 1.89.0
Commit: b58957e
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 5.15.0-76-generic


A further downgrade to 1.88.1 fixes the problem:

# downgrading code from 1.89.0-1714530869 to 1.88.1-1712771838
sudo apt install code=1.88.1-1712771838

Last working version (.deb)

Version: 1.88.1
Commit: e170252
Date: 2024-04-10T17:34:12.840Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 5.15.0-76-generic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmation-pending info-needed Issue requires more information from poster install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package workbench-os-integration Native OS integration issues
Projects
None yet
Development

No branches or pull requests

10 participants