Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
1.73k stars 94 forks source link

Error when switching workspaces in Hyprland #449

Closed wenjinnn closed 1 week ago

wenjinnn commented 3 weeks ago

Hi Aylur. I'm using your ags dotfiles with some custom configuration, the workspace indicator in the upper right corner often does not update when switching workspaces. here's the related error log I got:

(com.github.Aylur.ags:101889): Gjs-WARNING **: 22:12:46.657: JS ERROR: Gio.IOErrorEnum: Could not connect: Resource temporarily unavailable
_connection@resource:///com/github/Aylur/ags/service/hyprland.js:127:14
_socketStream@resource:///com/github/Aylur/ags/service/hyprland.js:145:33
messageAsync@resource:///com/github/Aylur/ags/service/hyprland.js:170:43
_syncMonitors@resource:///com/github/Aylur/ags/service/hyprland.js:186:36
_onEvent@resource:///com/github/Aylur/ags/service/hyprland.js:239:32
_watchSocket/<@resource:///com/github/Aylur/ags/service/hyprland.js:134:18
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

It's related with the hyprland.active.workspace hook, I did some digging, maybe related to data race caused by some asynchronous messages call with messageAsync?

enk-it commented 2 weeks ago

can confirm

enk-it commented 2 weeks ago

probably related to last big hyprland update

wenjinnn commented 2 weeks ago

probably related to last big hyprland update

Maybe not. I also got this issue at hyprland 0.40.x, and upgrade to version 0.41.0 didn't fix this for me. but I did some change that can fix it, and tested on my PC. I'll open a PR.

Aylur commented 1 week ago

I'm 100% sure its not related to hyprland.active.workspace

I get this issue every now and then, even hyprctl doesn't work when it happens, I think this is just an issue with hyprland