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

Linux: dialogs are looking broken in the snap package #57019

Closed
HRK44 opened this issue Aug 22, 2018 · 27 comments
Closed

Linux: dialogs are looking broken in the snap package #57019

HRK44 opened this issue Aug 22, 2018 · 27 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package verified Verification succeeded
Milestone

Comments

@HRK44
Copy link

HRK44 commented Aug 22, 2018

  • vscode version :
    Version: 1.26.1
    Commit: 493869e
    Date: 2018-08-16T18:34:20.517Z
    Electron: 2.0.5
    Chrome: 61.0.3163.100
    Node.js: 8.9.3
    V8: 6.1.534.41
    Architecture: x64

  • OS Version:
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.1 LTS
    Release: 18.04
    Codename: bionic

Steps to Reproduce:

  1. Try to move a file from one folder to an other
  2. Confirmation modal is buggy

When I hover the buttons, they appear. But as you can see, the modal header has some dark black color.

screenshot from 2018-08-22 17-37-05

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

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 in the 1.26 update we moved to Electron 2.0.x and this brings GTK3 dialogs. Are you maybe using a custom theme in Ubuntu that could have an impact?

@bpasero bpasero added the info-needed Issue requires more information from poster label Aug 23, 2018
@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero I haven't changed anything in my Ubuntu setup, just upgraded VS code (was working fine with previous version). What kind of information from my settings would be useful for you?

@bpasero bpasero changed the title Confirmation modal is buggy Linux: dialogs are looking broken Aug 23, 2018
@bpasero bpasero added upstream Issue identified as 'upstream' component related (exists outside of VS Code) electron-2.0.x-update electron Issues and items related to Electron linux Issues with VS Code on Linux and removed info-needed Issue requires more information from poster labels Aug 23, 2018
@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 thanks, we should try to reproduce this with a bare Electron to report it to them. Can you:

@bpasero bpasero added the info-needed Issue requires more information from poster label Aug 23, 2018
@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

screenshot from 2018-08-23 10-21-30

Console output:

  1. Saving files to temp directory...
  2. 10:20:48 AM Saved files to /tmp/tmp-4488go5YQINcznA8
  3. 10:20:48 AM Electron v2.0.5 started.
  4. 10:20:49 AM Gtk-Message: 10:20:49.143: GtkDialog mapped without a transient parent. This is discouraged.
  5. 10:20:49 AM (electron:4639): Gtk-WARNING **: 10:20:49.336: Failed to measure available space: The specified location is not supported
  6. 10:20:49 AM( electron:4639): Gtk-WARNING **: 10:20:49.336: Failed to measure available space: The specified location is not supported
  7. 10:20:49 AM (electron:4639): Gtk-WARNING **: 10:20:49.336: Failed to measure available space: The specified location is not supported
  8. 10:20:49 AM (electron:4639): Gtk-WARNING **: 10:20:49.336: Failed to measure available space: The specified location is not supported
  9. 10:20:49 AM (electron:4639): Gtk-WARNING **: 10:20:49.337: Failed to measure available space: The specified location is not supported
  10. 10:20:49 AM (electron:4639): Gtk-WARNING **: 10:20:49.337: Failed to measure available space: The specified location is not supported

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 looks pretty normal to me. Can you:

  • close fiddle
  • start it again
  • add the following line to line 25 of "Main Process" on the left: dialog.showErrorBox("Hello", "World");
  • run it and show a screen shot of that dialog

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero I put it inside the callback, it wasn't rendering anything outside (line 25).

screenshot from 2018-08-23 11-04-35

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 interesting that one looks OK too. Lets try to show the same dialog as the one in code, can you try this dialog instead: dialog.showMessageBox(mainWindow, { title: 'VSCode', message: 'Some message', button: ["Move"] });

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero I commented the rest of the code (same behavior), the button is not showing for some reason

screenshot from 2018-08-23 11-21-56

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 try with this: dialog.showMessageBox(mainWindow, { title: 'VSCode', message: 'Some message', detail: "this is some details", buttons: ["Move", "Cancel"], type: "warning", cancelId: 0 }, function() {})

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero looks fine

screenshot from 2018-08-23 11-47-11

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 ok here is the exact code to reproduce the same dialog:

dialog.showMessageBox(mainWindow, {
  buttons: ["Cancel", "_Move"],
  cancelId: 0,
  checkboxLabel: "Do not ask me again",
  defaultId: 1,
  message: "Are you sure you want to move 'vsc-extension-quickstart.md'?",
  noLink: true,
  title: "Code - OSS Dev",
  type: "question"
}, function () { })

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero dialog shows fine

screenshot from 2018-08-23 12-32-06

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 wow, I am out of ideas on this one. Is there anything logged to VSCode console (run with code --verbose) when the dialog opens?

Does this happen with all dialogs (e.g. try to close a dirty file)?

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

Here is the console when I start code, that might help :

[16397:0823/132212.476507:WARNING:browser_main_loop.cc(275)] Gtk: Locale not supported by C library.
Using the fallback 'C' locale.
[16397:0823/132212.674543:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/entry.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) [16397:0823/132212.675331:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/button.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
[16397:0823/132212.675873:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/button-toolbar.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
libGL error:
unable to load driver: i965_dri.so
libGL error:
driver pointer missing
libGL error:
failed to load driver: i965
libGL error:
unable to load driver: i965_dri.so
libGL error:
driver pointer missing
libGL error:
failed to load driver: i965
libGL error:
unable to load driver: swrast_dri.so
libGL error:
failed to load driver: swrast
[16431:0823/132212.953380:ERROR:gl_context_glx.cc(186)] Failed to create GL context with glXCreateContextAttribsARB.
[16431:0823/132212.953448:ERROR:gpu_info_collector.cc(51)] gl::init::CreateGLContext failed
[16431:0823/132212.953454:ERROR:gpu_info_collector.cc(119)] Could not create context for info collection.
[16431:0823/132212.953465:ERROR:gpu_init.cc(96)] gpu::CollectGraphicsInfo failed (fatal).
[16431:0823/132212.972915:ERROR:gpu_child_thread.cc(252)] Exiting GPU process due to errors during initialization
[16397:0823/132212.978112:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.
[main 1:22:13 PM] Sending env to running instance...
[main 1:22:13 PM] Sent env to running instance. Terminating...
[main 1:22:13 PM] Lifecycle#kill()

screenshot from 2018-08-23 13-23-56

It happens with all dialogs.

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

More logs :
screenshot from 2018-08-23 13-51-19

ESC[90m[main 1:50:46 PM]ESC[0m windowsService#showMessageBox 1
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[19768:0823/135046.951999:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/backdrop-check-unselected.png': Unable to load image-loading module: /usr/l
ib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) [19768:0823/135046.952045:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkCheckButton': invalid matrix (not invertible) [19768:0823/135046.952054:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible) [19768:0823/135046.952060:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible) [19768:0823/135046.952065:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible) [19768:0823/135046.952071:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkMessageDialog': invalid matrix (not invertible) [19768:0823/135046.985482:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/check-unselected.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
[19768:0823/135046.986894:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkCheckButton': invalid matrix (not invertible)
[19768:0823/135046.987664:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible)
[19768:0823/135046.987972:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible)
[19768:0823/135046.987990:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkBox': invalid matrix (not invertible)
[19768:0823/135046.987997:WARNING:browser_main_loop.cc(275)] Gtk: drawing failure for widget 'GtkMessageDialog': invalid matrix (not invertible)

screenshot from 2018-08-23 13-52-02

[19768:0823/135133.139056:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/button-default-focused-hover.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) [19768:0823/135133.450674:WARNING:browser_main_loop.cc(275)] Gtk: Error loading image 'file:///usr/share/themes/Ambiance/gtk-3.0/assets/button-hover.png': Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/core/current/lib/x86_64-linux-gnu/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
[19768:0823/135142.326246:INFO:CONSOLE(1397)] "%cTRACE", source: file:///snap/vscode/51/usr/share/code/resources/app/out/vs/workbench/workbench.main.js (1397)
[19768:0823/135142.349043:WARNING:x11_util.cc(1353)] X error received: serial 5458, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[19768:0823/135142.355870:INFO:CONSOLE(1397)] "%cTRACE", source: file:///snap/vscode/51/usr/share/code/resources/app/out/vs/workbench/workbench.main.js (1397)

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 good one, I think this is because we are using a PNG icon for the dialog and that seems to break the dialog. Can we try that with the electron-fiddle again, this time using an icon:

mainWindow = new BrowserWindow({ width: 800, height: 600, icon: '/home/ticino/Desktop/code.png' })

and the icon being:

code

@HRK44
Copy link
Author

HRK44 commented Aug 23, 2018

@bpasero it works fine with the png icon.

It might have something to do with this issue : https://forum.snapcraft.io/t/skype-exits-when-trying-to-add-a-file-to-a-chat/6138/8

screenshot from 2018-08-23 14-07-47

After further searching, there is this issue, that might be on the same problem.

@bpasero
Copy link
Member

bpasero commented Aug 23, 2018

@HRK44 I believe that issue is rather due to the ArchLinux OS (see #55934).

Would you be able to fix the ZLIB_1.2.9 issue to see if that helps? Sounds like a missing dependency to me?

@HRK44
Copy link
Author

HRK44 commented Aug 24, 2018

@bpasero I tried some stuff but couldn't manage to successfully update this ZLIB without creating a bunch of system issues, if someone with more advanced skills in Linux would try that'd be great.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug snap Issues related to the snap package and removed electron Issues and items related to Electron electron-2.0.x-update info-needed Issue requires more information from poster upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Aug 24, 2018
@Tyriar
Copy link
Member

Tyriar commented Aug 24, 2018

@HRK44 thanks!

FYI @flexiondotorg

@Tyriar Tyriar added install-update VS Code installation and upgrade system issues help wanted Issues identified as good community contribution opportunities labels Aug 24, 2018
@Tyriar Tyriar added this to the Backlog milestone Aug 24, 2018
@lucyllewy
Copy link

For reference, the issue is not due to an incorrect zlib version suggested above. The problem is due to the snap accidentally referencing system libraries instead of it's own. This manifests with vscode loading the libgdk-pixbuf-loader library from the system, which is compiled against a different zlib than the one within the snap's files. The solution, therefore, is not to mess about trying to change the zlib version but to determine why it is using the system libraries in the first place.

I'll try to look at it tomorrow, or @popey or @flexiondotorg might beat me to it.

@anied
Copy link

anied commented Feb 11, 2019

Any chance on getting a status update on this issue? I am facing the same thing. It would be no great hardship to try HRK44's solution but if there's any hope of seeing this resolved in the near-term I'd just as soon stick with the snap.

@bdaase
Copy link

bdaase commented Mar 20, 2019

Today, I got VSCode version 1.32.3 (via Snap!) and the bug seems to be fixed!

@sdc395
Copy link

sdc395 commented Mar 21, 2019

Whereas 1.32.3 is the first version I've noticed has this problem. I reverted to 1.31.1 (I'm using Snap, by the way) and the problem went away. I then refreshed back to 1.32.3 and the problem returned.

Name    Version            Rev   Tracking  Publisher     Notes
core    16-2.37.4          6531  stable    canonical✓    core
vscode  1.32.3-1552606978  89    stable    snapcrafters  classic

@joaomoreno
Copy link
Member

Thanks to @flexiondotorg, this is now fixed in master! #70884

@joaomoreno joaomoreno modified the milestones: Backlog, March 2019 Mar 25, 2019
joaomoreno added a commit that referenced this issue Mar 25, 2019
@bpasero bpasero added the verified Verification succeeded label Mar 27, 2019
@ghost
Copy link

ghost commented Apr 11, 2019

Still broken having removed Snapcrafter's vscode snap and installed code 1.33. :-(

@vscodebot vscodebot bot locked and limited conversation to collaborators May 9, 2019
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Adds the PPA for the GNOME 3.26 framework which is maintained by the Ubuntu Desktop team.

This PPA includes GTK3 and GNOME3 components used to create the GNOME 3.26 Framework snap for Ubuntu 16.04.

  * Fixes:  microsoft#63194
  * Fixes:  microsoft#57019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux snap Issues related to the snap package verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants