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

Starting example on a KDE Linux: "MissingPluginException: No implementation found for method init on channel yaru_window" #903

Open
metaleap opened this issue May 27, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@metaleap
Copy link

On Garuda Linux (Arch-deriv distro) with KDE and all deps installed needed for GTK 2-4 apps:

I F5 up the example/lib/main.dart in my fully-setup-and-functioning-for-Flutter VSCodium and the exception MissingPluginException (MissingPluginException(No implementation found for method init on channel yaru_window)) comes up in the first main line, namely:

Future<void> main() async {
  await YaruWindowTitleBar.ensureInitialized();

The good news: I can remove that line and the app runs fine, of course without the fancy replacement title bar.

So as far as my needs go, you can Close this Issue anytime! But now it's here for whoever else may run into this and search for it. Plus you may be interested what might happen on (certain) Linux-but-non-Ubuntu/non-Gnome native runs =)

I'd be curious, too, to learn what exactly might be missing in my local Linux setup!

Here's the full Debug Console output:

Launching lib/main.dart on Linux in debug mode...
✓ Built build/linux/x64/debug/bundle/yaru_example

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): Gtk-CRITICAL **: 10:37:59.133: gtk_widget_get_toplevel: assertion 'GTK_IS_WIDGET (widget)' failed

(yaru_example:26255): Gtk-CRITICAL **: 10:37:59.133: gtk_window_get_screen: assertion 'GTK_IS_WINDOW (window)' failed

(yaru_example:26255): Gdk-CRITICAL **: 10:37:59.133: gdk_screen_is_composited: assertion 'GDK_IS_SCREEN (screen)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.133: g_signal_handler_find: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.133: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: invalid (NULL) pointer instance

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

(yaru_example:26255): Gtk-CRITICAL **: 10:37:59.134: gtk_container_forall: assertion 'GTK_IS_CONTAINER (container)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

(yaru_example:26255): GLib-GObject-CRITICAL **: 10:37:59.134: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: FlEventChannel *fl_event_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: void fl_event_channel_set_stream_handlers(FlEventChannel *, FlEventChannelHandler, FlEventChannelHandler, gpointer, GDestroyNotify): assertion 'FL_IS_EVENT_CHANNEL(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.134: void fl_engine_send_window_metrics_event(FlEngine *, size_t, size_t, double): assertion 'FL_IS_ENGINE(self)' failed

** (yaru_example:26255): CRITICAL **: 10:37:59.220: void fl_method_channel_invoke_method(FlMethodChannel *, const gchar *, FlValue *, GCancellable *, GAsyncReadyCallback, gpointer): assertion 'FL_IS_METHOD_CHANNEL(self)' failed

Connecting to VM Service at ws://127.0.0.1:38201/TNG1E9QNSXM=/ws
@metaleap metaleap changed the title Starting example on Linux: "MissingPluginException: No implementation found for method init on channel yaru_window" Starting example on a KDE Linux: "MissingPluginException: No implementation found for method init on channel yaru_window" May 27, 2024
@Feichtmeier
Copy link
Member

Feichtmeier commented May 27, 2024

yes this is a problem with the recent flutter update in stable to 3.22, see
flutter/flutter#144873
let's keep it open to have this visible outside of discord, because this prevents any yaru.dart app that uses yaruwindow/yaruwindowtitlebar from running with 3.22
CC @robert-ancell @d-loose @spydon

(as a local fix you can switch to flutter 3.19.5)

@d-loose
Copy link
Member

d-loose commented Jun 17, 2024

I don't have the time and knowledge to figure out if and how this can be fixed in handy_window.dart, which is the root of this issue.
A trivial fix would be removing handy_window and reverting the my_application.cc changes to match the default flutter template for linux:

diff --git a/example/linux/my_application.cc b/example/linux/my_application.cc
index 0689a240..6257fa03 100644
--- a/example/linux/my_application.cc
+++ b/example/linux/my_application.cc
@@ -53,16 +53,16 @@ static void my_application_activate(GApplication* application) {
   gtk_window_set_geometry_hints(window, nullptr, &geometry_min, GDK_HINT_MIN_SIZE);
 
   gtk_window_set_default_size(window, 700, 720);
+  gtk_widget_show(GTK_WIDGET(window));
 
   g_autoptr(FlDartProject) project = fl_dart_project_new();
   fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
 
   FlView* view = fl_view_new(project);
+  gtk_widget_show(GTK_WIDGET(view));
   gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
 
   fl_register_plugins(FL_PLUGIN_REGISTRY(view));
-  gtk_widget_show(GTK_WIDGET(view));
-  gtk_widget_show(GTK_WIDGET(window));
   gtk_widget_grab_focus(GTK_WIDGET(view));
 }
 
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index afdf5a1c..9a6d90b2 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -13,7 +13,6 @@ dependencies:
   flutter:
     sdk: flutter
   flutter_highlight: ^0.7.0
-  handy_window: ^0.3.1
   http: ^1.1.0
   path: ^1.8.3
   provider: ^6.0.2

We'd lose the rounded corners, though (I'm not sure why the top corners are affected as well):

image

@Feichtmeier
Copy link
Member

I don't have the time and knowledge to figure out if and how this can be fixed in handy_window.dart, which is the root of this issue. A trivial fix would be removing handy_window and reverting the my_application.cc changes to match the default flutter template for linux:

diff --git a/example/linux/my_application.cc b/example/linux/my_application.cc
index 0689a240..6257fa03 100644
--- a/example/linux/my_application.cc
+++ b/example/linux/my_application.cc
@@ -53,16 +53,16 @@ static void my_application_activate(GApplication* application) {
   gtk_window_set_geometry_hints(window, nullptr, &geometry_min, GDK_HINT_MIN_SIZE);
 
   gtk_window_set_default_size(window, 700, 720);
+  gtk_widget_show(GTK_WIDGET(window));
 
   g_autoptr(FlDartProject) project = fl_dart_project_new();
   fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
 
   FlView* view = fl_view_new(project);
+  gtk_widget_show(GTK_WIDGET(view));
   gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
 
   fl_register_plugins(FL_PLUGIN_REGISTRY(view));
-  gtk_widget_show(GTK_WIDGET(view));
-  gtk_widget_show(GTK_WIDGET(window));
   gtk_widget_grab_focus(GTK_WIDGET(view));
 }
 
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index afdf5a1c..9a6d90b2 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -13,7 +13,6 @@ dependencies:
   flutter:
     sdk: flutter
   flutter_highlight: ^0.7.0
-  handy_window: ^0.3.1
   http: ^1.1.0
   path: ^1.8.3
   provider: ^6.0.2

We'd lose the rounded corners, though (I'm not sure why the top corners are affected as well):

image

This would be a real visual downgrade :(

@robert-ancell could you help us out here? 🙏

@d-loose
Copy link
Member

d-loose commented Jul 26, 2024

We'd lose the rounded corners, though

Some YaruWindow functionality depends on that as well, as pointed out above (e.g. registering an onClosed handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants