teemii icon indicating copy to clipboard operation
teemii copied to clipboard

ERROR: getAllManga failed

Open kn-f opened this issue 1 year ago • 3 comments

Description

When loading Teemii pages, it tells me that I have no manga in the collection when I do have a few. Error log reports: ERROR: getAllManga failed (further details in the logs below)

This happens because the services.library.getMangaReadStatus call returns null when the manga is not found instead of a manga object with null attributes.

I don't know why this (the data misalignment) happened but I believe that the function should fail in a more graceful manner (i.e. setting the manga as unread) as right now it's showing empty collections.

To fix this I've run this query: update manga set readProgress =0;

Version

0.8.2

Steps to Reproduce

I don't know how to cause the inconsistency but the error happens when the services.library.getMangaReadStatus does not find a manga and returns null

What I see are pages as if I just installed Teemii with no mangas associated

Screenshots

No response

Logs

teemii-teemii-backend-1   | [2024-01-19 13:10:00.014 +0000] INFO: Finished syncing updates with scrobblers.
teemii-teemii-backend-1   | [2024-01-19 13:11:00.008 +0000] INFO: Processing maintenance job.
teemii-teemii-backend-1   | [2024-01-19 13:22:00.006 +0000] INFO: Processing maintenance job.
teemii-teemii-backend-1   | [2024-01-19 13:33:00.004 +0000] INFO: Processing maintenance job.
teemii-teemii-backend-1   | [2024-01-19 13:39:59.711 +0000] ERROR: getAllManga failed.
teemii-teemii-backend-1   |     err: {
teemii-teemii-backend-1   |       "type": "TypeError",
teemii-teemii-backend-1   |       "message": "Cannot read properties of null (reading 'lastUpdated')",
teemii-teemii-backend-1   |       "stack":
teemii-teemii-backend-1   |           TypeError: Cannot read properties of null (reading 'lastUpdated')
teemii-teemii-backend-1   |               at getAllManga (/app/src/controllers/libraryController.js:678:46)
teemii-teemii-backend-1   |     }

Platform

desktop

Device

PC & Mobile

Operating System

Windows 11

Browser

Firefox

Additional Context

Hosted in docker on a linux server Please feel free to ask for further clarifications and help if I can support

Code of Conduct

  • [X] I agree to follow Teemii's Code of Conduct

kn-f avatar Jan 19 '24 14:01 kn-f