Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

No json crash with Hyprland

Open NobodyForNothing opened this issue 2 months ago • 5 comments

I'm using the hyprland/workspaces module with the following config:

"hyprland/workspaces": {
     "format": "{id}"
},

I'm not sure what triggers this, but sometimes (randomly ?) the entire waybar crashes with it. It prints the following message in the log:

[2024-05-01 20:02:35.208] [error] Hyprland IPC: Couldn't write (4)
[2024-05-01 20:02:35.208] [error] hyprland/workspaces: Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.

NobodyForNothing avatar May 01 '24 18:05 NobodyForNothing

Can you try to run waybar with the -l trace argument? This should give more info about what happens before the crash.

Which Hyprland and Waybar versions are you running?

zjeffer avatar May 01 '24 20:05 zjeffer

This happening to me too. I am on Nixos (24.05), waybar is on version v0.10.2.

[2024-05-02 08:59:45.196] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config.jsonc
[2024-05-02 08:59:45.196] [debug] Try expanding: $HOME/.config/waybar/config
[2024-05-02 08:59:45.196] [debug] Found config file: $HOME/.config/waybar/config
[2024-05-02 08:59:45.196] [info] Using configuration file /home/nathannix/.config/waybar/config
[2024-05-02 08:59:45.199] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style.css
[2024-05-02 08:59:45.199] [debug] Try expanding: $HOME/.config/waybar/style.css
[2024-05-02 08:59:45.199] [debug] Found config file: $HOME/.config/waybar/style.css
[2024-05-02 08:59:45.199] [info] Using CSS file /home/nathannix/.config/waybar/style.css
[2024-05-02 08:59:45.206] [debug] Output detection done: eDP-1 (BOE 0x0819)
[2024-05-02 08:59:45.211] [debug] window-rewrite is not defined or is not an object, using default rules.
[2024-05-02 08:59:45.211] [info] Hyprland IPC starting
[2024-05-02 08:59:45.212] [error] Hyprland IPC: Unable to connect?
[2024-05-02 08:59:45.212] [error] Hyprland IPC: Couldn't connect to /tmp/hypr/ed58cc4c31c21e09ee780d0df818afe935181cd9_1714615262_233001966/.socket.sock. (3)
[2024-05-02 08:59:45.212] [warning] module hyprland/workspaces: Disabling module "hyprland/workspaces", Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.

[2024-05-02 08:59:45.213] [error] Hyprland IPC: Couldn't connect to /tmp/hypr/ed58cc4c31c21e09ee780d0df818afe935181cd9_1714615262_233001966/.socket.sock. (3)
[2024-05-02 08:59:45.213] [error] hyprland language initLanguage failed with basic_string::substr: __pos (which is 7) > this->size() (which is 0)
[2024-05-02 08:59:45.271] [debug] GTK widget tree:
window#waybar..background.top.eDP-1.mode-default:dir(ltr)
  decoration:dir(ltr)
  box.horizontal:dir(ltr)
    box.horizontal.modules-left:dir(ltr)
      widget:dir(ltr)
        label#custom-launcher.module:dir(ltr)
      widget:dir(ltr)
        label#custom-playerctl.backward.module:dir(ltr)
      widget:dir(ltr)
        label#custom-playerctl.play.module:dir(ltr)
      widget:dir(ltr)
        label#custom-playerctl.forward.module:dir(ltr)
      widget:dir(ltr)
        box#tray.horizontal.module:dir(ltr)
    box.horizontal.modules-center:dir(ltr)
    box.horizontal.modules-right:dir(ltr)
      widget:dir(ltr)
        label#cpu.module:dir(ltr)
      widget:dir(ltr)
        label#memory.module:dir(ltr)
      widget:dir(ltr)
        label#language.module:dir(ltr)
      widget:dir(ltr)
        label#pulseaudio.module:dir(ltr)
      widget:dir(ltr)
        label#backlight.module:dir(ltr)
      widget:dir(ltr)
        label#battery.module:dir(ltr)
      widget:dir(ltr)
        label#clock.module:dir(ltr)

