samschott / maestral

Open-source Dropbox client for macOS and Linux
https://maestral.app
MIT License
3.12k stars 64 forks source link

Maestral does not appear in menu bar #842

Closed bobsica closed 1 year ago

bobsica commented 1 year ago

Describe the bug Maestral seems to be running correctly but I can't access the gui. The icon is no longer in the menu bar (with Bartender) and the command line does not work (e.g. "maestral gui" returns "zsh: command not found: maestral")

To Reproduce Tried restarting/rebooting

Expected behaviour I used to be able to see the Maestral icon and click on it to change settings

System:

Thank you Bob

samschott commented 1 year ago

If its one of those fancy MacBook Pros with a notch, an issue which I have seen in the past is that icons may be hidden behind it. Otherwise:

  1. Maestral typically runs two processes, one sync daemon and one GUI process. They will both show up in activity monitor, but only the GUI process will have an app icon next to it in the list. Can you see both?
  2. The CLI is a simple symlink to /Applications/Maestral.app/Contents/MacOS/maestral-cli. You can always create it yourself by running:
    ln -s /Applications/Maestral.app/Contents/MacOS/maestral-cli /usr/local/bin/maestral
bobsica commented 1 year ago

No, intel macbook pro, no notch When I start the Maestral app I only see the app, not the sync process. If I then go to the command line and type

/Applications/Maestral.app/Contents/MacOS/maestral-cli start

Then Activity Monitor shows 2 of the Maestral sync processes (no icon) (and in fact I just checked back, there are 3 of them now, 2 of which use 0% CPU)

I tried to access the gui by typing:

/Applications/Maestral.app/Contents/MacOS/maestral-cli gui

and I get the output

app_packages/rubicon/init.py:5: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('rubicon'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages

gruber commented 1 year ago

I’m seeing something similar. On my main Mac, running MacOS Ventura 13.2.1, Maestral 1.7.0 seems to be running just fine. But on one of my old Macs, an old Intel MBP running MacOS Big Sur 11.7.4 (most recent OS supported), the GUI will launch but never appears in the Menu bar. It also seems to consume much CPU while being stuck. The command line tool reports the following:

% maestral status
Maestral daemon is not running.
gruber@YT-2014 ~> maestral gui
app_packages/rubicon/__init__.py:5: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('rubicon')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages

% maestral start
Starting Maestral...        [FAILED]
Please check logs for more information.

Here are the pertinent lines from ~/Library/Logs/maestral/maestral.log:

2023-02-25 23:01:18 daemon ERROR: Could not communicate with daemon
Traceback (most recent call last):
  File "app_packages/Pyro5/client.py", line 310, in connect_and_handshake
  File "app_packages/Pyro5/socketutil.py", line 283, in create_socket
FileNotFoundError: [Errno 2] No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "app_packages/maestral/daemon.py", line 537, in start_maestral_daemon_process
  File "app_packages/maestral/daemon.py", line 348, in wait_for_startup
  File "app_packages/maestral/daemon.py", line 344, in wait_for_startup
  File "app_packages/Pyro5/client.py", line 214, in _pyroBind
  File "app_packages/Pyro5/client.py", line 376, in __pyroCreateConnection
  File "app_packages/Pyro5/client.py", line 336, in connect_and_handshake
Pyro5.errors.CommunicationError: cannot connect to /Users/gruber/Library/Application Support/maestral/maestral.sock: [Errno 2] No such file or directory
2023-02-25 23:01:18 daemon ERROR: Daemon is running but not responsive, killing now

Reverting to Maestral 1.6.4 on the older Mac seems to restore everything to working order.

sreilly commented 1 year ago

I'm having a similar issue on a 2019 16" intel MacBook Pro that just started yesterday, so sound like it might be intel related. The GUI doesn't open for me, and upon restart I see two Maestral processes, each using up a significant amount of CPU.

image

The log after removing the maestral.lock file and killing every process shown in ps -auxww | grep -i maestral and then running maestral start shows:

2023-02-26 09:06:12 daemon ERROR: Daemon is running but not responsive, killing now
2023-02-26 09:20:23 daemon ERROR: Could not communicate with daemon
Traceback (most recent call last):
  File "app_packages/Pyro5/client.py", line 310, in connect_and_handshake
  File "app_packages/Pyro5/socketutil.py", line 283, in create_socket
FileNotFoundError: [Errno 2] No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "app_packages/maestral/daemon.py", line 537, in start_maestral_daemon_process
  File "app_packages/maestral/daemon.py", line 348, in wait_for_startup
  File "app_packages/maestral/daemon.py", line 344, in wait_for_startup
  File "app_packages/Pyro5/client.py", line 214, in _pyroBind
  File "app_packages/Pyro5/client.py", line 376, in __pyroCreateConnection
  File "app_packages/Pyro5/client.py", line 336, in connect_and_handshake
Pyro5.errors.CommunicationError: cannot connect to /Users/sreilly/Library/Application Support/maestral/maestral.sock: [Errno 2] No such file or directory
2023-02-26 09:20:23 daemon ERROR: Daemon is running but not responsive, killing now

I then tried killing all processes and removing every file in the application support/maestral directory, but get the same error.

I'm unable to set the debug level with the command line tool, but have tried by editing the maestral.ini, however that seems to have no effect. I don't think the process is even getting that far.

The Maestral process has the following open files according to activity monitor:

/
/Applications/Maestral.app/Contents/MacOS/Maestral
/Library/Preferences/Logging/.plist-cache.E2N39rhc
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_opcode.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_struct.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/fcntl.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_socket.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_typing.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/select.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_pickle.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_bisect.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle
/usr/share/icu/icudt70l.dat
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_sha512.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/app_packages/charset_normalizer/md.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_random.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/math.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/array.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_datetime.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/binascii.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_json.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_uuid.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_sqlite3.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/zlib.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_blake2.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/resource.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_decimal.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_hashlib.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_queue.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_scproxy.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_heapq.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_posixsubprocess.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_ssl.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_lzma.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_bz2.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_asyncio.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_contextvars.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/app_packages/charset_normalizer/md__mypyc.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_multibytecodec.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_csv.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/unicodedata.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/_ctypes.cpython-311-darwin.so
/Applications/Maestral.app/Contents/Resources/support/python-stdlib/lib-dynload/pyexpat.cpython-311-darwin.so
/dev/null
/dev/null
/dev/null
/dev/urandom

That doesn't seem like much, to be honest. I haven't installed any updates in the past few days that I can remember, and Xcode is the non-app-store version of 14.1 in case that affects python versions.

samschott commented 1 year ago

Looks like this is the same underlying issue as reported in #841.