I’ve tried twice today to pull an existing site down from Flywheel and it got stuck on the Unpacking site… message. In the app folder it has a public-pull-tmp folder which only has the theme and the node_modules folder. Gone are the git related files/folder. The regular public folder looks ok minus the git, package.json and node_modules parts.
I did some research and found this error in the Flywheel log file:
Apr 5, 2018, 10:43 AM CDT - info: [main/waitForMySQL] Querying MySQL
Apr 5, 2018, 10:45 AM CDT - error: [main/index] Error: ENFILE: file table overflow, open ‘/Users/xxxxxxxxx/Library/Logs/local-by-flywheel.log’
This resolved that issue:
http://blog.mact.me/2014/10/22/yosemite-upgrade-changes-open-file-limit
$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536 65536
Then restore files/folders so that Local recognizes WP is there (I always copy the site folder before a pull request in case I need to restore if Flywheel goofs something), go back into Local, start the site, click pull from Flywheel again. Then it worked fine.
Hope this helps someone else like it did me.