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

Synchronisation of read articles across multiple devices is not reliable #1378

Open
smilingj opened this issue Jan 28, 2024 · 6 comments
Open

Comments

@smilingj
Copy link

I use the app on two devices (Samsung Galaxy A71 and Galaxy Tab A8). When I read articles on one device and then want to read more unread articles on the other device, I often get articles that I have already read on the first device displayed again as new.

In the Nextcloud backend, the affected articles are correctly marked as read. Emptying the cache on the second device reliably helps, then the status is synchronised again.

This is feasible, but no good user experience. I thought about always emptying the cache as soon as the app is displayed. This seems a bit aggressive to me, but should solve my specific problem.

Now the question is whether I have a wrong configuration of the app or whether this is a general problem.

Is there anything I can provide additionally to my description?

@David-Development
Copy link
Member

Is the nextcloud news server app up to date? Which versions do you have installed where (nextcloud version, nextcloud news version, nextcloud news android app version, android os version).

How the sync works:

  • Get the newest "last modified" date from the rss items stored on the android device
  • Ask the server about more recent changes (all changes since the "last modified" date)

I can't think of a case where this wouldn't work. If you say that they are showing up as read in the web app that means that the state has been synced.


The article state sync is only triggered every 5 minutes and on every full sync. So if you mark a few items as read on your phone1, sync and then open the app on phone2 (and sync) the articles show up with the correct state.

There was a bug that has been fixed in the server side app: #1105

Maybe also worth reading through the solution mentioned here by Tobias: #1117


@smilingj
Copy link
Author

Ok, this seems to be typical: as soon as you take a closer look at a problem, it can no longer be traced (completely).

I wanted to systematically recreate the error and therefore proceeded as follows:

  1. initiate a refresh on the mobile phone.
  2. initiate a refresh on the tablet.
  3. make sure that both devices show the same latest few entries.
  4. read two entries on the mobile phone (they are marked as read).
  5. trigger a refresh on the mobile phone.
  6. initiate a refresh on the tablet.

The two read entries disappear on the tablet as expected, but the total number of unread articles is different on the two devices. The mobile phone shows 488 unread entries, while the tablet shows 3371 entries. See the attached screenshots. In my opinion, this should not be the case. After clearing the cache on the tablet, it also shows the same 488 entries as the mobile phone.

For the sake of completeness, here are the requested versions:

Server

  • Nextcloud: 28.0.1
  • News: 24.0.0

Tablet (Samsung A8)

  • Android 13 (One UI Core version 5.1.1)
  • News: 0.9.9.85

Mobile phone (Samsung A71)

  • Android 13 (One UI Core version 5.1)
  • News: 0.9.9.85

I am aware that the news app on the server has not been released for the Nextcloud version used. However, as I do not use the web interface and synchronisation with the Android apps works (apart from the problem described above), as does the refresh of the sources, I assume that this does not play a role here. Also because I have been able to observe the described behaviour for some time (several versions).


The tickets mentioned, especially #1105, do indeed seem to be interesting and may describe the same or at least a similar problem. If this is the case (unfortunately I cannot judge this), this request could be closed as a duplicate

I will make sure that I keep an eye on these as well.


Screenshot Phone
Screenshot Tablet

@David-Development
Copy link
Member

@smilingj Thank you for the detailed writeup. Interesting that the total number of unread articles was different. Maybe related to this issue from 2014 - but it's a little different since the ticket is only regarding the initial sync. After the initial sync we only do incremental syncs. In case the sync is interrupted there could be some hickups (in theory it shouldn't matter but I believe this probably happened in your case). Glad to hear that clearing the cache worked for you. Hopefully it solved the issue for good now? Please keep me posted if it diverges again.

@smilingj
Copy link
Author

smilingj commented Feb 7, 2024

Glad to hear that clearing the cache worked for you. Hopefully it solved the issue for good now?

Deleting the cache solves the problem once. Unfortunately, it occurs again and again, so I virtually always have to clear the cache as soon as I switch from one device to another.

A good solution for me would be an option in the settings that allows me to set the cache to always be cleared on refresh. This would probably result in higher data consumption, but would have the advantage that the status is always up to date.

@David-Development
Copy link
Member

What's your server setup like? Are you using a 32bit or 64bit server?

@smilingj
Copy link
Author

It's an Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-94-generic x86_64). The webserver is an Apache/2.4.52. PHP is version 8.1.2. And the database is MySql 8.0.36.

Can I help with any other data?

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