Public bug reported:

Ubuntu release: Ubuntu 26.04.1 LTS
GNOME Shell: 50.1
Session: Wayland
Package: gnome-shell-extension-user-theme
Package version: [paste the installed version from apt-cache policy]

The User Themes extension fails when selecting a shell theme or resetting
the theme name to the default/empty value.

Steps to reproduce:
1. Enable [email protected].
2. Set the "name" setting in org.gnome.shell.extensions.user-theme to an
   installed shell theme, or clear it to return to the default theme.
3. Observe that the extension enters ERROR state.

Expected result:
The selected user stylesheet is loaded, or the extension returns to the
default Ubuntu/Yaru shell styling without an error.

Actual result:
The extension enters ERROR state. The journal reports:
"Error: Argument file may not be null"
with a stack involving loadTheme() and _changeTheme() in the User Themes
extension.

The old code path calls Main.setThemeStylesheet(path_or_null) followed by
Main.loadTheme(). In this GNOME Shell 50.1 setup, the reload path fails.

Suggested compatibility approach:
For GNOME Shell 50+, load the selected user stylesheet into the active
St.Theme obtained from St.ThemeContext.get_for_stage(global.stage).get_theme()
using theme.load_stylesheet(Gio.File), and remove it with
theme.unload_stylesheet(Gio.File) when the setting changes or the extension
is disabled. Preserve the existing Ubuntu/Yaru stylesheet. Handle empty,
missing, and valid theme names.

A local user-scoped compatibility copy using this approach became ACTIVE
on GNOME Shell 50.1, and the selected stylesheet was logged as loaded.
This is a proposed compatibility fix, not an upstream-confirmed solution.

I can provide the full journal excerpt and a minimal patch if useful:
command: journalctl --user -b --no-pager | rg -n -C 8 'Argument file may not be 
null'
filtered output:
gnome-shell[5019]: loading default theme (Adwaita)
gnome-shell[5019]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[5019]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[5019]: Extension 
[email protected]: Error: Argument file may 
not be null
Stack trace:
loadTheme@resource:///org/gnome/shell/ui/main.js:705:19
_changeTheme@file:///usr/share/gnome-shell/extensions/[email protected]/extension.js:56:14
enable@file:///usr/share/gnome-shell/extensions/[email protected]/extension.js:23:14
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:266:38
async*_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:598:24
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:694:18
EnableExtension@resource:///org/gnome/shell/ui/shellDBus.js:474:38
_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:379:29
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:448:34
@resource:///org/gnome/shell/ui/init.js:20:20
gnome-shell[5019]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[5019]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[5019]: JS ERROR: Error: Argument file may not be null
loadTheme@resource:///org/gnome/shell/ui/main.js:705:19
_changeTheme@file:///usr/share/gnome-shell/extensions/[email protected]/extension.js:56:14
@resource:///org/gnome/shell/ui/init.js:20:20

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: gnome-shell-extension-user-theme 50.0-1
ProcVersionSignature: Ubuntu 7.0.0-43.43-generic 7.0.14
Uname: Linux 7.0.0-43-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Thu Nov 19 21:49:07 2026
InstallationDate: Installed on 2022-01-26 (1758 days ago)
InstallationMedia: Ubuntu 18.04.6 LTS "Bionic Beaver" - Release amd64 (20210915)
PackageArchitecture: all
SourcePackage: gnome-shell-extensions
UpgradeStatus: Upgraded to resolute on 2026-05-15 (188 days ago)

** Affects: gnome-shell-extensions (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175087

Title:
  User Themes extension fails on GNOME Shell 50.1 when loading or
  resetting a shell theme

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extensions/+bug/2175087/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to