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

File dialogs don't open #221836

Closed
333fred opened this issue Jul 16, 2024 · 18 comments
Closed

File dialogs don't open #221836

333fred opened this issue Jul 16, 2024 · 18 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron linux Issues with VS Code on Linux native-file-dialog Issues with native file dialog verified Verification succeeded

Comments

@333fred
Copy link
Contributor

333fred commented Jul 16, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.91.1
  • Commit: f1e16e1
  • Date: 2024-07-09T22:08:12.169Z
  • Electron: 29.4.0
  • ElectronBuildId: 9728852
  • Chromium: 122.0.6261.156
  • Node.js: 20.9.0
  • V8: 12.2.281.27-electron.0
  • OS: Linux x64 5.15.0-113-generic

Steps to Reproduce:

Not sure what exact combination of Ubuntu/i3/Nautilus is required to trigger this issue, but what I'm seeing is that File->Open File and File->Open Folder simply do nothing. There's no popup window, no error messages in dev tools, nothing. I've copied some of the output of code --disable-extensions --verbose --log trace below, in case there's something helpful in them, but I certainly don't see anything I could use to troubleshoot. If there's anything else I can provide to help figure out what's going on here, I'm happy to do so. This does work in 1.89.1, but not in 1.90.2.

[44334:0716/094501.026400:INFO:CONSOLE(660)] "%cTRACE color: #888 KeybindingService#dispatch Ctrl+K [ Several keybindings match - more chords needed ]", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[44334:0716/094501.027231:INFO:CONSOLE(660)] "%cTRACE color: #888 KeybindingService#dispatch Ctrl+O [ Will dispatch command workbench.action.files.openFolder ]", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[44334:0716/094501.027345:INFO:CONSOLE(660)] "%cTRACE color: #888 CommandService#executeCommand workbench.action.files.openFolder", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[main 2024-07-16T16:45:01.027Z] [DialogMainService]: request to acquire file dialog lock {
  title: 'Open Folder',
  buttonLabel: undefined,
  filters: undefined,
  defaultPath: '/home/fred/git',
  properties: [ 'multiSelections', 'openDirectory', 'createDirectory' ]
}
[main 2024-07-16T16:45:01.028Z] [DialogMainService]: new file dialog lock created {
  title: 'Open Folder',
  buttonLabel: undefined,
  filters: undefined,
  defaultPath: '/home/fred/git',
  properties: [ 'multiSelections', 'openDirectory', 'createDirectory' ]
}
[44334:0716/094501.029044:INFO:CONSOLE(660)] "%cDEBUG background: #eee; color: #888 [perf] SLOW task detected (409ms) but renderer profiling is disabled via 'application.experimental.rendererProfiling'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[main 2024-07-16T16:45:01.030Z] [DialogMainService]: file dialog lock disposed {
  title: 'Open Folder',
  buttonLabel: undefined,
  filters: undefined,
  defaultPath: '/home/fred/git',
  properties: [ 'multiSelections', 'openDirectory', 'createDirectory' ]
}
[44334:0716/094502.240973:INFO:CONSOLE(660)] "%cDEBUG background: #eee; color: #888 Comments: URIs of continue on comments to add to storage .", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
System Info
Category Details
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 3105)
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) 0, 2, 2
Memory (System) 62.70GB (46.24GB free)
Process Argv --disable-extensions --verbose --log trace --crash-reporter-id c9f05a69-d019-464b-b1f2-b43e5fb75046
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelc:31048052
dsvsc021:30996838
0ee40948:31013168
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31094925
pythonrstrctxtcf:31093870
@333fred
Copy link
Contributor Author

333fred commented Jul 16, 2024

Alright, I did a bisect between 1.89.1 and 1.90.0, and it pinpointed 28ebd91 as the buggy commit. Seems like this is probably an electron bug (not overly surprising, given the behavior).

@333fred
Copy link
Contributor Author

333fred commented Jul 18, 2024