[2024-05-02 08:59:45.385] [info] Bar configured (width: 1920, height: 47) for output: eDP-1
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.AttentionAccessibleDesc = ''
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.AttentionIconName = ''
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.Category = 'SystemServices'
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.IconAccessibleDesc = 'Wi-Fi network connection “KAM-2” active: KAM-2 (54%)'
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.IconName = 'nm-signal-75'
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.IconThemePath = ''
[2024-05-02 08:59:45.394] [trace] Set tray item property: :1.9.Id = 'nm-applet'
[2024-05-02 08:59:45.394] [trace] Set tray item property: nm-applet.Menu = '/org/ayatana/NotificationItem/nm_applet/Menu'
[2024-05-02 08:59:45.395] [trace] Set tray item property: nm-applet.Status = 'Active'
[2024-05-02 08:59:45.395] [trace] Set tray item property: nm-applet.Title = 'Network'
[2024-05-02 08:59:45.395] [trace] Set tray item property: nm-applet.XAyatanaLabel = ''
[2024-05-02 08:59:45.395] [trace] Set tray item property: nm-applet.XAyatanaLabelGuide = ''
[2024-05-02 08:59:45.395] [trace] Set tray item property: nm-applet.XAyatanaOrderingIndex = 0
[2024-05-02 08:59:45.415] [trace] Set tray item property: :1.50.AttentionIconName = ''
[2024-05-02 08:59:45.415] [trace] Set tray item property: :1.50.AttentionIconPixmap = []
[2024-05-02 08:59:45.416] [trace] Set tray item property: :1.50.AttentionMovieName = ''
[2024-05-02 08:59:45.416] [trace] Set tray item property: :1.50.Category = 'ApplicationStatus'
[2024-05-02 08:59:45.416] [trace] Set tray item property: :1.50.IconName = 'telegram-panel'
[2024-05-02 08:59:45.416] [trace] Set tray item property: :1.50.IconPixmap = a(iiay)
[2024-05-02 08:59:45.416] [trace] Set tray item property: :1.50.Id = 'TelegramDesktop'
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.ItemIsMenu = false
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.Menu = '/MenuBar'
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.OverlayIconName = ''
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.OverlayIconPixmap = []
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.Status = 'Active'
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.Title = 'TelegramDesktop'
[2024-05-02 08:59:45.416] [trace] Set tray item property: TelegramDesktop.ToolTip = ('', [], 'Telegram Desktop', '')
[2024-05-02 08:59:45.421] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.AttentionIconName = ''
[2024-05-02 08:59:45.421] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.AttentionIconPixmap = []
[2024-05-02 08:59:45.421] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.AttentionMovieName = ''
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.Category = 'ApplicationStatus'
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.IconName = ''
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.IconPixmap = a(iiay)
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2728-2.Id = 'ViberPC'
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.ItemIsMenu = false
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.Menu = '/MenuBar'
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.OverlayIconName = ''
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.OverlayIconPixmap = []
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.Status = 'Active'
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.Title = 'ViberPC'
[2024-05-02 08:59:45.422] [trace] Set tray item property: ViberPC.ToolTip = ('', [], 'Viber ', '')
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.AttentionIconName = ''
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.AttentionIconPixmap = []
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.AttentionMovieName = ''
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.Category = 'SystemServices'
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.IconName = 'zero-trust-disconnected'
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.IconPixmap = a(iiay)
[2024-05-02 08:59:45.422] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.IconThemePath = ''
[2024-05-02 08:59:45.423] [trace] Set tray item property: org.kde.StatusNotifierItem-2779-1.Id = 'zero-trust-client'
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.ItemIsMenu = false
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.Menu = '/MenuBar'
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.OverlayIconName = ''
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.OverlayIconPixmap = []
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.Status = 'Active'
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.Title = 'Zero Trust `Client'``
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.ToolTip = ('', [], '', '')
[2024-05-02 08:59:45.423] [trace] Set tray item property: zero-trust-client.WindowId = 0
[2024-05-02 08:59:46.556] [trace] Set tray item property: :1.104.Category = 'Hardware'
[2024-05-02 08:59:46.556] [trace] Set tray item property: :1.104.IconName = 'blueman-tray'
[2024-05-02 08:59:46.556] [trace] Set tray item property: :1.104.Id = 'blueman'
[2024-05-02 08:59:46.556] [trace] Set tray item property: blueman.ItemIsMenu = false
[2024-05-02 08:59:46.556] [trace] Set tray item property: blueman.Menu = '/org/blueman/sni/menu'
[2024-05-02 08:59:46.556] [trace] Set tray item property: blueman.Status = 'Active'
[2024-05-02 08:59:46.556] [trace] Set tray item property: blueman.Title = 'blueman'
[2024-05-02 08:59:46.556] [trace] Set tray item property: blueman.ToolTip = ('', [], 'Bluetooth Enabled', '')```

RustLover2910 avatar May 02 '24 02:05 RustLover2910

I have the same issue, running hyprland-git from the AUR, so currently on Hyprland v0.39.1-124-g56de72f3, with waybar v0.10.2, with the same sort of output as RustLover2910, just 3 times as much because i have 3 screens with separate waybar configs

BeauTaapken avatar May 02 '24 12:05 BeauTaapken

Same issue as above with current git release so a3ca016 on nixOS

AggressiveHayBale avatar May 02 '24 17:05 AggressiveHayBale

Ah, I see the issue: Hyprland recently updated the socket folder from /tmp/hypr/<id>/ to $XDG_RUNTIME_DIR/hypr/<id>.

I recently updated Waybar to also use this new path in this PR: https://github.com/Alexays/Waybar/pull/3183

You should update your Waybar to the latest git version, or downgrade Hyprland.

@Alexays is there any new release planned that would include the above PR?

zjeffer avatar May 02 '24 17:05 zjeffer

Just released a new version 0.10.3 :)

Alexays avatar May 06 '24 08:05 Alexays