mihonapp / mihon

Free and open source manga reader for Android
Apache License 2.0
7.9k stars 320 forks source link

Global updates breaking DBs of entries. (Mangadex specifically) #162

Open serveral1 opened 5 months ago

serveral1 commented 5 months ago

Steps to reproduce

  1. Add any random entry from mangadex to library
  2. Mark all chapters as read
  3. Start global update
  4. See chapters from entry missing/duplicated/marked as unread

Expected behavior

Chapter list from the entry to not break after a global update

Actual behavior

Entry's DB seem to break up after a global update, making some chapters appear as missing/unread/duplicated

Crash logs

No response

Mihon version

TachiyomiSy 1.10.2 (Based on latest Mihon version)

Android version

Android 10

Device

SP-6150

Other details

A few days ago I made a similar issue on the "other" repo where an issue pertaining a source would be made in, however they closed that issue saying it was an app issue and not something that they could fix (I won't cross link the issue here due to policy reasons but you can find it on my profile activity).

There's some relevant info in that other issue that I don't really want to reiterate. However, since then I've figured out a bit more about what's happening, and it seems to be something related to connection issues when the global update happens (yesterday I did a global update and it went fine, however today I was downloading some stuff on my PC when the global update happened on my phone and issues arose again). Now, my connection isn't exactly the fastest and entries failing to update due to connection issues have happened before, however it was only after the 0.15 update that my manga entries started breaking like this: 297150348-848e4ae4-21b5-4d67-91b4-e77f48ab95c2 With these kind of errors: Screenshot_20240120-142448 Screenshot_20240121-144505

I'm also making the issue here and not on SY's repo because another user (in that other issue I mentioned) also managed to reproduce the behavior on 0.15.3

Acknowledgements

BraveSoldat commented 5 months ago

I seem to be having this same bug. At the very least the duplication of chapters has happened to me. I first noticed this on Tachiyomi so I made the switch over to Mihon to see if this happens there too. I still haven't noticed this on Mihon, but the duplicated chapters carried over to Mihon with the backup.

Macx6 commented 4 months ago

I also have this issue, but even more severe. With global update I notice duplicated/missing chapters, read chapters marked as unread and broken chapter date times resulting in complete mess in my library.

Screenshot (Feb 18, 2024 11-10-36)

When I update specific title it fixes date times and missing chapters but not duplicate chapters/unread.

I'm using SY 10.0.2, but update to 10.0.4 didn't fix this. I checked logs but on default log level couldn't find anything specific and I don't think it's related to internet as I think my connection is quite stable and fast enough. I wonder if this is some kind of corruption with library database when global update is performed.

serveral1 commented 4 months ago

Well, I've pretty much mitigated the issue by disabling the scheduled updates and just doing the global updates myself.

I've noticed however that the download index sometimes just breaks whenever I open up the app after a while, so maybe that is part of the issue as well, though I have no idea why it's just mangadex that is being affected.

BraveSoldat commented 4 months ago

This is just an idea but, could this be because we have both Mihon and Tachiyomi installed? I noticed that even though I set up Tachiyomi to never update (manual update), and Mihon to update every twelve hours, the library kept being updated on Tachiyomi and it never updated on Mihon, unless manually updated. Perhaps having both apps installed caused some kind of conflict, perhaps with the extensions, because since I uninstalled Tachi and left only Mihon, it began auto-updating properly.
Also this issue with repeated chapters stopped altogether.

serveral1 commented 4 months ago

I only have SY installed, so I doubt it's an app conflict issue. Either way I'm a little apprehensive on trying to replicate the issue anymore on my end since it's a bit annoying to get all my entries back in order.

Macx6 commented 4 months ago

Now I have only SY, but I tried other versions and uninstalled them after. Also removing and reinstalling extensions didn't fix the problem. For now I just update whole library as many entries have irregular update cycle and it's irritating to check them separately.

@serveral1 is manual category update working for you without problems?

serveral1 commented 4 months ago

yeah, triggering the global update manually works for me without a hitch, it's the automated global updates that seem to break everything when the app is closed/sleeping.

Macx6 commented 4 months ago

Now I think my app is completely broken as disabling automatic update did nothing. Library is somehow updating itself despite setting automatic updates to "Off". Ordering in library is bugged as well - with "Latest chapter" entries with last chapter from 2023 are before manga updated today and now manually updating that entry does nothing - it's stuck in wrong order.

I think clean install is the way to go at this point.