Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.21k stars 129 forks source link

Error in spaces.jsx - Error running command #254

Closed kavinvalli closed 2 years ago

kavinvalli commented 2 years ago

Randomly sometimes, I get the following error Screenshot 2021-11-19 at 9 01 48 AM

Screenshot 2021-11-19 at 9 03 03 AM and the bar starts showing:simple-bar-spaces.jsx: Something went wrong. After I refresh the bar a couple of times, it's fine

albert-ying commented 2 years ago

I have exact same problem (in both intel big sur and M1 Montery). This is quite annoying, as it happens quite frequently. Just to add something:

  1. the yabai terminal also gives these errors
    45:86: 45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: 45:86:45:86:  45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)
    45:86: execution error: Übersicht got an error: Can’t get widget id "simple-bar-spaces-jsx". (-1728)

Another thing is, not sure it is problem of Übersicht or simple bar (as I only run simple bar in Übersicht), the Übersicht uses so many resources. It has larger energy impact then firefox + vs code. And sometime it make my laptop stuck, especially when those errors happens (this is insane, as I'm using an M1max 64g Ram MacBook!).

image image
Jean-Tinland commented 2 years ago

I just increased the delay between each simple-bar's refresh. This should reduce the amount of ressources needed.

Are you still experiencing this issue with the latest version?

albert-ying commented 2 years ago

@Jean-Tinland Thank you for the quick response! I just updated to the latest version. The Übersicht still at top of the list if sorted by energy impact. But the CPU usage decreased from always ~ 100% to ~ 75-80% (the process "localnode")

The error mentioned before still happens a lot. (happened 4 times while I'm typing this, and frozed my editor). It calms down a little bit after refreshing the widgets through Übersicht, but it come back again after a while. Do you know what may cause this?

Jean-Tinland commented 2 years ago

Unfortunately I can't reproduce this issue for now.

What is your OS version? Also, are you running simple-bar on a M1 chip or an Intel one?

albert-ying commented 2 years ago

I'm on M1 chip, MacOS 12.0.1.

kavinvalli commented 2 years ago

Same. M1 MacOS 12.0.1

Jean-Tinland commented 2 years ago

Okay, have you upgraded yabai to v4?

kavinvalli commented 2 years ago

@Jean-Tinland I upgraded yabai to v4. Still getting the error

Jean-Tinland commented 2 years ago

I can't reproduce this issue as I'm running simple-bar on an Intel Mac book pro. If anyone has an idea it would be really helpful!

kavinvalli commented 2 years ago

@Jean-Tinland I noticed a pattern that the issue starts when I run Amazon Prime Video. I'm not sure if it is related but it might have some significance

licht1stein commented 2 years ago

I have the same error from the start, it never showed the spaces.

Apple M1, Mac OS 12.2

muhsin-arslan commented 2 years ago

If you are using a device with an Apple Silicon processor and you have installed yabai through homebrew, keep in mind that homebrew's file path is different for Apple Silicon devices.

Click on simple-bar (a bar pops up even if it shows an error) and press CMD + , to open the settings screen of simple-bar. Make sure the yabai path is "/opt/homebrew/bin/yabai" here.

If you are using macOS Big Sur or Monterey, the same situation (homebrew path) can be found in the file "/private/etc/sudoers.d/yabai" written for the yabai script to start automatically at startup.

ALL = (root) NOPASSWD: /usr/local/bin/yabai --load-sa "/opt/homebrew/bin/yabai" should be instead of "/usr/local/bin/yabai" Also to find out on which path yabai is located, you can type "which yabai" in the terminal. I hope it will be useful for someone.
deniserdogan commented 2 years ago

I have the same problem "can't get widget id" M1 MacBook air