stephenh / mirror

A tool for real-time, two-way sync for remote (e.g. desktop/laptop) development
Apache License 2.0
391 stars 35 forks source link

Local folder doesn't appear to sync anymore #9

Closed jdb8 closed 6 years ago

jdb8 commented 6 years ago

I had a folder which synced fine, but something seems to have happened which causes mirror to send no updates (other than during the initial scan).

I verified that watchman is listening to the changes via https://facebook.github.io/watchman/docs/watchman-replicate-subscription.html (from https://github.com/facebook/watchman/blob/master/python/bin/watchman-replicate-subscription), but something must be lost along the way inside mirror which causes it to ignore these changes after the subscription returns info.

It only seems to happen for one folder at the moment (which I unfortunately don't want to share entirely because it has sensitive work data in it), but I can't see anything special about it. And if my memory serves correctly, it did use to sync as of a couple of days ago.

I opened #8 since I got stuck trying to add print statements etc. which I would do to try and track this down further. From browsing the github source, I also lost track of where the watchman subscription is handled in the code to work out why it might be ignored.

I tried using the --debug flag, but it didn't print any DEBUG statements :(

stephenh commented 6 years ago

Ah, sorry, I will update the readme; this is cryptic, but --debug accepts a list of prefixes to turn on debugging for. E.g. --debug some/problematic/path. If you have the same path being stubborn, that should be helpful.

...probably should just rename --debug to --debug-prefixes and make --debug be everything...

Let me know if that gives you any useful output/hints as to what is going on.

stephenh commented 6 years ago

I pushed a commit that removes --debug and replaces it with --debug-all and --debug-prefixes. Let me know if that helps your investigation. I also added a note to the readme about the help command for both the mirror client and mirror server commands.

stephenh commented 6 years ago

Closing given lack of response/reproduction.

Thanks for the issue though, @jdb8, as the debug-all/debug-prefixes CLI improvements that your report motivated are working out well, I think.

Happy to help if you end up trying again at some point. Thanks!

nathantsoi commented 5 years ago

sry to re-open this, but I have a (maybe) related issue. mirror works fine after a reboot and for a while, but when i shutdown the server and/or disconnect my client it stops syncing with:

... INFO  Server has 257 paths
... INFO  Tree populated
... INFO  Connection status: Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null}
... INFO  Stopping session

which is fine, but then when i start the server again, then start the client, it hangs at:

... INFO  Increasing file limit to 9223372036854775807

until I reboot my mac (client) and then everything is fine again.

I am running little snitch as well, but i don't see any blocked traffic.

i also tried with mirror client --debug-all ... and got the same output