Mathieu
Mathieu

Reputation: 1713

Gdk-CRITICAL exceptions on a Flutter Desktop app, linux

I am trying to launch my Flutter app on Linux, as a desktop app.
It already worked before, but now I have this error at launch :

WARNING **: 08:21:24.318: Failed to start Flutter engine: Failed to create EGL surface using configuration (EGL_CONFIG_ID=1 EGL_BUFFER_SIZE=32 EGL_COLOR_BUFFER_TYPE=EGL_RGB_BUFFER EGL_TRANSPARENT_TYPE=EGL_NONE EGL_LEVEL=0 EGL_RED_SIZE=8 EGL_GREEN_SIZE=8 EGL_BLUE_SIZE=8 EGL_ALPHA_SIZE=8 EGL_DEPTH_SIZE=0 EGL_STENCIL_SIZE=0 EGL_SAMPLES=0 EGL_SAMPLE_BUFFERS=0 EGL_NATIVE_VISUAL_ID=0x24 EGL_NATIVE_VISUAL_TYPE=0x4 EGL_NATIVE_RENDERABLE=EGL_TRUE EGL_CONFIG_CAVEAT=EGL_NONE EGL_BIND_TO_TEXTURE_RGB=EGL_TRUE EGL_BIND_TO_TEXTURE_RGBA=EGL_TRUE EGL_RENDERABLE_TYPE=EGL_OPENGL_ES_BIT|EGL_OPENGL_ES2_BIT|EGL_OPENGL_BIT|EGL_OPENGL_ES3_BIT EGL_CONFORMANT=EGL_OPENGL_ES_BIT|EGL_OPENGL_ES2_BIT|EGL_OPENGL_BIT|EGL_OPENGL_ES3_BIT EGL_SURFACE_TYPE=EGL_PBUFFER_BIT|EGL_PIXMAP_BIT|EGL_WINDOW_BIT EGL_MAX_PBUFFER_WIDTH=4096 EGL_MAX_PBUFFER_HEIGHT=4096 EGL_MAX_PBUFFER_PIXELS=0 EGL_MIN_SWAP_INTERVAL=0 EGL_MAX_SWAP_INTERVAL=1000): Success

The strange thing is that it is written "success" at the end.
The launched app looks like this :

Blank window

I had another error before with cmake before, I solved it but it might be linked : I moved my project directory to somewhere else and cmake was complaining about the CMakeCache.txt path or something, and would not compile I removed build folder and it allowed me to compile, but then I got this error at launch.

My environment : I am working on Debian 10,
Flutter 1.20.0-3.0.pre.126,
Dart 2.9.0 (build 2.9.0-20.0.dev 8afe9875a6),
cmake version 3.13.4,

EDIT :

I just ran flutter upgrade and now I have following specs :

Flutter 1.20.0-3.0.pre.193
Dart 2.9.0 (build 2.9.0-21.0.dev 06cb010247)

I re-ran the app, and now I have these errors :

(digital_accountant:28838): GLib-GObject-WARNING **: 16:43:42.961: invalid cast from 'GdkWaylandScreen' to 'GdkX11Screen'

(digital_accountant:28838): Gdk-CRITICAL **: 16:43:42.961: gdk_visual_get_screen: assertion 'GDK_IS_VISUAL (visual)' failed

(digital_accountant:28838): Gdk-CRITICAL **: 16:43:42.961: gdk_window_new: assertion 'gdk_visual_get_screen (attributes->visual) == screen' failed

(digital_accountant:28838): Gtk-CRITICAL **: 16:43:42.961: gtk_widget_register_window: assertion 'GDK_IS_WINDOW (window)' failed

(digital_accountant:28838): GLib-GObject-CRITICAL **: 16:43:42.961: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

Thanks

Upvotes: 0

Views: 3697

Answers (1)

Siyah Prens
Siyah Prens

Reputation: 36

Disable to wayland.

On fedora:

$ sudo nano /etc/gdm/custom.conf 

uncomment var:

#WaylandEnable=false

and restart gnome:

sudo systemctl restart gdm

And then change session screen, "wayland" or "Xorg".

Upvotes: 2

Related Questions