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

Stuck on "Cleaning up DNS cache" #192

Open
0xCarnival opened this issue Aug 9, 2024 · 17 comments
Open

Stuck on "Cleaning up DNS cache" #192

0xCarnival opened this issue Aug 9, 2024 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@0xCarnival
Copy link

It stuck on "Cleaning up DNS cache"

After running "mac-cleanup" from the terminal, it first cleans "homebrew", and then it stucks on "Cleaning up DNS cache".
Uploading Screenshot 2024-08-09 at 4.02.15 PM.png…

@0xCarnival 0xCarnival added the bug Something isn't working label Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

👋🏻 Thank you for your feedback, gonna watch it soon

@efa2d19
Copy link
Member

efa2d19 commented Aug 9, 2024

Hey 👋🏻
Can you specify the version it occurred to you in?

@0xCarnival
Copy link
Author

Hey 👋🏻 Can you specify the version it occurred to you in?

I reinstalled it, so I believe it is the latest version.

@liebki
Copy link

liebki commented Aug 13, 2024

DNS cleaning doesn't work in script:

I can support @0xCarnival's problem, for me also it is stuck at DNS cleaning.
I used the commands of the script manually and they are working without issue, something is not letting the python code move on..

Workaround:

  1. Finder -> "Go to Folder.." open following path:
    "/opt/homebrew/Cellar/mac-cleanup-py/3.0.4/libexec/lib/python3.10/site-packages/mac_cleanup"
  2. Go into the file "default_modules.py"
  3. Go to line 409
  4. Comment out lines 412 and 413:
    unit.add(Command("sudo dscacheutil -flushcache"))
    unit.add(Command("sudo killall -HUP mDNSResponder"))

Just add a # in front of those two lines.

I know the script is not cleaning the DNS-Cache now but it executes fine after that.

@0xCarnival
Copy link
Author

0xCarnival commented Aug 13, 2024 via email

@liebki
Copy link

liebki commented Aug 13, 2024

You have to close all terminals after editing, maybe even restart for all terminal sessions to restart. It didn't work for me either at first but after closing all terminals (or restarting) it should work fine.

@0xCarnival
Copy link
Author

0xCarnival commented Aug 13, 2024 via email

@liebki
Copy link

liebki commented Aug 14, 2024

@0xCarnival alright then I'm almost out of ideas.

The only idea I have left is that you eventually have multiple versions installed. Like multiple homebrew versions or homebrew and PIP etc.

For example you installed using PIP and homebrew but the PIP-one is executed but the homebrew one is modified (check that at least).

@0xCarnival
Copy link
Author

0xCarnival commented Aug 14, 2024 via email

@liebki
Copy link

liebki commented Aug 14, 2024

@0xCarnival here I can just agree this freezes too. I can use the command in terminal but with the tool it doesn't work.

You have to comment this out too (Line 419), those are things which need bugfixes.. maybe I find a way to do that.

@liebki
Copy link

liebki commented Aug 14, 2024

@ALL

Just use the configure option -c to disable the two things instead of changing the code.. I forgot that we can do that.

So just do mac-cleanup-py -c and deselect memory and DNS and it should run trough.

@0xCarnival
Copy link
Author

0xCarnival commented Aug 14, 2024 via email

@liebki
Copy link

liebki commented Aug 14, 2024

Please let the issue open tho, it's still a/multiple bug/s

@efa2d19
Copy link
Member

efa2d19 commented Sep 8, 2024

so I'm 100% sure sudo prompt is the culprit, but I'm not sure why:
I mean shell is set to True in Popen and you have to see native password prompt in the terminal, but you don't.

Can you specify the terminal emulator you use + the shell that is being used?
I've already checked warp, iterm, and default terminal w/ default macos shell, aka zsh, and bash, and it all works fine 🤷‍♂️

@emeis
Copy link

emeis commented Sep 29, 2024

so I'm 100% sure sudo prompt is the culprit, but I'm not sure why: I mean shell is set to True in Popen and you have to see native password prompt in the terminal, but you don't.

Can you specify the terminal emulator you use + the shell that is being used? I've already checked warp, iterm, and default terminal w/ default macos shell, aka zsh, and bash, and it all works fine 🤷‍♂️

I have the same issue. I use default terminal + zsh. I ran into this problem after I used it for a few months.

@efa2d19
Copy link
Member

efa2d19 commented Sep 29, 2024

I have the same issue. I use default terminal + zsh. I ran into this problem after I used it for a few months.

Could you please try modifying your pam.d to accept touchId on sudo prompt?
You can check this repo or just check how it's done in how-does-it-work section and make changes yourself.
I think it'll solve the issue for time being meanwhile i'll look for a fix

@emeis
Copy link

emeis commented Sep 29, 2024

I have the same issue. I use default terminal + zsh. I ran into this problem after I used it for a few months.

Could you please try modifying your pam.d to accept touchId on sudo prompt? You can check this repo or just check how it's done in how-does-it-work section and make changes yourself. I think it'll solve the issue for time being meanwhile i'll look for a fix

It works, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants