Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3158

Moodle Desktop shows blank/transparent screen on Linux when using certain GTK+ themes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.1
    • Fix Version/s: None
    • Component/s: Electron
    • Labels:
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      Hi, I am using Elementary OS Juno which is based on Ubuntu 18.04 LTS. I downloaded the Moodle Desktop AppImage (3.7.0.472) from https://download.moodle.org/desktop. But when I open it, I can only 'see' a transparent window. I can see it in the dock, I can Alt+Tab to it and it gets focus when I do that (I can see it if I use my screenshot tool to capture active window). However the window remains transparent.

      System specification

      Elementary OS Juno x64
      elementary GTK+ theme (default)
      [AppImageLauncher |https://github.com/TheAssassin/AppImageLauncher]

      Steps to reproduce

      1. Double-click the AppImage
      2. Run Once / Integrate and Run 

      Logs

      These are the output when I run the AppImage via terminal:

       
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.363: Unable to load resource for composite template for type 'GtkDialog': The resource at “/org/gtk/libgtk/ui/gtkdialog.ui” failed to decompress
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.363: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.363: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.364: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.364: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed
      (AppImageLauncher:29344): Gtk-CRITICAL **: 09:18:47.364: gtk_widget_class_bind_template_callback_full: assertion 'widget_class->priv->template != NULL' failed
      
      

       

      Hotfixes that worked for me

      1. Switching GTK+ theme to anything else 

                  - I can switch back to elementary without issues once the window appears.

                  - It seems that switching theme redraws the window.

                  - However on the Arc and Adwaita theme, the issue does occur at all. The window loads fine on first run. 

                  - The error messages are shown even for the Arc/Adwaita theme where the issue does not occur.

              2. Un-maximizing the window (I have hot corners enabled. Thus, I could toggle maximise eventhough the window is invisible)

                  - This seems to redraw the window as well.

       

      Troubleshooting

      1. Ran the Moodle Desktop AppImage using different GTK+ themes

                  Works: Arc, Adwaita

                  Does not work: Elementary, High Contrast

              2. Built the Moodle Desktop app from [source|https://github.com/moodlehq/moodlemobile2] as a Debian package as well as AppImage. Both of them failed to open (invisible) when using GTK+ themes from above.The hotfixes worked for both.

              3. Tested on a fresh user with and without AppImageLauncher installed. The issue remains the same. And the hotfixes work.

      The issue seems to only affect certain GTK+ themes but since we cannot control what themes users will use, I suppose we should force a redraw through Electron?

       

      Resolution

      I sort of fixed it by commenting out line 57 in desktop/electron.js

      mainWindow.maximize();

      I'm not sure if there would be any repercussions from doing that but I'd be happy to test any other possible fixes.

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: