question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filewatcher not updating on copied files or changed files

See original GitHub issue

Have noticed today that copied files and changed files are no longer being picked up by the synctrayzor filewatcher when they occur,

If I then create a new file after copying or adding content to a file, the watcher kicks in and all the changed / copied / new files sync

The synctrayzor.log runs this while the files are being copied or edited

2016-04-26 14:18:44.2450 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:18:44.2606 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <GenericEvent ID=310 Type=Ping Time=26/04/2016 14:18:44 Data=null> 
2016-04-26 14:19:44.2568 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:19:44.2724 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <GenericEvent ID=311 Type=Ping Time=26/04/2016 14:19:44 Data=null> 
2016-04-26 14:20:44.2711 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:20:44.2868 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <GenericEvent ID=312 Type=Ping Time=26/04/2016 14:20:44 Data=null> 

and when I create the new file this happens

2016-04-26 14:21:10.5979 #1588 [Info] SyncTrayzor.Services.DirectoryWatcher: Path Changed: c:\localdocs\username\New Text Document.txt 
2016-04-26 14:21:10.5979 #1588 [Debug] SyncTrayzor.Syncthing.ApiClient.SyncthingApiClient: Scanning folder: username subPath: New Text Document.txt 
2016-04-26 14:21:10.6291 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:10.6316 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <StateChangedEvent ID=313 Time=26/04/2016 14:21:10 Folder=username From=idle To=scanning Duration=00:02:47.1550000> 
2016-04-26 14:21:11.8742 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:11.9054 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <LocalIndexUpdated ID=314 Time=26/04/2016 14:21:11 Folder=username Items=2 Version=10128> 
2016-04-26 14:21:12.4202 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.4202 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <RemoteIndexUpdatedEvent ID=315 Time=26/04/2016 14:21:12 Device=<DEVICEID> Folder=username Items=2> 
2016-04-26 14:21:12.5918 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.5918 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <FolderSummary ID=316 Time=26/04/2016 14:21:12 Folder=username Summary=<FolderStatus GlobalBytes=4030809690 GlobalDeleted=1548 GlobalFiles=7356 LocalBytes=4030780634 LocalDeleted=1321 LocalFiles=7356 InSyncBytes=4030809690 InSyncFiles=7356 NeedBytes=0 NeedFiles=0 IgnorePattners=False, Invalid= State=scanning StateChanged=26/04/2016 14:21:10 Version=1296261>> 
2016-04-26 14:21:12.5918 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.6074 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <GenericEvent ID=317 Type=FolderCompletion Time=26/04/2016 14:21:12 Data={"completion":100,"device":"<DEVICEID>","folder":"username"}> 
2016-04-26 14:21:12.8727 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.8727 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <StateChangedEvent ID=318 Time=26/04/2016 14:21:12 Folder=username From=scanning To=idle Duration=00:00:02.2590000> 
2016-04-26 14:21:12.8883 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.8883 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <StateChangedEvent ID=319 Time=26/04/2016 14:21:12 Folder=username From=idle To=syncing Duration=00:00:00> 
2016-04-26 14:21:12.9688 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.9688 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <StateChangedEvent ID=320 Time=26/04/2016 14:21:12 Folder=username From=syncing To=idle Duration=00:00:00.0940000> 
2016-04-26 14:21:12.9913 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.9913 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <FolderSummary ID=321 Time=26/04/2016 14:21:12 Folder=username Summary=<FolderStatus GlobalBytes=4030809690 GlobalDeleted=1548 GlobalFiles=7356 LocalBytes=4030780634 LocalDeleted=1321 LocalFiles=7356 InSyncBytes=4030809690 InSyncFiles=7356 NeedBytes=0 NeedFiles=0 IgnorePattners=False, Invalid= State=idle StateChanged=26/04/2016 14:21:12 Version=1296261>> 
2016-04-26 14:21:12.9913 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: Received 1 events 
2016-04-26 14:21:12.9913 #1588 [Debug] SyncTrayzor.Syncthing.EventWatcher.SyncthingEventWatcher: <GenericEvent ID=322 Type=FolderCompletion Time=26/04/2016 14:21:13 Data={"completion":100,"device":"<DEVICEID>","folder":"username"}> 

running SyncTrazor version 1.1.8.329 and syncthing v0.12.22, I tried going back to v0.12.21 as that was a recent change, but it has the same issue

I’m quite confused as I’m 100% sure this was working when testing SyncTrayzor and for the first dozen users rolled out, but now I’m seeing it when trying to copy or edit files on any device.

If I run Rescan on a device with changed or copied files, it picks them up and syncs them to the other device

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:53 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisshearingcommented, Apr 27, 2016

quick test and seems to be working! creating files, adding content to files and copying files are now all being picked up by the filewatcher and being synced in realtime again!

So looks good!

Thank you very much! 😃

0reactions
chrisshearingcommented, May 4, 2016

Thanks for all the extended checking, sorry I wasn’t so clear at some points,

I’ll open an issue with Syncthing as you suggested,

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - FileSystemWatcher not raising when files are copied or ...
But the problem is , it raises a event a new file is created/deleted in the folder but does not raises event when...
Read more >
FileSystemWatcher.Changed Event (System.IO)
The Changed event is raised unexpectedly when a file is renamed, but is not raised when a directory is renamed. To watch for...
Read more >
FileSystemWatcher Class (System.IO)
The component is set to watch for changes in LastWrite and LastAccess time, the creation, deletion, or renaming of text files in the...
Read more >
File watcher on Windows sometimes stops working for ...
In the copied folder, add/modify/delete some files. Delete the original folder (on the disk), and immediately replace it with the copied one.
Read more >
Watching a Directory for Changes (The Java™ Tutorials > ...
One way to do so is to poll the file system looking for changes, but this approach is inefficient. It does not scale...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found