Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] App remains stuck on loading icon (no menu) #294

Closed
1 task done
roelti opened this issue Sep 30, 2024 · 14 comments
Closed
1 task done

[Bug] App remains stuck on loading icon (no menu) #294

roelti opened this issue Sep 30, 2024 · 14 comments
Assignees
Labels
bug Something isn't working (correctly). investigation needed Further investigation is needed at some point

Comments

@roelti
Copy link

roelti commented Sep 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi! Big fan of your application. Been using it a lot and it saves me a lot of time and is friendly to use! That being said I have a problem with the menubar icon not loading the php version. It keeps showing the loading icon while everything on my system is functioning normally. Valet, nginx and homebrew don't seem to have any issues. I've tried reinstalling the app (deleting it from Applications and removing the cache file) but the issue remains..

I'm not sure how to debug this issue. I've attached the latest log file when starting the application via the CLI.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- macOS: Sonoma 14.5
- Valet: 4.8.0
- PHP Monitor: Latest 7.0.4

Do you have a log file (or a screenshot) or any additional information?

Extra CLI mode is on (`~/.config/phpmon/verbose` exists).
==================================
PHP MONITOR by Nico Verbruggen
Version 7.0.4 (1490)
==================================
The current username is `roeltinkhof`.
The user's shell is `/bin/zsh`.
The user is running PHP Monitor with the architecture: arm64
Now running 2 core checks!
[PASS] `/opt/homebrew/bin/brew` exists (0.017 ms)
@roelti roelti added the bug Something isn't working (correctly). label Sep 30, 2024
@nicoverbruggen
Copy link
Owner

nicoverbruggen commented Sep 30, 2024

It seems the startup procedure is somewhat borked. The .config/phpmon directory is normally created but the log just stops before that. This may be a permission issue new on Sonoma 14.5, not sure.

Can you run mkdir -p ~/.config/phpmon in your Terminal and restart PHP Monitor? Does that fix the issue?

@roelti
Copy link
Author

roelti commented Sep 30, 2024

I tried it and see this in the log:

