dwarvesf / hidden

An ultra-light MacOS utility that helps hide menu bar icons
https://d.foundation/opensource
MIT License
11.28k stars 298 forks source link

App doesn't work on macOS Ventura 13.3.1 #258

Open XiaomingNiu-Sam opened 1 year ago

XiaomingNiu-Sam commented 1 year ago

Describe the bug

Can't hide app icons.

Steps to reproduce

Just open app as normal. Can't hide icons.

image image

Expected behaviour

Hide other app icons

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

You may write here the specifications like the version of the project, operating system, or hardware if applicable.

Desktop (please complete the following information):

Logs / Stack trace

Insert your log/stack trace here
dan commented 1 year ago

+1

vrapaic commented 1 year ago

same here

rayli09 commented 1 year ago

same here

UeharaYou commented 1 year ago

Attempted to fix the problem (and a lot more), pls check my pull request. #260.

[Edit] @XiaomingNiu-Sam Oh it seems like you have not read the manual carefully.

theRealPadster commented 1 year ago

It works for me on macOS 13.4 image image image

swiftbird07 commented 1 year ago

[Edit] @XiaomingNiu-Sam Oh it seems like you have not read the manual carefully.

Care to elaborate? I have the same problem

Edit: Figured it out: At least for me changing the screen resolution to "More Space" made it work again, but the whole notch thing is still very buggy, as icons often disappear under there and the "always hidden" section doesn't work as I can't set the screen resolution even lower so that I could see the second pipe.

UeharaYou commented 1 year ago

