Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync: sometimes sync locks on syncing files over and over #8287

Closed
1 of 2 tasks
croogie opened this issue Jan 9, 2023 · 20 comments
Closed
1 of 2 tasks

Sync: sometimes sync locks on syncing files over and over #8287

croogie opened this issue Jan 9, 2023 · 20 comments
Assignees
Labels
awaiting-response Issue will be closed if a reply is not received encryption Logseq Sync need-to-reproduce More clues are required to reproduce the issue. priority-A

Comments

@croogie
Copy link
Contributor

croogie commented Jan 9, 2023

Search first

  • I searched and no similar issues were found

What Happened?

I opened logseq mobile app. Sync starts but can't finish trying to sync particular numer of files. Look like sync doesn't know that everything has been synced.

(Are there any logs?)

Reproduce the Bug

Tbh I don't know how to reproduce. From time to time it just happens.
Usually unlinking graph and linking it back do the work.

Expected Behavior

Everything is synced and I can see green indicator.

Screenshots

No response

Desktop or Mobile Platform Information

Android 13, Logseq mobile app. Everything in newest versions as I'm using Pixel phone (5)

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@croogie
Copy link
Contributor Author

croogie commented Jan 9, 2023

screen-20230109-183313.2.mp4

Here's behavior I experience

@cnrpman
Copy link
Collaborator

cnrpman commented Jan 10, 2023

@cnrpman cnrpman added need-to-reproduce More clues are required to reproduce the issue. awaiting-response Issue will be closed if a reply is not received labels Jan 10, 2023
@Audamus
Copy link

Audamus commented Jan 12, 2023

Having the same issue but with the desktop app (version 0.8.16) am unable to complete sync, no issue with IOS app though. Also seems to be stopping any changes from syncing. No luck with resetting remote graph but may be doing incorrectly...

Loop behavior:
Logseq sync issue

@RCmerci
Copy link
Contributor

RCmerci commented Jan 13, 2023

@Audamus could you provide logs in console and ~/Library/Logs/logseq/main.log when this loop happening?

@cnrpman
Copy link
Collaborator

cnrpman commented Jan 13, 2023

Any info about network environment?

@croogie
Copy link
Contributor Author

croogie commented Jan 13, 2023

@Audamus could you provide logs in console and ~/Library/Logs/logseq/main.log when this loop happening?

I'll check it next time it happens.

@croogie
Copy link
Contributor Author

croogie commented Jan 13, 2023

Any info about network environment?

Network you mean that I'm on really reliable WiFi with the fiber. Didn't have any problems but I'll think about these circumstances when it happens next time

@Audamus
Copy link

Audamus commented Jan 13, 2023

@Audamus could you provide logs in console and ~/Library/Logs/logseq/main.log when this loop happening?

Nothing showing up in the main.log when the loop happens but shows in the console (below - 3 repeats shown only)

[full-sync(remote->local)] 4 files need to sync
instrument.js:191 update-local-files 6305ba26-68fe-4f16-b1a3-974327a28c96 C:/Users/Christopher/Documents/Logseq (journals/2022_08_07.md journals/2022_05_23.md journals/2022_07_06.md)
instrument.js:191 [SyncManager 6305ba26-68fe-4f16-b1a3-974327a28c96 ] remote->local-full-sync -> remote->local-full-sync :reason nil :local-txid 0 :now 2023-01-13T06:21:57.495Z
instrument.js:191 :frontend.fs.sync/diff-file-metadata-sets-elapsed-time 1.2000000029802322 ms
instrument.js:191 [full-sync(remote->local)] 4 files need to sync
instrument.js:191 update-local-files 6305ba26-68fe-4f16-b1a3-974327a28c96 C:/Users/Christopher/Documents/Logseq (journals/2022_08_07.md journals/2022_05_23.md journals/2022_07_06.md)
instrument.js:191 [SyncManager 6305ba26-68fe-4f16-b1a3-974327a28c96 ] remote->local-full-sync -> remote->local-full-sync :reason nil :local-txid 0 :now 2023-01-13T06:22:02.205Z
instrument.js:191 :frontend.fs.sync/diff-file-metadata-sets-elapsed-time 1.7000000029802322 ms
instrument.js:191 [full-sync(remote->local)] 4 files need to sync
instrument.js:191 update-local-files 6305ba26-68fe-4f16-b1a3-974327a28c96 C:/Users/Christopher/Documents/Logseq (journals/2022_08_07.md journals/2022_05_23.md journals/2022_07_06.md)
instrument.js:191 [SyncManager 6305ba26-68fe-4f16-b1a3-974327a28c96 ] remote->local-full-sync -> remote->local-full-sync :reason nil :local-txid 0 :now 2023-01-13T06:22:06.855Z
instrument.js:191 :frontend.fs.sync/diff-file-metadata-sets-elapsed-time 1.2999999970197678 ms
.......continues to repeat

