vscodium: Linux - vscodium no longer displays file-dialog after update to Ver. 1.90.0

Describe the bug

On File-Open or anything needing a file-dialog window, no file dialog window is displayed. Additionally .xsession-errors are generated by vscodium. This just started with installation of the last release of vscodium.

vscodium build

Version: 1.90.0
Release: 24158
Commit: cc102f3a62bd35f39ed059b99c5cce90e50a16e2
Date: 2024-06-06T18:33:17.728Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 5.14.21-150400.24.100-default

Background, I have used vscodium for more than a year on openSUSE Leap 15.4. I really enjoy the IDE. The file-dialog displayed by vscodium on Linux has always been the old x-windows file dialog. That’s fine, even though it pops-behind the vscodium window and you have to [alt+tab] to it – it has always worked.

After update to Ver 1.90.0 sometime in the past week or so, the file-dialog just quit. I didn’t notice until tonight as I have a large project open and the files I need are already opened. However when trying to install the cmake-tools update from .vsix tonight – no file-open dialog was presented at all after choosing Install from .vsix. I checked File -> Open File... - same result, no file-open dialog is triggered or displayed.

Checking .xsession-errors the following errors repeat when vscodium is open and go away when it is closed. This is also new. The errors logged are, e.g.:

NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
[main 2024-06-12T08:13:08.190Z] update#setState disabled
[main 2024-06-12T08:13:08.192Z] update#ctor - updates are disabled as there is no update URL
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
[22434:0612/031330.426551:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031330.437053:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.311701:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.311785:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.311842:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.311886:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.312606:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
[22434:0612/031331.359389:ERROR:check.cc(319)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
NETWM: Warning readIcon() needs buffer adjustment!
[main 2024-06-12T08:14:29.332Z] Extension host with pid 22552 exited with code: 0, signal: unknown.

I’ve never seen a NETWM: Warning readIcon() needs buffer adjustment!, but nonetheless, I went ahead and closed KDE, deleted the cache in /var/tmp/kdecache-david (me) and restarted the desktop forcing a complete cache rebuild. The errors continue unchanged as soon as vscodium is opened and cease when vscodium is closed. (I’m presuming this is somehow related to this problem)

Please confirm that this problem is VSCodium-specific

  • This bug doesn’t happen if I use Microsoft’s Visual Studio Code. It only happens in VSCodium.

I can’t confirm this as I only have vscodium installed from .rpm from the vscodium repository.

Please confirm that the issue/resolution isn’t already documented

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘the File menu’
  2. Click on 'Open File...'
  3. No file dialog. [ctrl+o] likewise produces no file dialog.
  4. See error, the NETWM: Warning readIcon() needs buffer adjustment! error repeats (multiple times) each time the vscodium window gains or loses focus. The other errors shown occur at vscodium start and quit.

Expected behavior

When I chose File -> Open File.... I expect a file-open dialog to be presented so I can … open a file. Or when I am in Extensions and choose Install From VSIX..., I likewise expect a file-open dialog.

Screenshots If applicable, add screenshots to help explain your problem.

Screenshots for the absence of an event are not available.

Desktop (please complete the following information):

  • OS: openSUSE Leap 15.4
  • Architecture x64
  • App Manager RPM
  • Desktop: KDE3 from openSUSE

Additional context Add any other context about the problem here.

Nope, that’s about it . Kinda hard to use an IDE if you can’t open a file in it.

(note: I can create the file in some other editor and move the file/directory into my vscodium project dir and vscodium will pick it up monitoring for changes, but that’s rather an ugly work-around).

I’ve never before had issues getting a file-open dialog from vscodium before this last release. In 20+ years of using a Linux desktop, I’ve never not gotten a file-open dialog when requested. Even though vscodium would invoke the old x-windows file-open dialog, that was fine.

Currently all other apps, (firefox [Gtk] or keepassxc [Qt], etc…) all have no issue providing the file-open dialog, this is just vscodium and it’s new.

Downgrade to 1.89.0 Solves Issue

As a check, I downgraded vscodium using the saved vscodium-1.89.1.24130-x86_64.rpm. The file-open dialog now appears fine (still pops behind vscodium, but works fine), e.g.

vscodium-file-open-1 89

So this is definitely a Ver. 1.90.0 new issue. However, the .xsession-errors entry NETWM: Warning readIcon() needs buffer adjustment! is also present in 1.89.0, so that isn’t new and doesn’t appear directly related to the lack of the file-open dialog issue.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 5
  • Comments: 24 (6 by maintainers)

Most upvoted comments

Update. openSUSE KDE3 has patched kdialog in kdebase3-add-attach-option-kdialog.patch and with that change vscodium-1.95.3.24321 presents the native file-dialogs just fine. I’ve also passed this to Trinity Desktop for similar update. These should be considered work-arounds and not “fixes”, because the problem with electron/xdg-desktop-portal isn’t fixed.

I’m glad to see there is effort underway to resolve this upstream, because it really cannot be that every distro and every affected desktop and every affected version of a chooser to reinvent a solution to the problem and implement a one-off patch. The fix is for electron/xdg-desktop-portal to verify the chooser found did in fact open and is presented to the user, and if not, then display the default Gtk chooser as a fallback.

On the upside, the idea of using native dialogs if present is a good one. For 20 years there were efforts to have openoffice/libreoffice use native choosers. So being able to do this on a reliable basis is a step forward.

However as these features migrate out of the sandbox of various container apps, they can lead to very difficult to identify issues. Not ever having heard of electron, or xdg-desktop-portal before, when those backends break functionality, it can’t take this long to figure out what broke and how to fix it.

This first broke and was reported on June 12 here and upstream, but because of the obscurity of electron and xdg-desktop-portal, it was readily apparent upstream had no clue what broke or how to fix it. So this left vscode/vscodium broken for some users from June through present, me included. The good news is at least the crux of this issue is understood for kdialog, and it is likely the same issue for other older versions of desktop like mate, etc… So let’s see what upstream comes up with.

The change of behaviour in Electron is likely to be linked to https://github.com/electron/electron/pull/42045 They seem to use file_dialog_linux.cc instead of file_dialog_gtk.cc.

Will do, I’ve already passed this to Michele on the tdedevels list yesterday. The reason there are a flurry of different bugs and no solutions is few have heard of this xdg-desktop-portal that started as a Flatpak tool, but now seems to be proliferating across applications like weeds in a vacant lot. It took messing with this for months before I got pointed in a direction that the command-line tool kdialog was even involved.

That was never envisioned as a tool to be cobbled together with a massive application to use the dialog aspects of it. It was a tool for shell programmer to use to generate a gui dialog from a shell-script. The TDE folks as of yesterday had likewise not heard of xdg-desktop-portal.

I redid my ugly hack to instead just launch codium with a PATH specified that omits /opt/kde3/bin and the gtk dialog that disappeared after 1.89 happily springs back to life… and nobody at github even mentioned it may be a command-line utility problem caused by portal.

Oh well, we have gotten to the root cause expending hours upon hours to uncover what was and wasn’t done that led to dialogs disappearing. The hard part is over. I’ll have time to author the bug tomorrow or Tuesday and I’ll drop a link here.

Apparently an upstream fix with vscode should resolve this once vscode adopts electron_30. See Linux file dialog does not use default file path #213780 Fingers crossed…

Update - the upstream bug was reopened 3-days ago related to additional regressions beyond those that will be fixed with the adoption of electron_30 (including this bug). Target is for the August vscode release.