MacEnhance / MacForge

📦 Plugin, App, and Theme store which includes plugin injection for macOS
https://www.macenhance.com/macforge
MIT License
1.05k stars 47 forks source link

Major Bug Causes Permanent Beach Ball #34

Open rbreaves opened 4 years ago

rbreaves commented 4 years ago

Bug Report

Current Behavior Was using my computer like normal and then it beachballed. Rebooted and it still beachballed and could not do anything. Had to proceed to ssh in and check things out and this is what I found.

To Reproduce Steps to reproduce the behavior: Not sure, an apparent mismatch of certs occured

Expected behavior/code Program to cleanly exit if the signature is bad?

Screenshots

tail -20 /var/log/system.log

May 12 00:10:15 RMac com.w0lf.MacForge.Injector[2356]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a breakpoint on _dispatch_bug_deprecated to debug
May 12 00:10:15 RMac com.apple.xpc.launchd[1] (com.w0lf.MacForge.Injector[2356]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.w0lf.MacForge.Injector.mach
May 12 00:10:58 RMac com.apple.xpc.launchd[1] (com.apple.mdworker.shared.09000000-0000-0000-0000-000000000000): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
May 12 00:11:04 RMac com.apple.xpc.launchd[1] (com.apple.mdworker.shared.05000000-0000-0000-0000-000000000000): Service only ran for 5 seconds. Pushing respawn out by 5 seconds.
May 12 00:11:05 RMac com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0A000000-0000-0000-0000-000000000000): Service only ran for 6 seconds. Pushing respawn out by 4 seconds.
May 12 00:11:07 RMac com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0B000000-0000-0000-0000-000000000000): Service only ran for 9 seconds. Pushing respawn out by 1 seconds.
May 12 00:11:08 RMac com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0C000000-0000-0000-0000-000000000000): Service only ran for 9 seconds. Pushing respawn out by 1 seconds.
May 12 00:11:31 RMac com.w0lf.MacForge.Injector[2481]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a breakpoint on _dispatch_bug_deprecated to debug
May 12 00:11:31 RMac com.apple.xpc.launchd[1] (com.w0lf.MacForge.Injector[2481]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.w0lf.MacForge.Injector.mach
May 12 00:11:31 RMac LuLu[120]: LuLu(120) ERROR: signing authority mismatch for /usr/libexec/xpcproxy (
            "Software Signing",
            "Apple Code Signing Certification Authority",
            "Apple Root CA"
        )/(
            "Developer ID Application: wolfgang baird (EX596BNL45)",
            "Developer ID Certification Authority",
            "Apple Root CA"
        )

Environment

Possible Solution Exit program cleanly if something is wrong with the signature?

Additional context I am not sure why it appears like my LuLu firewall caught it - maybe it was the actual cause of my system hanging instead of macforge?? Either way I assume this is a real problem?

donmurdoc commented 4 years ago

I had been using Macforge (just with afloat plugin) and now I start getting kinda this same bug. When I open macforge, it crashes desktop/finder, can't click on stuff. I can open a terminal with spotlight and sudo reboot. But closing macforge doesn't fix this, I need to reboot. If I remove afloat, I can open macforge ok, but if I add it, I get the same bug again.

rbreaves commented 4 years ago

I should have mentioned in my original post that the only reason I use macforge is for the afloat extension so perhaps that is the issue - inconjunction w/ something.. don’t know what.

I’m hardly using macOS atm so unless I boot back into it I can’t really do any tests. I imagine I just left it disabled/uninstalled after this bug.

I recently had to resign AltDeploy on the same system.. I wonder if the command I used to do that would fix afloat or not.

donmurdoc commented 4 years ago

I'm not a programmer or anything but I'm always messing around with stuff that I shouldnt. Something I did recently is to run this command sudo xcode-select --reset

Cause it wouldn't let me run cmake to compile a software. Maybe this did something wrong?

rbreaves commented 4 years ago

If you find the same command I had earlier then you’re not really recompiling the software from source - somehow it’s allowed to resign binaries in macOS & yea you’ll probably need Xcode installed 1st via that command.

rbreaves commented 4 years ago

I booted back into macOS so I could document what the command was exactly that fixed AltDeploy. I was unable to document it on that specific repo because the author of it had set it to be "archived" and no further updates are planned.

codesign --force --deep --sign - /Applications/AltDeploy.app

I also have certain sip and gateway security stuff disabled while having ran that command, but no idea if that is required or not.

donmurdoc commented 4 years ago

Wait I think I lost you. What is codesign for?

What I mean is that, when I run xcode reset command, it seems to have broken afloat...just because it happened in the same day.

rbreaves commented 4 years ago

Wait I think I lost you. What is codesign for?

What I mean is that, when I run xcode reset command, it seems to have broken afloat...just because it happened in the same day.

Oh I didn't read that full command you had posted, I was on my phone at the time. I thought you mentioned installing xcode via command line not that your may have broken afloat by resetting it via command line. At any rate I was able to fix a certificate related error with another app by codesigning the app via the terminal just fine.

I am just suggesting that if you point it to the right binary then maybe it can be resigned by you in some way that'll resolve the error, I am not sure.

donmurdoc commented 4 years ago

Ah ok, got you. So, you mean I should try running codesign on xcode? Or maybe some other app that broke afloat ?

rbreaves commented 4 years ago

Ah ok, got you. So, you mean I should try running codesign on xcode? Or maybe some other app that broke afloat ?

Yea, I'd probably see about running it against the afloat extension itself or the macforge app or injector component, if it is a separate binary? I am not sure what file or the file location I would try running it against exactly. I assume if it doesn't work then no harm would be done.