@deepak1556 what's the next step on this? I'm not sure how to get any debug information from electron itself to understand what's going wrong here.

@jpetrina
Copy link

I am also experiencing this issue on latest GNOME desktop.

However, there is a strange behaviour where attempting to use Open Folder button does not work for my main desktop user, but it does work for another user (or a freshly created one) on the same machine.

@deepak1556
Copy link
Collaborator

@333fred can you check if the issue is present with our insiders https://code.visualstudio.com/insiders

@deepak1556 deepak1556 added info-needed Issue requires more information from poster linux Issues with VS Code on Linux native-file-dialog Issues with native file dialog labels Jul 22, 2024
@jpetrina
Copy link

jpetrina commented Jul 22, 2024

@333fred can you check if the issue is present with our insiders https://code.visualstudio.com/insiders

@deepak1556 the insiders release does not resolve the issue for me:

Version: 1.92.0-insider
Commit: 97d1b933ada0ca69bea107f7a89e029991277ccc
Date: 2024-07-22T05:03:41.362Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.9.7-arch1-1

Looking forward for this to hit the main release channel, thanks! I tested this on a secondary Linux user as mentioned in my previous comment so it seemed like it works, but does not on my main user.

@333fred
Copy link
Contributor Author

333fred commented Jul 22, 2024

@333fred can you check if the issue is present with our insiders https://code.visualstudio.com/insiders

Insiders appears to solve this for me, I'll close this out. @jpetrina, to avoid getting confused, I would probably suggest opening a separate issue for your symptoms specifically.

@333fred
Copy link
Contributor Author

333fred commented Aug 6, 2024

@deepak1556 sorry to reopen, but while this is once again working on one of my machines, I'm seeing it still be an issue on another, and insiders (Version: 1.93.0-insider ff8504a) is not working either.

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron and removed info-needed Issue requires more information from poster labels Aug 8, 2024
@deepak1556 deepak1556 added this to the August 2024 milestone Aug 8, 2024
@deepak1556
Copy link
Collaborator

Very likely related to the runtime version revert #223494, will revisit this again once we update to newer Electron version.

@Wielding
Copy link

Just adding some information about the issue I submitted that was merged here.

#224767

If I kill xdg-desktop-portal-gnome everything starts working again. This was breaking save as dialogs in all Chromium-based browsers as well, which also started working again without the gnome portal running.

@ThanasisMattas
Copy link

I am not sure if it is related or this needs to be another issue, but Ctrl+O used to display the contents of the project folder. Now it displays a collection of resent (probable?) files/folders. How can this be reverted? There is a chance I am confusing this behaviour with VS Code Insiders.

@deepak1556
Copy link
Collaborator

deepak1556 commented Sep 26, 2024

@ThanasisMattas the issue you referring was tracked in #213780 which should be fixed in latest insiders.

We have brought back the runtime update that address this issue, closing as fixed.

@333fred can you help verify if the issue is addressed with our latest insiders which you install from https://code.visualstudio.com/insiders

@deepak1556 deepak1556 added the author-verification-requested Issues potentially verifiable by issue author label Sep 26, 2024
@bpasero bpasero added the verified Verification succeeded label Sep 27, 2024
@bpasero
Copy link
Member

bpasero commented Sep 27, 2024

File dialogs appear in front for me in Ubuntu for a while now, marking as verified.

@333fred
Copy link
Contributor Author

333fred commented Sep 27, 2024

@333fred can you help verify if the issue is addressed with our latest insiders which you install from https://code.visualstudio.com/insiders

Testing with insiders, I can indeed open file dialogs, on the same machine that 1.93.1 does not work on. Thanks deepak!

@333fred
Copy link
Contributor Author

333fred commented Oct 3, 2024

Now that 1.94.0 is out and I've tested locally, I can confirm this is fixed in stable as well. Thanks!

@andyhasit
Copy link

andyhasit commented Oct 5, 2024

