-
-
Notifications
You must be signed in to change notification settings - Fork 564
Description
Description
The custom Waybar Spotify module stopped working after a system update. The module is properly configured and the script executes successfully when run manually, but Waybar refuses to display it. Other Waybar layouts (default HyDE configurations) show Spotify information correctly, indicating the issue is specific to custom layout configurations.
Key Point: Even a simple test module with hardcoded text output fails to display, suggesting a deeper issue with custom module rendering in this layout configuration.
Steps to Reproduce
- Configure custom Waybar layout with the following structure:
- Use
group/pill#leftgrouping - Add
"custom/spotify"to the modules array
- Use
- Define the custom module in
~/.config/waybar/config.jsonc:
"custom/spotify": {
"exec": "/usr/bin/python3 /home/bbook/.local/lib/hyde/mediaplayer.py",
"return-type": "json",
"format": "{}"
}- Ensure module is listed in modules array:
"modules": ["cpu", "memory", "wlr/taskbar", "custom/spotify"]- Restart Waybar:
killall waybar && waybar & - Observe that the custom/spotify module does not appear anywhere in the bar
Also tested simplified version:
"custom/spotify": {
"exec": "echo '{\"text\":\"🎵 TEST\"}'",
"return-type": "json",
"format": "{}"
}This also fails to display.
Expected Behavior
The Waybar Spotify module should display currently playing track information from Spotify/Spicetify and other additional infos.
Actual Behavior
Nothing displays - the custom/spotify module is completely invisible:
- No text appears in the bar
- No space allocated for the module
- Module acts as if it doesn't exist
- Other modules (cpu, memory, taskbar) display correctly in the same group
Script verification (works perfectly when run manually):
$ /usr/bin/python3 /home/bbook/.local/lib/hyde/mediaplayer.py
{"text": "\uf001\u2004\u2004<i>Coldplay</i>\u2004\uf444 <b>Yellow</b>", "class": "custom-spotify", "alt": "spotify", "tooltip": "<span foreground=\"#FFFFFF\"><b>Yellow</b></span>\n<span foreground=\"#B8AAF0\"><i>Coldplay</i>
# Continues outputting JSON every secondSimplified test also works when run manually:
$ echo '{"text":"🎵 TEST"}'
{"text":"🎵 TEST"} # Valid JSON outputYet Waybar doesn't display either of them.
Waybar logs show:
(waybar:1364020): GLib-GObject-CRITICAL **: 17:39:13.059: invalid (NULL) pointer instance
(waybar:1364020): GLib-GObject-CRITICAL **: 17:39:13.059: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
[2026-01-27 17:39:13.155] [error] spotify stopped unexpectedly, is it endless?
Despite the script running successfully when executed directly.
Screenshots
Environment
Additional Information
Timeline
- Before update: Custom Spotify module worked perfectly in this exact configuration
- After update: Module completely stopped displaying (exact package/date unknown, but recent)
- Current status: Script works, config is valid, but Waybar won't render the module
Exhaustive Troubleshooting Attempts
✅ Verified Script Works
- Runs without errors when executed directly
- Outputs valid, continuous JSON stream
python-gobjectdependency installed and working (import gisucceeds)- playerctl installed and functional
✅ Tried Multiple Module Configurations
Path variations (ALL FAILED):
- Original relative path:
mediaplayer.py - Home directory path:
~/.local/lib/hyde/mediaplayer.py - Absolute path:
/home/bbook/.local/lib/hyde/mediaplayer.py - Full explicit paths with interpreter:
"exec": "/usr/bin/python3 /home/bbook/.local/lib/hyde/mediaplayer.py"(Specifically tried this thinking path resolution was the issue - FAILED)
Parameter combinations tried (ALL FAILED):
- With
"return-type": "json" - With
"restart-interval": 5"(incorrect parameter) - With
"interval": 1 - Without any interval (streaming output)
- With
"escape": true - Various
"format"strings
Module placement attempts (ALL FAILED):
- Added to
group/pill#leftmodules array - Tried adding to
group/pill#rightmodules array - Tried different positions in the modules array
Simplified test (ALSO FAILED):
"custom/spotify": {
"exec": "echo '{\"text\":\"🎵 TEST\"}'",
"return-type": "json",
"format": "{}"
}Even this trivial hardcoded test fails to display, ruling out any script-specific issues.
✅ Config Structure Verified
- Module properly defined in main config file
- Module name added to
modulesarray:["cpu", "memory", "wlr/taskbar", "custom/spotify"] - JSON syntax validated with
jq .(no parsing errors) - Config includes work correctly (other modules from includes display fine)
- Restarted Waybar multiple times after each change
- Tried defining module both inline and in separate include files
✅ Comparison Testing
- Default HyDE Waybar layouts: Spotify displays correctly ✅
- Other default Waybar configs: Show Spotify info perfectly ✅
- This custom layout: Spotify doesn't display at all ❌
- Other custom modules in same config: Work fine ✅
custom/cpuinfo- workscustom/gpuinfo- workscustom/swaync- workscustom/hyde-menu- workscustom/power- works
- Only custom/spotify is invisible in this specific layout
Critical Observations
-
Path specification doesn't matter:
- Tried relative paths
- Tried
~expansion paths - Tried absolute paths (
/home/bbook/...) - Tried full interpreter + script paths (
/usr/bin/python3 /home/bbook/...) - ALL FAILED identically - no difference in behavior
-
Even trivial test fails:
"exec": "echo '{\"text\":\"🎵 TEST\"}'"This completely rules out ANY script-specific issues (dependencies, permissions, execution, JSON format, etc.). The problem is with Waybar's module rendering itself.
-
Other custom modules work in same config:
- Multiple other
custom/*modules work fine - They use similar JSON output formats
- They're in the same config file
- Only
custom/spotifyspecifically doesn't render
This proves custom modules CAN work in this config, but something specifically breaks when the module is named
custom/spotify. - Multiple other
-
Works in other Waybar configs:
- Default HyDE layouts show Spotify perfectly
- Same script, same system, different config file
- Suggests issue is configuration-specific, not system-wide
Current Config Structure
{
"layer": "top",
"output": ["*"],
"height": 10,
"exclusive": true,
"passthrough": false,
"reload_style_on_change": true,
"include": [
"$XDG_CONFIG_HOME/waybar/modules/*json*",
"$XDG_CONFIG_HOME/waybar/includes/includes.json"
],
"modules-left": ["group/pill#left"],
"group/pill#left": {
"orientation": "inherit",
"modules": ["cpu", "memory", "wlr/taskbar", "custom/spotify"]
},
"modules-center": ["group/pill#center"],
"group/pill#center": {
"orientation": "inherit",
"modules": ["idle_inhibitor", "clock"]
},
"modules-right": ["group/pill#right"],
"group/pill#right": {
"orientation": "inherit",
"modules": [
"privacy", "tray", "network", "custom/bluetooth",
"pulseaudio#microphone", "battery",
"custom/gpuinfo", "custom/cpuinfo",
"custom/swaync", "custom/hyde-menu", "custom/power"
]
},
"custom/spotify": {
"exec": "/usr/bin/python3 /home/bbook/.local/lib/hyde/mediaplayer.py",
"return-type": "json",
"format": "{}"
}
}I'm completely stuck. The script works, the config looks correct, other modules work, but this specific module just won't display. Any help would be greatly appreciated!