sboesen / remotely-sync

fork of remotely-save with security upgrades
Apache License 2.0
213 stars 8 forks source link

[Bug]: Vault syncing 171 files after no changes #51

Closed kadisonm closed 11 months ago

kadisonm commented 12 months ago

What happened?

The status bar is jittering and saying there is 171 files to sync on every sync. I have turned on debug mode and it is actually syncing a lot of files, even though no changes have been made to them.

Additionally my obsidian themes and plugin deletions aren't syncing, so everytime I reopen they reinstall. But file changes are still syncing.

080lGfRKzY

What OS are you using?

Windows

What remote cloud services are you using?

OneDrive for personal

Version of the plugin

0.4.21

Version of Obsidian

1.4.16

Using password or not

Ensure no sensitive information

sboesen commented 12 months ago

Could be related to #46

sboesen commented 12 months ago

Thx for the report/gif! Really helps

kadisonm commented 12 months ago

I ran a few syncs to check how many files were syncing. I worked the number out by filtering the console for something with no result, which shows the amount hidden. Then I subtracted the amount hidden by the 'finished' filter hidden.

Test 1: 1991 - 1090 = 901 Test 2: 1994 - 1093 = 901 Test 3: 1994 - 1093 = 901

Not sure why the total changed the first time, but it seems to be syncing 901 files every time. Not sure if this is expected functionality though, I assume the plugin only syncs changed files but I could be wrong. Let me know if this is normal.

lyiton commented 12 months ago

I've also experienced status bar jitter (I mean the increment of the numerator is choppy) and resyncing, but it's not a guaranteed occurrence. And the resynchronization is really happening, it is not showing an error, I saw the PUT and GET requests from the OSS console.

sboesen commented 12 months ago

Related to #44 for sure.

sboesen commented 12 months ago

The jittering is related to #44, will address in that issue. The "syncing lots of files without any changes" is a completely separate issue - could you please take a look at your console logs and let me know what the "decision" is for the files which aren't modified but are syncing? This will help narrow down why items are being sync'd if they shouldn't be.

Modifying this issue's title to focus on syncing unnecessary items.

Screenshot 2023-12-02 at 9 19 38 AM
kadisonm commented 12 months ago

The jittering is related to https://github.com/sboesen/remotely-sync/issues/44, will address in that issue.

All good.

All of them have "keepRemoteDelHist", I can post a screenshot I'm just not sure if any of it is sensitive or not.

I noticed something else odd about it. For some of them (not sure if all or not) the note no longer exists and was moved elsewhere or deleted. I checked my vault and it didn't sync the note back in. Is it trying to update the metadata to say the note was deleted but failing somehow?

kadisonm commented 12 months ago

Not sure if this relates but I updated the plugin and got this.

image

image

It's repeating getJson until it hits the second error then starts over again. So it's stuck in a loop. It said abort sync but I think it's still attempting to sync.

kadisonm commented 12 months ago

I updated the plugin manually through releases due to #54. For some reason when I updated the remotely secure's folder to remotely sync and replaced it's manifest, styles and main, it created another copy of the plugin. This caused #53 to happen again for some reason (but this was probably user error) So I deleted the plugin completely and reinstalled.

The plugin is now syncing and this issue is no longer happening.

But luckily I do have some information I got before updating that might help. The vault was trying to sync a whole folder than didn't exist at that location. My Notes/Old folder was moved to the vault root. I think I might have moved it with explorer but I forgot. Moving this folder might be the reason for this issue.

As for the notes syncing in the existing Old folder, I have no idea why.

Obsidian_rnXaLgfbYz

geerteltink commented 12 months ago

I noticed this today, when I connected another device. As expected, it downloads all the files. On the next start, it starts uploading all files, even though there are no changes. And on the older connected device you can see that it downloads files again, but they are the same.

sboesen commented 11 months ago

I've noticed this behavior, too, I think the current timestamp checking has its limits. I'm keeping this issue open as a bug, but I think #40 really captures the real fix which is doing some sort of hash based comparison.

sboesen commented 11 months ago

Closing this issue in favor of #60 due to the details, but this is the same issue.