Extra CLI mode is on (`~/.config/phpmon/verbose` exists).
==================================
PHP MONITOR by Nico Verbruggen
Version 7.0.4 (1490)
==================================
The current username is `roel`.
The user's shell is `/bin/zsh`.
The user is running PHP Monitor with the architecture: arm64
Now running 2 core checks!
[PASS] `/opt/homebrew/bin/brew` exists (0.022 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && mkdir -p ~/.config/phpmon"

[OUT]:
~~~~~~~~~~~~~~~~~~~~~~~~>

There was no /.config/phpmon/config.json file to be loaded.

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && ls /opt/homebrew/opt | grep php"

[OUT]:
php
php@7.3
php@7.4
php@8.0
php@8.1
php@8.2
php@8.3
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `ls /opt/homebrew/opt | grep php` returned php result (753.033 ms)
Now running 13 valet checks!
[PASS] `/opt/homebrew/bin/php` exists (0.018 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/php -v"

[OUT]:
PHP 8.3.10 (cli) (built: Jul 30 2024 13:44:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.10, Copyright (c), by Zend Technologies
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] no `dyld` issue (`Library not loaded`) detected (36.971 ms)
[PASS] `valet` binary exists (0.018 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && cat /private/etc/sudoers.d/brew"

[OUT]:
Cmnd_Alias BREW = /opt/homebrew/bin/brew *
%admin ALL=(root) NOPASSWD:SETENV: BREW
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `/private/etc/sudoers.d/brew` contains brew (2.986 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && cat /private/etc/sudoers.d/valet"

[OUT]:
Cmnd_Alias VALET = /opt/homebrew/bin/valet *
%admin ALL=(root) NOPASSWD:SETENV: VALET
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `/private/etc/sudoers.d/valet` contains valet (2.632 ms)
[PASS] `.config/valet` not empty (Valet installed) (0.012 ms)
[PASS] `config.json` was valid (0.325 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/brew tap"

[OUT]:
axllent/apps
elastic/tap
homebrew/cask
homebrew/core
homebrew/services
ngrok/ngrok
nicoverbruggen/cask
shivammathur/extensions
shivammathur/php
stripe/stripe-cli
~~~~~~~~~~~~~~~~~~~~~~~~>


<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && sudo /opt/homebrew/bin/brew services info dnsmasq --json"

[OUT]:
[
  {
    "name": "dnsmasq",
    "service_name": "homebrew.mxcl.dnsmasq",
    "running": true,
    "loaded": true,
    "schedulable": false,
    "pid": 21860,
    "exit_code": 0,
    "user": "root",
    "status": "started",
    "file": "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist",
    "command": "/opt/homebrew/opt/dnsmasq/sbin/dnsmasq --keep-in-foreground -C /opt/homebrew/etc/dnsmasq.conf -7 /opt/homebrew/etc/dnsmasq.d,\\*.conf",
    "working_dir": null,
    "root_dir": null,
    "log_path": null,
    "error_log_path": null,
    "interval": null,
    "cron": null
  }
]
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `sudo /opt/homebrew/bin/brew services info` JSON loaded (1959.18 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && which node"

[OUT]:
/opt/homebrew/bin/node
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `env: node` issue does not apply (3.335 ms)
[PASS] Herd is not running (1.769 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && valet --version"

[OUT]:
Laravel Valet 4.8.0
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] no global composer issues (216.415 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && valet --version"

[OUT]:
Laravel Valet 4.8.0
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `valet --version` was loaded (184.372 ms)
[PASS] valet version is supported (0.013 ms)
PHP Monitor has determined the application has successfully passed all checks.
==================================

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/php --ini | grep -E -o '(/[^ ]+\.ini)'"

[OUT]:
/opt/homebrew/etc/php/8.3/php.ini
/opt/homebrew/etc/php/8.3/conf.d/error_log.ini
/opt/homebrew/etc/php/8.3/conf.d/ext-opcache.ini
/opt/homebrew/etc/php/8.3/conf.d/php-memory-limits.ini
~~~~~~~~~~~~~~~~~~~~~~~~>

@nicoverbruggen
Copy link
Owner

That looks good... Do you still have this issue? If so, can you take a screenshot of what goes wrong (preferably with the menu open, if possible)?

@roelti
Copy link
Author

roelti commented Sep 30, 2024

The icon in the menubar is stuck on the loading icon:
Scherm­afbeelding 2024-09-30 om 17 34 13

Unfortunately I can't open the menu

@nicoverbruggen
Copy link
Owner

Okay, that's strange!

You mentioned that this started happening recently? Did anything specific in your setup change recently? Did this start after the latest macOS update, or after updating Homebrew? If you can think of anything that can help me reproduce the issue, let me know.

I'll take a more detailed look later and try to see where the app might be hanging or freezing.

In the meantime, please try the DEV build I've attached. It's a pre-release build of the upcoming version that contains a few fixes that may or may not resolve the issue. Probably won't, but it doesn't hurt to try: phpmon-dev.zip

@nicoverbruggen nicoverbruggen added the investigation needed Further investigation is needed at some point label Sep 30, 2024
@nicoverbruggen nicoverbruggen changed the title [Bug] Menu app icon keeps loading and no dropdown is available [Bug] App remains stuck on loading icon (no menu) Sep 30, 2024
@roelti
Copy link
Author

roelti commented Oct 1, 2024

Thanks for helping! Unfortunately the pre-release build is not fixing the issue..

The only thing I can think of is that I upgraded all brew packages a short while back.. PHP and Nginx seem to function normally. I'm running an M1 pro Macbook 14".

Let me know if I can be of any help. Are there maybe any Application Support files or other lib files I could clear?

@nicoverbruggen
Copy link
Owner

There isn't anything you can clear that will fix an issue like this, unfortunately.

I recommend trying: run brew update && brew upgrade, let it do its thing, and reboot your Mac after.

I've seen app hangs resolved by a reboot, weirdly enough.

Let me know if that helps! If it does not, I'll see what else I can do.

@roelti
Copy link
Author

roelti commented Oct 2, 2024

The brew update && brew upgrade seems to have fixed the issue!

Thanks for helping and again thanks for making the app 🙌

@nicoverbruggen
Copy link
Owner

Good news! 😃

@Perzonallica
Copy link

Perzonallica commented Oct 23, 2024

Hello @nicoverbruggen

I have the same issue and I have also no idea what can cause this. Yesterday it worked fine, and today when I booted up the system, the PhpMonitor app is stuck and I see no menu or possibility to quit it.

Unfortunately for me, the brew update && brew upgrade didn't help.

But yesterday I run the brew update && brew upgrade commands and the app worked until the restart. I also run CleanMyMac... maybe this deleted something? But I already reinstalled PHPMonitor and it didn't help.

Btw, the Valet service is running, I can open the websites locally, they are working.

Here is my last_session log:

Extra CLI mode is on (`~/.config/phpmon/verbose` exists).
==================================
PHP MONITOR by Nico Verbruggen
Version 7.0.4 (1490)
==================================
The current username is `cs2app1`.
The user's shell is `/bin/zsh`.
The user is running PHP Monitor with the architecture: arm64
Now running 2 core checks!
[PASS] `/opt/homebrew/bin/brew` exists (0.022 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && mkdir -p ~/.config/phpmon"

[OUT]:
~~~~~~~~~~~~~~~~~~~~~~~~>

There was no /.config/phpmon/config.json file to be loaded.

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && ls /opt/homebrew/opt | grep php"

[OUT]:
php
php@8.1
php@8.2
php@8.3
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `ls /opt/homebrew/opt | grep php` returned php result (143.762 ms)
Now running 13 valet checks!
[PASS] `/opt/homebrew/bin/php` exists (0.017 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/php -v"

[OUT]:
PHP 8.3.12 (cli) (built: Sep 24 2024 18:08:04) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.12, Copyright (c) Zend Technologies
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] no `dyld` issue (`Library not loaded`) detected (81.862 ms)
[PASS] `valet` binary exists (0.023 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && cat /private/etc/sudoers.d/brew"

[OUT]:
Cmnd_Alias BREW = /opt/homebrew/bin/brew *
%admin ALL=(root) NOPASSWD:SETENV: BREW
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `/private/etc/sudoers.d/brew` contains brew (4.636 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && cat /private/etc/sudoers.d/valet"

[OUT]:
Cmnd_Alias VALET = /opt/homebrew/bin/valet *
%admin ALL=(root) NOPASSWD:SETENV: VALET
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `/private/etc/sudoers.d/valet` contains valet (3.495 ms)
[PASS] `.config/valet` not empty (Valet installed) (0.009 ms)
[PASS] `config.json` was valid (0.351 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/brew tap"

[OUT]:
adoptopenjdk/openjdk
facebook/fb
homebrew/services
nicoverbruggen/cask
shivammathur/extensions
shivammathur/php
~~~~~~~~~~~~~~~~~~~~~~~~>


<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && sudo /opt/homebrew/bin/brew services info dnsmasq --json"

[OUT]:
[
  {
    "name": "dnsmasq",
    "service_name": "homebrew.mxcl.dnsmasq",
    "running": true,
    "loaded": true,
    "schedulable": false,
    "pid": 10054,
    "exit_code": 0,
    "user": "root",
    "status": "started",
    "file": "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist",
    "command": "/opt/homebrew/opt/dnsmasq/sbin/dnsmasq --keep-in-foreground -C /opt/homebrew/etc/dnsmasq.conf -7 /opt/homebrew/etc/dnsmasq.d,\\*.conf",
    "working_dir": null,
    "root_dir": null,
    "log_path": null,
    "error_log_path": null,
    "interval": null,
    "cron": null
  }
]
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `sudo /opt/homebrew/bin/brew services info` JSON loaded (1102.816 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && which node"

[OUT]:
/opt/homebrew/bin/node
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `env: node` issue does not apply (5.187 ms)
[PASS] Herd is not running (1.601 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && valet --version"

[OUT]:
Laravel Valet 4.8.0
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] no global composer issues (372.413 ms)

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && valet --version"

[OUT]:
Laravel Valet 4.8.0
~~~~~~~~~~~~~~~~~~~~~~~~>

[PASS] `valet --version` was loaded (350.396 ms)
[PASS] valet version is supported (0.015 ms)
PHP Monitor has determined the application has successfully passed all checks.
==================================

<~~~~~~~~~~~~~~~~~~~~~~~
$ /bin/sh --noprofile -norc --login -c "export PATH=/opt/homebrew/bin:$PATH && /opt/homebrew/bin/php --ini | grep -E -o '(/[^ ]+\.ini)'"

[OUT]:
/opt/homebrew/etc/php/8.3/php.ini
/opt/homebrew/etc/php/8.3/conf.d/20-igbinary.ini
/opt/homebrew/etc/php/8.3/conf.d/20-msgpack.ini
/opt/homebrew/etc/php/8.3/conf.d/20-redis.ini
/opt/homebrew/etc/php/8.3/conf.d/30-memcached.ini
/opt/homebrew/etc/php/8.3/conf.d/error_log.ini
/opt/homebrew/etc/php/8.3/conf.d/php-memory-limits.ini
~~~~~~~~~~~~~~~~~~~~~~~~>

@Perzonallica
Copy link

I checked this CleanMyMac and it cleans the following folder. Can this be a culprit? :) It says 0kB, but this is because I ran it yesterday, and most probably it wasn't empty then.

image

@nicoverbruggen
Copy link
Owner

I checked this CleanMyMac and it cleans the following folder. Can this be a culprit? :) It says 0kB, but this is because I ran it yesterday, and most probably it wasn't empty then.

image

I don't have the time to do a deep dive at this time, but if the contents of the .app itself is being modified, macOS may indeed prevent the app from launching.

You can try reinstalling via the latest zip? Does that help?

@Perzonallica
Copy link

Perzonallica commented Oct 24, 2024

OK, so finally it works again. What I did:

  1. Uninstalled PHP Monitor
  2. Then brew update && brew upgrade and then brew doctor which showed me some errors. I ran brew cleanup and it showed me a lot of old PHP versions which couldn't be removed due to permission issues.
  3. I found this: https://nono.ma/brew-error-could-not-cleanup-old-kegs-fix-your-permissions and it helped me to finally cleanup all the old versions
  4. I restarted the system
  5. Installed the new PHP versions with valet install
  6. Installed the new dev version of PHP Monitoring

And now it works as expected. :)

@nicoverbruggen
Copy link
Owner

@Perzonallica Fantastic, great to hear things are working again! And thanks for writing down what remedied the issue. You never know who else is helped with those steps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (correctly). investigation needed Further investigation is needed at some point
Projects
None yet
Development

No branches or pull requests

3 participants