@maof97 It seems the original code is somewhat over complicated and poor in software engineering. I reviewed the code and found its chaotic logic in handling status bar items. I tried fixing this issue by writing my own version of Hidden Bar. It will be grateful if you can give it a try. (See PR #261 [EDITED: Updated the PR index])

xCuri0 commented 1 year ago

It works for me on Ventura, but start when I log-in doesn't work. image

UeharaYou commented 1 year ago

@xCuri0 In macOS 13 a new mechanism was introduced to manage login items. The old api has been deprecated. So v1.9 won't start on login.

xCuri0 commented 1 year ago

@UeharaYou should I try your fork ? does it fix it ?

i found out it does, i'll try it.

xCuri0 commented 1 year ago

I tried your fork (built archive and dragged into Applications) but I can't enable Start Hidden Bar when I log in, it doesn't let me select it. Previous version would let me select it but it wouldn't work.

Is this because I skipped signing or something ?

UeharaYou commented 1 year ago

@xCuri0 That's interesting, is there any screenshot for me to diagnose it? In my own test I found it works like a charm so maybe there's something I don't know that broke the program.

[Edit] If you use the archived version (v1.9 or below), they won't work because they are just legacies from the original repo. You should pull the "stable" branch and build the project from source (the version number should be v2.0).

xCuri0 commented 1 year ago

@UeharaYou It's version 2.0

Here is screen recording showing what happens

https://github.com/dwarvesf/hidden/assets/29529557/63570c8c-5e35-422c-9f4b-b114ae5f6132

If you want me to run a debug build with logs or something I can do

UeharaYou commented 1 year ago

@xCuri0 It looks like there're some thing preventing the login item to be registered. Since this feature is managed by an imported module, I shall have it investigated.

But there's something I speculate that might be the cause. Maybe it is the old Hidden Bar login item remained from the old versions stopped the 2.0 to be registered (Maybe a name and package id collision). Since the imported module won't throw the exceptions, I'm not sure if it is the fact. Therefore you might try manually removing the old Hidden Bar login item from the Settings app and give it another go.

If the problem persists, it will be grateful to provide the output log from the Xcode output window.

[Edit] There're some quotes I found from the module README that might justify the speculation:

My app doesn't launch at login when testing

This is usually caused by having one or more older builds of your app laying around somewhere on the system, and macOS picking one of those instead, which doesn't have the launch helper, and thus fails to start.

Some things you can try:

  • Bump the version & build of your app so macOS is more likely to pick it.
  • Delete the DerivedData directory.
  • Ensure you don't have any other builds laying around somewhere.

Some helpful Stack Overflow answers:

xCuri0 commented 1 year ago

I checked /Library/LaunchAgents

drwxr-xr-x   7 root  wheel   224B May 30 10:24 .
drwxr-xr-x  69 root  wheel   2.2K May  8 21:28 ..
-rw-r--r--   1 root  wheel   567B May 29 18:42 com.bjango.istatmenus.agent.plist
-rw-r--r--   1 root  wheel   575B May 29 18:42 com.bjango.istatmenus.status.plist
-rw-r--r--@  1 root  wheel   588B May 29 08:09 com.dortania.opencore-legacy-patcher.auto-patch.plist
-rwxr-xr-x   1 root  wheel   578B May 30 10:24 com.logi.ghub.plist
lrwxr-xr-x   1 root  wheel   104B May  2 20:42 com.oracle.java.Java-Updater.plist -> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Java-Updater.plist

/Library/LaunchDaemons

drwxr-xr-x   8 root  wheel   256B May 30 10:24 .
drwxr-xr-x  69 root  wheel   2.2K May  8 21:28 ..
-rw-r--r--   1 root  wheel   584B May 29 18:42 com.bjango.istatmenus.daemon.plist
-rw-r--r--   1 root  wheel   557B May 29 18:42 com.bjango.istatmenus.fans.plist
-rw-r--r--   1 root  wheel   608B May 29 18:42 com.bjango.istatmenus.installerhelper.plist
-rw-r--r--   1 root  wheel   647B Apr 18 18:23 com.crystalidea.macsfancontrol.smcwrite.plist
-rwxr-xr-x   1 root  wheel   676B May 30 10:24 com.logi.ghub.updater.plist
lrwxr-xr-x   1 root  wheel   103B May  2 20:42 com.oracle.java.Helper-Tool.plist -> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Helper-Tool.plist

~/Library/LaunchAgents/

drwxr-xr-x@  4 kuria  staff   128B May 29 18:42 .
drwx------@ 93 kuria  staff   2.9K May  8 21:19 ..
-rwxr-xr-x@  1 kuria  staff   809B Apr 18 21:27 com.google.keystone.agent.plist
-rwxr-xr-x@  1 kuria  staff   915B Apr 18 21:27 com.google.keystone.xpcservice.plist

Unless I'm missing something I don't see anything related to HiddenBar, I also deleted the DevriedData folder but I still see Hidden Bar in Allow in the Background

Screenshot 2023-05-31 at 10 33 05 AM

I checked output in Xcode with both Release and Debug builds but nothing gets printed when I try to enable Start Hidden Bar when I log in

UeharaYou commented 1 year ago

This is tricky, since removing the allow in background items requires the original bundle who installed them, or you might have to clean that from all possible locations.

If the original v1.9 was installed via brew, try purging it by running brew uninstall --cask -f hiddenbar.

If it does not work, try finding these background items (usually in form of .plist) by searching the original bundle id "com.dwarvesv.LuancherApplication", "com.dwarvesv.minimalbar" or prefix "dwarvesv". You can use the command find / -name *dwarvesv* 2>/dev/null (find / -name \*dwarvesv\* 2>/dev/null if using zsh) to scan though your disk (might run for a while) for any files whose name contains the prefix.

My copies of Hidden Bar should never register items in "Allow in Background", it should only appears in "Login Items".

xCuri0 commented 1 year ago

This is all that shows after 1 hour (NVMe SSD)

/System/Volumes/Data/private/var/folders/fv/rdlm84q574ngf3vq1vnktq480000gn/C/com.dwarvesv.LauncherApplication
/System/Volumes/Data/private/var/folders/fv/rdlm84q574ngf3vq1vnktq480000gn/C/com.dwarvesv.minimalbar
/System/Volumes/Data/private/var/folders/fv/rdlm84q574ngf3vq1vnktq480000gn/C/com.dwarvesv.minimalbar/com.dwarvesv.minimalbar
/System/Volumes/Data/Users/kuria/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.dwarvesv.launcherapplication.sfl2

I should probably just manually add it to login items

xCuri0 commented 1 year ago

Adding it manually works perfectly fine and I will probably just use that for now

Sinoftj commented 1 year ago

Hi Do u solve it ?I have the same problem,and it makes me feel crazy.

xCuri0 commented 1 year ago

@Sinoftj just manually add it to login items