Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.13k stars 680 forks source link

Waybar shows errors for Hyprland modules config, IPC, and crashes when disconnected from network #3012

Open jakubkaczor opened 5 months ago

jakubkaczor commented 5 months ago

This issue comes in the following steps, increasing with severity.

  1. (works as expected) Connect to a network -> start Waybar,
  2. (crashes) Connect to a network -> start Waybar -> disconnect from the network -> switch the window focus.
  3. (unexpected errors) disconnect from the network -> start Waybar,

Below, I give the output for the above, preserving order.


  1. When I am connected to a network and I start Waybar it prints
    
    [info] Using configuration file .../.config/waybar/config
    [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
    [info] Using CSS file .../.config/waybar/style.css
    [info] Hyprland IPC starting
    [info] Loading persistent workspaces from Hyprland workspace rules
    [warning] module sway/mode: Disabling module "sway/mode", Socket path is empty
    [warning] module sway/window: Disabling module "sway/window", Socket path is empty
    [info] Loading persistent workspaces from Hyprland workspace rules
    [warning] module sway/mode: Disabling module "sway/mode", Socket path is empty
    [warning] module sway/window: Disabling module "sway/window", Socket path is empty

G **: ...: Status Notifier Item with bus name ':1.58' and object path '/org/ayatana/NotificationItem/udiskie' is already registered [info] Bar configured (width: 1920, height: 24) for output: eDP-1 [info] Bar configured (width: 1920, height: 24) for output: DP-1

---
2. Additionally, when I switch the window focus (Hyprland), Waybar crashes with

[error] Hyprland IPC: Couldn't get host (2) terminate called after throwing an instance of 'std::runtime_error' what(): Error parsing JSON: * Line 1, Column 1 Syntax error: value, object or array expected.

zsh: IOT instruction (core dumped) waybar

---
3. When I disconnect from the network and then start Waybar, it prints

[info] Using configuration file .../.config/waybar/config [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop [info] Using CSS file .../.config/waybar/style.css [info] Hyprland IPC starting [error] Hyprland IPC: Couldn't get host (2) [warning] module hyprland/workspaces: Disabling module "hyprland/workspaces", Error parsing JSON: * Line 1, Column 1 ect or array expected.

[warning] module sway/mode: Disabling module "sway/mode", Socket path is empty [error] Hyprland IPC: Couldn't get host (2) [warning] module hyprland/window: Disabling module "hyprland/window", Error parsing JSON: * Line 1, Column 1 ect or array expected.

[warning] module sway/window: Disabling module "sway/window", Socket path is empty [error] Hyprland IPC: Couldn't get host (2) [warning] module hyprland/workspaces: Disabling module "hyprland/workspaces", Error parsing JSON: * Line 1, Column 1 ect or array expected.

[warning] module sway/mode: Disabling module "sway/mode", Socket path is empty [error] Hyprland IPC: Couldn't get host (2) [warning] module hyprland/window: Disabling module "hyprland/window", Error parsing JSON: * Line 1, Column 1 ect or array expected.

[warning] module sway/window: Disabling module "sway/window", Socket path is empty [info] Bar configured (width: 1920, height: 24) for output: eDP-1 [info] Bar configured (width: 1920, height: 24) for output: DP-1

(waybar:525172): WARNING : ...: Status Notifier Item with bus name ':1.58' and object path '/org/ayatana/NotificationItem/udiskie' is already registered

(waybar:525172): WARNING : ...: Status Notifier Item with bus name ':1.58' and object path '/org/ayatana/NotificationItem/udiskie' is already registered


---
I truncated sensitive information (dates and some paths). The issue happens with master and v0.10.0 flakes.
Pavel-Hrdina commented 5 months ago

The same thing happens to me on openSUSE Tumbleweed, the version of the waybar is 0.9.24 with Hyprland. The error only happens when I am not connected to the internet. I get the following error:

[error] Hyprland ICP: Couldn't get host
[warning] Mapping is not an object
...

Error repeats over and over.

Syndelis commented 5 months ago

What versions of Hyprland are you folks using? Could be related to #3026. I suspect Hyprland made breaking changes to one of the IPC's payloads

jakubkaczor commented 5 months ago

I recently switched to the newest v0.37.1 and the issue is still there, but I believe that at the time I was posting it, I was on v0.36.0.

Syndelis commented 5 months ago

If you wouldn't mind, could you give Hyprland 0.35 a shot? It's the version I'm using and that could confirm a change in the payloads

jakubkaczor commented 5 months ago

Sure. I have checked on v0.35.0 and the problem remains. I get the same results.

mrtnvgr commented 4 months ago

+1

regul4rj0hn commented 3 months ago

Same here on 6.8.8-arch1-1 and hyprland 0.39.1-5

terminate called after throwing an instance of 'std::runtime_error'
  what():  Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.
  zsh: IOT instruction (core dumped)

Got the core dump from journalctl if you need it, but I could not find any obvious culprit on the stack trace.