sveinbjornt / Sloth

Mac app that shows all open files, directories, sockets, pipes and devices in use by all running processes. Nice GUI for lsof.
https://sveinbjorn.org/sloth
BSD 3-Clause "New" or "Revised" License
8.26k stars 156 forks source link

3.1 crashes with code signing error #18

Closed odysseus90210 closed 3 years ago

odysseus90210 commented 3 years ago

macupdate.com has made version 3.1 available, but launching it produces a code signing error.

sveinbjornt commented 3 years ago

The latest version of Sloth is not code-signed because ... Apple sucks and macOS Big Sur is so locked down that it reports non-notarized Developer ID-signed apps as "damaged". You should be able to download the app, Ctrl-click the bundle and select "Open". https://sveinbjorn.org/files/software/sloth/sloth-3.1.zip

odysseus90210 commented 3 years ago

I should have been clearer. That doesn't work -- the app crashes when I ctrl-click and select "open", unlike for Sloth 3.0.1.

sveinbjornt commented 3 years ago

I am unable to reproduce. Could you try running the Sloth binary from the command line? e.g.

cd Sloth.app/Contents/MacOS
./Sloth

And send me the message you get in the terminal?

odysseus90210 commented 3 years ago

./Sloth gives:

zsh: no such file or directory: ./Sloth

I don't have Xcode installed or other developer tools, by the way

sveinbjornt commented 3 years ago

This is strange. Could you Ctrl-clicking Sloth.app, selecting Show Package Contents, navigating through Contents, then MacOS, and then double-clicking the Sloth binary?

odysseus90210 commented 3 years ago

Crashed Thread: 0

Exception Type: EXC_BAD_ACCESS (Code Signature Invalid) Exception Codes: 0x0000000000000032, 0x00000001044b8000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x1044b8000: __LINKEDIT 1044b4000-1044b8000 [ 16K] r--/r-- SM=COW /Applications/Sloth.app/Contents/MacOS/Sloth --> mapped file 1044b8000-1044bc000 [ 16K] r--/r-x SM=PRV Object_id=1e69afdd __TEXT 1045c0000-10463c000 [ 496K] r-x/r-x SM=COW /usr/lib/dyld

sveinbjornt commented 3 years ago

I've updated the 3.1 binary, think I discovered what was wrong. Could you try re-downloading it and see if the problem persists?

odysseus90210 commented 3 years ago

Same problem (using https://sveinbjorn.org/files/software/sloth/sloth-3.1.zip)

sveinbjornt commented 3 years ago

How about now? If this didn't work, I swear I'm giving up on releasing further updates for broken macOS.

odysseus90210 commented 3 years ago

That worked! What did you change, and why didn't you experience the problem on your end?

sveinbjornt commented 3 years ago

This seems to be related to macOS quarantine flags and a bug in Apple's codesign command line tool, which is used during the build process for Sloth. Not entirely sure why I was unable to reproduce, the way macOS handles binaries with signing issues is not well documented and seems to change with every version of the OS.