Error "Could not get seat for session" is not propagated properly to the top.
When mutter cannot get a seat, a local error is generated:
Could not get seat for session: No data available
But this error never makes it upward in the stack.
It causes mutter to report on stderr:
Failed to setup: (null)
Which is not a helpful message.
This all happens despite a call to g_propagate_error(error, local_error)
meta_launcher_new (fallback_session_id=0x0, fallback_seat_id=0x0, error=0x7fffffffe088) at ../src/backends/native/meta-launcher.c:385
385 session_proxy = get_session_proxy (fallback_session_id, NULL, error);
(gdb) n
386 if (!session_proxy)
(gdb) n
389 if (!meta_dbus_login1_session_call_take_control_sync (session_proxy,
(gdb) l
384
385 session_proxy = get_session_proxy (fallback_session_id, NULL, error);
386 if (!session_proxy)
387 goto fail;
388
389 if (!meta_dbus_login1_session_call_take_control_sync (session_proxy,
390 FALSE,
391 NULL,
392 error))
393 {
(gdb) l
394 g_prefix_error (error, "Could not take control: ");
395 goto fail;
396 }
397
398 have_control = TRUE;
399
400 seat_id = get_seat_id (&local_error);
401 if (!seat_id)
402 {
403 if (fallback_seat_id)
(gdb) n
398 have_control = TRUE;
(gdb) n
400 seat_id = get_seat_id (&local_error);
(gdb) n
401 if (!seat_id)
(gdb) n
403 if (fallback_seat_id)
(gdb) l
398 have_control = TRUE;
399
400 seat_id = get_seat_id (&local_error);
401 if (!seat_id)
402 {
403 if (fallback_seat_id)
404 {
405 meta_topic (META_DEBUG_BACKEND,
406 "Failed to get seat ID: %s, using fallback (%s)",
407 local_error->message, fallback_seat_id);
(gdb) print seat_id
$4 = 0x0
(gdb) print fallback_seat_id
$5 = 0x0
(gdb) n
413 g_propagate_error (error, local_error);
(gdb) print local_error
$6 = (GError_autoptr) 0x555555574370
(gdb) print* local_error
$7 = {domain = 199, code = 1,
message = 0x555555628f50 "Could not get seat for session: No data available"}
(gdb) n
414 goto fail;
(gdb) n
433 if (have_control)
(gdb) n
435 meta_dbus_login1_session_call_release_control_sync (session_proxy,
(gdb) n
438 return NULL;
(gdb) n
382 g_autofree char *seat_id = NULL;
(gdb) n
381 g_autoptr (GError) local_error = NULL;
(gdb) n
380 g_autoptr (MetaDbusLogin1Seat) seat_proxy = NULL;
(gdb) n
379 g_autoptr (MetaDbusLogin1Session) session_proxy = NULL;
(gdb) n
439 }
(gdb) n
meta_backend_native_initable_init (initable=0x7fffe400a640, cancellable=0x0, error=0x7fffffffe088) at ../src/backends/native/meta-backend-native.c:792
792 native->launcher = meta_launcher_new (session_id, seat_id, error);
(gdb) n
793 if (!native->launcher)
(gdb) print native->launcher
$8 = (MetaLauncher *) 0x0
(gdb) print error
$9 = (GError **) 0x7fffffffe088
(gdb) print* error
$10 = (GError *) 0x555555574370
(gdb) print** error
$11 = {domain = 1431962272, code = 21845, message = 0x0}