swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.95k stars 92 forks source link

Not updating on Monterey M1 #263

Closed Cygnusfear closed 2 years ago

Cygnusfear commented 2 years ago

Scripts (node/js) seem to have stopped updating on Monterey. Manually refreshing works. Interactions in preference window are very unresponsive and (hit and miss) so are right clicks on the menu bar items.

https://user-images.githubusercontent.com/2925132/147886402-63ff95f1-aff3-4e76-b860-39990b1c808d.mp4

(was looking to post some logs but can't seem to figure out where to find them 🥴)

melonamin commented 2 years ago

Logs are in Console.app(filter by process "SwiftBar") Can you please check this as well?

If you can share any of non-working plugins it could help too.

Cygnusfear commented 2 years ago

In console I get only 'Successfully executed' like the other issue; right clicking selecting 'open plugin folder' hangs and gives me a spinner / end up having to kill the process. It happened to all my plugins.

Deleted application support Swiftbar folder, reinstalled Swiftbar. I had several plugins run at 10ms, I changed those to 1s and it seems to have fixed the spinner issues / is now functional.

Wildly guessing the issue is Swiftbar running the plugins in the same thread, or other changes in behavior?

Cygnusfear commented 2 years ago

Actually, it's no longer hanging/spinner but it seems that even though it's updating in the background the actual Swiftbar isn't updating.

melonamin commented 2 years ago

Ok, I think we're making progress.

I had several plugins run at 10ms

I've created a test plugin test.10ms.sh:

#!/bin/bash
echo $((1 + $RANDOM % 10))

I can't reproduce the hanging yet, and as far as I see in the code it shouldn't hang - UI updates and plugin updates are on separate queues.

What I've found is that menu bar will stop updating after right-clicking, but seems to work fine on left click.

melonamin commented 2 years ago

Update, I've launched 10 test scripts at the same time and managed to reproduce hanging, you can see this message in the log right before SwiftBar stops refreshing and UI become sluggish [default] enable_updates_common timed out waiting for updates to reenable

Cygnusfear commented 2 years ago

Some additional information, hopefully useful: while Swiftbar doesn't hang with 1s scripts, the bar doesn't seem to consistently update.

Console log gives me the line you mentioned: enable_updates_common timed out waiting for updates to reenable

When I right click on the script, the bar does update itself (at least that specific script). I am seeing a few updates after that and then it stops updating again. So this basically confirms what you discovered 🙃

melonamin commented 2 years ago

Hey @Cygnusfear, can you try this build? SwiftBar.zip

melonamin commented 2 years ago

@Cygnusfear can you check if everything is ok in Beta 5?