I'm on Ubuntu 24.04.1 LTS (Kubuntu, recent update, about a week ago) and vscode 1.94.0 and got this issue all of a sudden today. I copied some text into a new tab, tried to save it and the dialog froze. I killed that, and from that point on I could neither close the tab nor save the file.

I did a reboot, and the problem is still there.

I ran code --verbose and got the print out file save dialog is already or will be showing for the window with the same configuration when trying to save or close. Ater trying killall xdg-desktop-portal-kde and killall xdg-desktop-portal and restarting I momentarily saw the dialog when attempting to close the file.

Weirdly, as I'm typing this, a dialog asking me if I want to save changes showed up again, probably a minute or two after I tried to close the file, but I'm in a weird state so will reboot again and post back.


Posting back post reboot:

Try to save file, get this in output:

request to acquire file dialog lock {...}
new file dialog lock created {...}
[main 2024-10-05T12:55:16.210Z] update#checkForUpdates, state =  idle
[main 2024-10-05T12:55:16.210Z] update#setState checking for updates
[main 2024-10-05T12:55:16.213Z] update#setState idle
[main 2024-10-05T12:55:16.421Z] menubarService#updateMenubar 1
[7066:1005/135533.386646:INFO:CONSOLE(35)] "%cDEBUG background: #eee; color: #888 Comments: URIs of continue on comments to add to storage .", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)
[7066:1005/135547.151211:INFO:CONSOLE(35)] "%cDEBUG background: #eee; color: #888 Comments: URIs of continue on comments to add to storage .", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)
[7066:1005/135608.104205:INFO:CONSOLE(35)] "%cTRACE color: #888 writeTextAreaState(reason: focusgain)", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)
[main 2024-10-05T12:56:08.343Z] menubarService#updateMenubar 1
[7066:1005/135608.367753:INFO:CONSOLE(35)] "%cTRACE color: #888 CommandService#executeCommand _setContext", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)
[7066:1005/135608.368325:INFO:CONSOLE(35)] "%cTRACE color: #888 [DEBOUNCE: CodeLensProvide] for untitled:Untitled-1 is 250ms", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)

No dialog visible however, so try again, and get:

[7066:1005/135610.337544:INFO:CONSOLE(35)] "%cTRACE color: #888 CommandService#executeCommand workbench.action.files.saveAs", source: vscode-file://vscode-app/snap/code/170/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (35)
request to acquire file dialog lock {...}
file save dialog is already or will be showing for the window with the same configuration

Yet no dialog visible. File save dialogs work fine in other applications.

@andyhasit
Copy link

I tried code-insiders at 1.95.0 but that behaved weirdly. It's slow to open file dialogs, and eventually crashes, and a few minutes later I get a "KDialog closed unexpectedly" tray notification which I'm presuming came from that (I didn't kill anything myself).

@andyhasit
Copy link

andyhasit commented Oct 5, 2024

I uninstalled vscode which was installed by snap and downloaded the 1.93.1 as a .deb from the homepage, installed that with APT and that fixed the issue.

So I thought I'd uninstall 1.93.1 and install 1.94.0 the same way, and it works.

So either uninstalling and reinstalling fixed the issue, or it was the snap installation that was broken. Either way, that's a work-around for people experiencing this on Linux.

@itzTerra
Copy link

On Kubuntu 24.04 and Snap VSCode 1.94.2, doing File->Open Folder does nothing, but kdialog process starts soaking up memory until I have to kill it. Also, vscode probably thinks the dialog is open, because I cannot open e.g. Help->About after doing File->Open Folder.

As @andyhasit mentioned, I uninstalled the snap version and installed the .deb package:
Version: 1.94.2
Commit: 384ff73
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-45-generic

... and File->Open Folder now works fine. I was curious and installed the snap version again:
Version: 1.94.2
Commit: 384ff73
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-45-generic snap

... and I get the same problem I mentioned at the start.
I am going to stick with the .deb version for now, but I'd really like to be able to use snap for the auto-updates.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron linux Issues with VS Code on Linux native-file-dialog Issues with native file dialog verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

10 participants