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

[Bug] Mobile: Sync issues #7645

Open
rupak-sinha opened this issue Mar 29, 2025 · 13 comments
Open

[Bug] Mobile: Sync issues #7645

rupak-sinha opened this issue Mar 29, 2025 · 13 comments

Comments

@rupak-sinha
Copy link

Bug Description

I had writings in a page on mobile which never got synced with the desktop and the contents of the Linux desktop erased what was on the mobile!

This is the second time it has happened and there is no way to get that original content back!

How to Reproduce

I don't know how to reproduce the issue. But this is exactly what I did.

Write content on Android mobile app.
Shut it down.
Write content on Linux desktop app.
Shut it down.
Open mobile app.
Previous content from mobile which hadn't synced got erased.

Expected Behavior

The mobile content would sync with the desktop and not get erased.

Operating System

android

AppFlowy Version(s)

0.8.7

Screenshots

No response

Additional Context

No response

@khorshuheng
Copy link
Collaborator

Is this on every single page on the mobile, or only certain pages?

And are you using the managed service or the self hosted deployment?

@khorshuheng
Copy link
Collaborator

khorshuheng commented Apr 4, 2025

@rupak-sinha If you are using the managed service, could you send us your email, via discord or the appflowy support email? Alternatively, if you still have documents that never get synced with desktop, you can publish the document via mobile (assuming there is no sensitive info), and share the link with us.

@rupak-sinha
Copy link
Author

I was using the built-in managed sync service.
Also it has happened twice on different pages. Once while syncing between Windows and Android and once between Linux and Android.
Both times, I had created the text on a page in Android. Then after a while/few days, I opened up the desktop versions and it didn't sync the content. I hadn't noticed it till I opened up the android app and it erased the content I had created.

I will send my email address as well as publish the page and send the link to the support email.

@khorshuheng
Copy link
Collaborator

When you create a new page on android, does the folder get synced? i.e. you can see the document on desktop as well, just not the content you created on mobile. Or do you mean, even the folder is completely erased and replaced with the one from desktop?

@rupak-sinha
Copy link
Author

@khorshuheng it was actually a block of content on a single page - both times. That didn't get synced.

@rupak-sinha
Copy link
Author

To add to this issue, just today noticed another sync discrepancy between Android and Linux.

These screenshots were taken at the same time on both devices - look at the clocks!

Note that the name of the second book of C.S. Lewis shows up in the Dreams section and not in the Books section.

I took the screenshot in a hurry think that after some time it will probably sync up, but it still shows up as the same on the desktop.

Image

Image

The edit was made on the Android app first and the desktop app was opened a while later.

Also, I am not sure how the published pages work with sync, but as I had published the page on your request to help look into the issue, that has still not updated. Is that an intended behaviour till it is republished?

https://appflowy.com/63b304fb-fed8-43ad-8846-22a9be20defc/Scribbles-42a90e62-1159-4fbd-b009-4f10b2a2819b

If you need any further help, please let me know.

Thanks,
Rupak

@khorshuheng
Copy link
Collaborator

The published page does not update until you republish them. That's one reason why we asked you to publish the page - it's so that we can capture the exact state of the document as perceived on the client's end at the time it is published.

@rupak-sinha
Copy link
Author

@khorshuheng Thanks for the explanation.

Just now from the Linux Desktop app, I unpublished the page and re-published it at this location:
https://appflowy.com/63b304fb-fed8-43ad-8846-22a9be20defc/Scribbles

What is really interesting is that even though the page on the desktop still shows the same as the image above (2nd book name in the Dreams section), the published page shows the content in the correct location as in the Android app!

This shows that the rendering on the AppFlowy Linux desktop app is not reflecting the changes.

Platform Details:
Desktop: Fedora 41 KDE Spin with all the latest updates, no VPN (apart from PortMaster running).
Mobile: Google Pixel 4a 5G with Android 14 and current security patches. Also, no VPN, but running Duckduckgo App Tracking Protection (that's why you can see the VPN key icon at the top).

Both are on the same home Wi-Fi network.
Both apps are the latest versions.

@khorshuheng
Copy link
Collaborator

khorshuheng commented Apr 7, 2025

We did reproduce what you have reported here, though we haven't found the exact root cause yet. Basically there are two different scenarios:

  1. Some changes that are present on the client, but not the server, are never sent to the server, even though the client can still receive (and send) future updates from other devices.

Usually the updates are sent to the server as the changes are made, but due to network issues there could be updates that are dropped. In this scenario, when the document is reopened, or periodically, there will be a process that compares the difference between the current documents and the server's version, and missing updates will be sent. From your description, it appears that this process might not have worked correctly as intended.

  1. Position of an added block is wrongly moved to another one. This might not be a sync issue between the client and server, but rather, discrepancy between what you observed on the UI, and the underlying data structure representing the document.

Chances are, when you navigate to another doc and come back on mobile, the block position becomes incorrect too.

Edited: just seen your reply. We will check the published doc.

@rupak-sinha
Copy link
Author

rupak-sinha commented Apr 7, 2025

Chances are, when you navigate to another doc and come back on mobile, the block position becomes incorrect too.

I tried that on mobile, but it didn't change anything.

However, when I went to another page on desktop and navigated back to that page, it had updated to the correct location.

Seems like the issue is actually on the desktop and not mobile.

When I had originally lost the content twice, it was created on mobile and not updated on desktop. At that point, I had not tried navigating away and back again. Instead, I created further content on that page, which would have changed the internal data structure, making any recovery impossible.

Well, that makes sense now. Thanks for the explanation.

However, to add a bit more complexity to the issue, the first time I lost content was on the Windows app, (running on Windows 11) - I dual boot my laptop. I rarely use Windows unless there is a specific software need, so have been noticing the issues mostly on Linux.

Edit: content was created on mobile first.

@khorshuheng
Copy link
Collaborator

Thanks for the detailed report. By the way, assuming that you haven't made any changes yet - how does the document looks like on the web version (appflowy.com/app)? Is it consistent with the android version? And does the desktop version keep showing the wrong result?

@rupak-sinha
Copy link
Author

Just logged in to the web version to check - it shows the correct layout.

After publishing, when I saw your previous message, I navigated away from the page on desktop and back and now it shows the correct layout as well.

@rupak-sinha
Copy link
Author

One thing I forgot to mention about the desktop app is that it is a flatpak. Though I prefer RPM over flatpak, there are many unmet dependencies when installing the RPM package, so I went with flatpak.

I am mentioning this as I have noticed issues with flatpaks of other apps. Not sure whether it will be of any significance in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants