-
Notifications
You must be signed in to change notification settings - Fork 241
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
Fork app commit process hangs with lolcommits enabled #390
Comments
For more info, can you visit the repo on your machine in a console window and paste the output of this?
Also, can you paste the output of this git hook file in the repo?
I did release a new version of the gem recently that modified the PATH set in the git hook, so that may have something to do with it. Finally, how (and where) is Ruby installed on your machine? RVM, rbenv, chruby, system ? |
This isn't for the same repo that's in the video, but it experiences the exact same problem.
System version of ruby:
|
Stumbled upon another hint: when committing through Fork, the imagesnap process never quits. After trying out several commits with Fork + lolcommits, I had seven imagesnap processes show up in Activity Monitor. If I tell those processes to quit via Activity Monitor, Fork stops hanging on those commits and behaves as expected. When committing via CLI, the process quits as expected. |
I was wrong before, it's not always taking a photo when in hangs in Fork. At least I'm not seeing it happen anymore. |
Alright, so I switched to using GitUp and that worked fine. However, on first commit it brought up the system dialog for requesting camera access. Fork has not done this, but both GitUp and |
Hi @donut, thanks for reporting this and sharing your video. Sorry for the super late reply, I started looking into this a few days ago and have been following along with your comments. I originally suspected that Mojave's new privacy permissions might have something to do with this. I was able to replicate the issue with Fork. It fails to capture anything and hangs on the imagesnap process. The videosnap process hangs too when capturing an animated gif. When capturing with git on the command line (in iTerm or Terminal) you would have been presented with a dialog (shown below) to consent to imagesnap (or videosnap) accessing the camera. They get added to this app list in System Preferences -> Security & Privacy -> Privacy -> Camera Unfortunately for some reason - due to the way Fork launches the installed git hook at The normal sequence of a lolcommit capture process is; git-hook (/bin/sh) -> lolcommit (ruby) -> launches a child process with Open4 to -> imagesnap/videosnap (ObjC executable binary) It is interesting that GitUp works OK - I'll try GitHub Desktop and see how that goes. Maybe I can inspect the running processes and compare to what Fork is doing. I can offer one 'hacky' workaround I cobbled together to get Fork to lolcommit. again. On StackOverflow, I noticed that people have been using Automator or AppleScript to wrap a bash script and get around the permissions dialog not showing. So this approach works (although there is a significant delay between committing and capturing due to the layers of indirection). Create a new Automator 'application', with the "Run Shell Script" action having the following code:
Save this Automator app (or export it) to your ~/Applications folder; give it a name you'll remember. Then edit
The proper way to solve this problem is to update both imagesnap and videosnap to use the latest Apple APIs for Camera permissions. I maintain videosnap, imagesnap is quite old and not really maintained. If we start to get more reports of this issue with other Desktop clients, I'll prioritise this; and I'll try out GitHub Desktop. |
So GitUp works fine, GitHub desktop does nothing, I can't get it to execute any hooks at all (pre or post) |
So this also fails with Git Tower having the same issue; the hacky workaround I suggested works, but it's not ideal. I'll see if/when I can prioritise a fix for ImageSnap and VideoSnap. |
Thanks for the work-around, @matthutchinson! I modified it a bit to make it more generic and wrote a little script to make enabling easier. Updated Automater bash script: cd "$1"
/usr/local/bin/lolcommits --capture --device 'FaceTime HD Camera' Make sure to set "Shell" to "/bin/bash" and "Pass input" to "as arguments". Then put this shell script somewhere in your path with execute permissions: #!/usr/bin/env bash
if [[ ! -d .git ]]; then
echo "No .git directory"
exit 1
fi
if [[ "$(which lolcommits)" = "" ]]; then
echo "lolcommits not installed"
exit 1
fi
pch=.git/hooks/post-commit
if [[ ! -f ${pch} ]]; then
echo "#!/bin/sh" > ${pch}
chmod +x ${pch}
else
echo "Disabling lolcommits just in case."
lolcommits --disable
fi
echo -n "Adding hook..."
echo "### lolcommits hook (begin) ###" >> ${pch}
echo "open /Applications/lolcommits-capture.app --args '$(pwd)'" >> ${pch}
echo "### lolcommits hook (end) ###" >> ${pch}
echo "done."
Just need to update the path to the Automater app. With this, you can disable it with |
@matthutchinson This still isn't working, but it also isn't hanging any more. Works fine on command line. With the
Automator approach still works. |
Ok, thanks for trying and letting me know. |
I recently moved to a new computer with a fresh install of macOS Mojave and since then Fork hangs on commit/amend when lolcommits is enabled. The commit happens and the photo taken, but that commit process just hangs. This didn't happen on my old MacBook with the same version of Mojave (10.14.4).
I can't figure out what's going on. Adding the
--fork
and/or--stealth
flags does nothing.Video of the issue: https://www.rightthisminute.com/tools/jw/videos/EQtYHKgA/play?force_hq=1
(In the video you see this happening on an iMac. I was using that while I waited for a new computer. I'm also experiencing this on a 2018 15" MBP).
The text was updated successfully, but these errors were encountered: