bugs/OSX Assistant will not automatically dropgit-annexhttp://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/git-annexikiwiki2018-05-31T12:50:55Zcomment 1http://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_1_9a3a594f983048a9035f385101b394cf/andrew2018-05-04T15:58:59Z2018-05-04T15:58:59Z
<p>Hmmm. I am testing on macOS 10.12.6 with git-annex 6.20180409-gfb0780266 installed from dmg in /Applications</p>
<p>The webapp launch behavior seems a bit odd. If I launch from the command-line <code>git-annex webapp</code> from my <code>/Users/Shared/a1</code> directory, then a webpage loads (for me in Chrome) and no assistant daemons are started, or at least I can't find any with <code>ps aux</code>. If I add files to <code>/Users/Shared/a1</code> the assistant sees them, but it doesn't transfer to my backup repo at <code>/Users/Shared/a3</code>. It seems to only see files from the repo I started git-annex webapp from. Is this the intended behavior Joey?</p>
<p>I have three repos listed at <code>~/.config/git-annex/autostart</code>. If I run <code>git-annex assistant --autostart</code> from one of my repo directories, then an assistant daemon is started for each repo, I can verify that with <code>ps aux | grep "git-annex assistant --startdelay"</code> which lists one assistant process per repository (3 total). If I start the assistants this way, they seem to stick around. Then, I can follow the mentioned archiving video and successfully sync/archive as shown.</p>
<p>I have these errors in <code>system.log</code>: <code>bumblebee git-annex[766]: no path for address 0x107d40000</code>, I don't have anything interesting in any of my daemon.log files. I can't find any other interesting system logs.</p>
<p>—Andrew</p>
thoughts?http://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_2_7901e1211ab86429ef8bd95c72ed89f5/andrew2018-05-20T17:41:28Z2018-05-20T17:41:28Z
<p>Any thoughts Joey? I am happy to troubleshoot this further, but I am not really sure what to test. I do have git-annex building from source on a mac, but I don't have any experience with Haskell, so don't really know what I could be checking.</p>
<p>Thanks. Andrew</p>
comment 3http://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_3_1ba89b95a028ba4a84b22dfd983049fd/jhnichol2018-05-24T19:28:27Z2018-05-24T19:28:27Z
<blockquote><p>Andrew:
" I have three repos listed at <code>~/.config/git-annex/autostart</code>. If I run <code>git-annex assistant --autostart</code> from one of my repo directories, then an assistant daemon is started for each repo, I can verify that with <code>ps aux | grep "git-annex assistant --startdelay"</code> which lists one assistant process per repository (3 total). If I start the assistants this way, they seem to stick around. Then, I can follow the mentioned archiving video and successfully sync/archive as shown. "</p></blockquote>
<p>I have only one repo listed at <code>~/.config/git-annex/autostart</code> which is my laptop. The other repo was created with the webapp on a USB drive; it is bare and will not allow me to start an assistant on it. Again, I cannot successfully sync/archive as shown in the archiving video.</p>
<p>I tried using <code>git-annex version: 6.20180509-gd801a3318</code> but no help.</p>
<p>FYI, I also noticed that clicking the .app now successfully opens the webapp again.</p>
comment 4http://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_4_704ef9c0ed78a00030f7d4d151ecbe5b/andrew2018-05-30T15:24:47Z2018-05-30T15:24:47Z
<p>So <a href="https://git-annex.branchable.com/bare_repositories/">bare repositories</a> should work fine with Assistant.</p>
<p>You said <code>it is bare and will not allow me to start an assistant on it</code>. Do you get an error message from the webapp?</p>
<p>What happens if you manually add the path to your bare USB drive repo to the <code>~/.config/git-annex/autostart</code> file, then run <code>git-annex assistant --autostart</code>? Then is assistant running on it?</p>
comment 5http://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_5_47aa5de003b409d3d2a4c58a0f08a14a/jhnichol2018-05-30T17:36:30Z2018-05-30T17:36:30Z
<p>I started over, making new repos with the webapp & version: 6.20180527-gc3064edac .
I still get an error in the webapp when adding the USB repo .
The USB repo <code>/Volumes/SeagateBlack/annex</code> was not in <code>~/.config/git-annex/autostart</code> , so I added it .
I enabled debugging in the webapp, shutdown the webapp and assistants, and used the terminal:</p>
<pre><code>JamesMac:annex jhnichol$ cd /Volumes/SeagateBlack/annex
JamesMac:annex jhnichol$ git-annex assistant --autostart
git-annex: You cannot run this command in a bare repository.
JamesMac:annex jhnichol$ cd /Users/jhnichol/Desktop/annex
JamesMac:annex jhnichol$ git-annex assistant --autostart
git-annex autostart in /Users/jhnichol/Desktop/annex
[2018-05-30 20:13:45.005716] call: /Applications/git-annex.app/Contents/MacOS/bundle/git-annex ["assistant","--stop"]
[2018-05-30 20:13:45.064878] process done ExitSuccess
[2018-05-30 20:13:45.065006] call: /Applications/git-annex.app/Contents/MacOS/bundle/git-annex ["assistant","--startdelay=5s"]
[2018-05-30 20:13:45.117653] logging to .git/annex/daemon.log
[2018-05-30 20:13:45.507796] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","git-annex"]
[2018-05-30 20:13:45.520686] process done ExitSuccess
[2018-05-30 20:13:45.520806] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","show-ref","--hash","refs/heads/git-annex"]
[2018-05-30 20:13:45.526297] process done ExitSuccess
[2018-05-30 20:13:45.526857] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","log","refs/heads/git-annex..2f0d4e1b6fe058a5cc899012ef99870cd2877d2c","--pretty=%H","-n1"]
[2018-05-30 20:13:45.537446] process done ExitSuccess
[2018-05-30 20:13:45.537572] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","log","refs/heads/git-annex..31d29d92a8a48146cdf9dd4517f5a034daf4a467","--pretty=%H","-n1"]
[2018-05-30 20:13:45.543984] process done ExitSuccess
[2018-05-30 20:13:45.544626] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","cat-file","--batch"]
[2018-05-30 20:13:45.546186] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","core.bare=false","cat-file","--batch-check=%(objectname) %(objecttype) %(objectsize)"]
[2018-05-30 20:13:45.550793] read: git ["config","--null","--list"]
[2018-05-30 20:13:45.556288] process done ExitSuccess
[2018-05-30 20:13:45.557233] logging to .git/annex/daemon.log
[2018-05-30 20:13:45.565149] process done ExitSuccess
ok
git-annex autostart in /Volumes/SeagateBlack/annex
failed
</code></pre>
<p>so you see I got the "You cannot run this command in a bare repository" error from the assistant.
Also, the assistant for the USB drive just fails with no error details.</p>
<p>Thank you so much for your comments! I feel so close to having working software!</p>
bare remotes, workflowhttp://git-annex.branchable.com/bugs/OSX_Assistant_will_not_automatically_drop/comment_6_69781b2f00afe6150bc5997335b8af90/andrew2018-05-31T12:50:55Z2018-05-31T12:50:55Z
<p>Aaah.</p>
<p>So although git-annex does support storing files in bare repositories it treats them in much the same way as git in general. Namely, they are meant to be added as remotes from other full repositories. Assistant is responsible for monitoring a working directory for changes and automatically committing and syncing those changes. Bare repositories don't actually need assistant monitoring them because they don't have a working directory where users are adding and removing files from.</p>
<p>In your case, you want assistant monitoring <code>~/Desktop/annex</code> which it now is. If you then add <code>/Volumes/SeagateBlack/annex</code> as a remote to <code>~/Desktop/annex</code> then assistant, by watching just <code>~/Desktop/annex</code> will sync with all remotes whenever you add remove files in <code>~/Desktop/annex</code>. I imagine you already have your USB drive correctly setup as a remote. Just run <code>git annex info</code> from your <code>~/Desktop/annex</code> directory to see what remotes it knows about.</p>
<p>Once USB is a remote of <code>~/Desktop/annex</code>, then if you launch the webapp from your <code>~/Desktop/annex</code> directory,<code>git-annex webapp</code> you should actually see both <code>~/Desktop/annex</code> and <code>/Volumes/SeagateBlack/annex</code> listed. The webapp automatically lists all remotes your repo knows about.</p>
<p>In terms of workflow, I am not actually sure that using a bare repo is what you want on your USB drive. I always setup normal full git repositories on USB drives (not bare repos). That way I can use Finder to actually browse out to the files on the USB drive, add files when I am on the go, copy files etc… If you use a bare repo, then the files won't actually be listed in a usable form. But, if you don't actually want to ever look at the files on your USB drive (from Finder) then using a bare remote on a USB drive has the advantage that you don't need assistant monitoring it, and is probably marginally faster in some extreme cases since there is no working tree to update.</p>