@cnrpman
Copy link
Collaborator

cnrpman commented Jan 13, 2023

@Audamus Seems it's about expired token. Does restarting Logseq help?

@Audamus
Copy link

Audamus commented Jan 13, 2023

Tried restarting and fresh install. Issue is also present on both my Macbook and windows machine. Is there a way to clear everything being synced and starting fresh? Procedure to reset remote graph gets overridden by synced files

@cnrpman
Copy link
Collaborator

cnrpman commented Jan 13, 2023

@Audamus Do you mean this? https://discuss.logseq.com/t/im-using-logseq-sync-what-should-i-do-if-i-am-experiencing-sync-issues/13599#how-to-reset-a-remote-graph-9
What's the meaning of

gets overridden by synced files

It should be a fresh graph if you reset the remote graph. Then you can download the new remote graph.

@RCmerci
Copy link
Contributor

RCmerci commented Jan 13, 2023

@Audamus could you try to delete the remote graph & create a new one & upload again?

@Nek
Copy link

Nek commented Feb 20, 2023

I'm having the same issue.
I've tried:

  • reinstalling the apps
  • re-downloading remote graph

@cnrpman
Copy link
Collaborator

cnrpman commented Feb 20, 2023

@cnrpman cnrpman removed the awaiting-response Issue will be closed if a reply is not received label Feb 20, 2023
@Nek
Copy link

Nek commented Feb 21, 2023

@cnrpman creating a new new one and uploading it makes Logseq tell me there is already a remote graph. Then it syncs with it and I have the same problem.

@cnrpman
Copy link
Collaborator

cnrpman commented Feb 21, 2023

@Nek

Logseq tell me there is already a remote graph

May use a new name for the graph directory, or you can remove the remote graph when you have your data backup.
image

@Nek
Copy link

Nek commented Feb 21, 2023

Oh. I couldn't find the remove button. I found it under All Graphs.
Removing the graph didn't help but I managed to narrow down the problem and find the solution.
The problem was I had some leftover encrypted files. I deleted them and sync succeeded.

I had to make sure bak files with encrypted data were deleted too.

@cnrpman
Copy link
Collaborator

cnrpman commented Feb 21, 2023

@Nek Are the encrypted files in some special naming pattern?
Maybe we can do something for them 👀

@Nek
Copy link

Nek commented Feb 21, 2023

@cnrpman Not a naming pattern, but the content of such a file is very specific:

-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxdlVYMVh3dmhISnMvRUN5
...
gfBB2XNCqB9ghBtfB2avLfLOV0Hu63Kp
-----END AGE ENCRYPTED FILE-----

@cnrpman
Copy link
Collaborator

cnrpman commented May 12, 2023

For the issue in the ticket, sounds fixed by #8792

For the issue of @Nek , no further clue on why the file is encrypted.
For the in-app on-disk encryption, it's deprecated for 6 mo: https://discuss.logseq.com/t/deprecation-of-on-disk-encryption/12334
The only available in-app encryption is the Logseq Sync end-to-end encryption, which have nothing to do with the on-disk text file.

Feel free to reopen if the issue persisted.

@cnrpman cnrpman closed this as completed May 12, 2023
@cnrpman cnrpman added the awaiting-response Issue will be closed if a reply is not received label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response Issue will be closed if a reply is not received encryption Logseq Sync need-to-reproduce More clues are required to reproduce the issue. priority-A
Projects
None yet
Development

No branches or pull requests

6 participants