Open ariedeleen opened 7 months ago
First off, thank you for updating. From the brief logs, it looks like all the migrations ran correctly.
First step I'd ask is to use an incognito window to try and load Kavita up to rule out any caching. You're updating nearly 8 months of releases in one go.
Let me know. Of those that have updated from 0.7.8, only one had a critical issue.
Thanx for the reply. Tried incognito mode. And ctrl F5. Updating in steps to jvmilazz0/kavita:nightly-0.7.8.7 goes well. jvmilazz0/kavita:nightly-0.7.8.8 gives a sql error. But it works so so. See log sql error.
Updating to jvmilazz0/kavita:nightly-0.7.8.9 then there is no 'data' anymore. And there are no obvious errors in the log. It looks the same as 0.7.13.0
"[Kavita] [2024-02-10 16:03:33.244 +01:00 6] [Information] API.Program Running Migrations - complete [Kavita] [2024-02-10 16:03:33.388 +01:00 1] [Information] API.Startup Starting with base url as / Kavita - v0.7.8.9"
Running Kavita in different browsers. Even Opera ;-P In incognito mode. It is possible to login. But then there is only the spinner.
Part of log 0.7.8.8: "Kavita] [2024-02-10 15:34:15.450 +01:00 54] [Error] Microsoft.EntityFrameworkCore.Database.Command Failed executing DbCommand (78ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30'] SELECT "s"."Id", "s"."AppUserId", "s"."AvgHoursToRead", "s"."CoverImage", "s"."CoverImageLocked", "s"."Created", "s"."CreatedUtc", "s"."FolderPath", "s"."Format", "s"."LastChapterAdded", "s"."LastChapterAddedUtc", "s"."LastFolderScanned", "s"."LastFolderScannedUtc", "s"."LastModified", "s"."LastModifiedUtc", "s"."LibraryId", "s"."LocalizedName", "s"."LocalizedNameLocked", "s"."MaxHoursToRead", "s"."MinHoursToRead", "s"."Name", "s"."NormalizedLocalizedName", "s"."NormalizedName", "s"."OriginalName", "s"."Pages", "s"."SortName", "s"."SortNameLocked", "s"."WordCount", "a"."Id", "a"."AppUserId", "a"."BookScrollId", "a"."ChapterId", "a"."Created", "a"."CreatedUtc", "a"."LastModified", "a"."LastModifiedUtc", "a"."LibraryId", "a"."PagesRead", "a"."SeriesId", "a"."VolumeId" FROM "AppUserProgresses" AS "a" INNER JOIN "Series" AS "s" ON "a"."SeriesId" = "s"."Id" [Kavita] [2024-02-10 15:34:15.450 +01:00 54] [Error] Microsoft.EntityFrameworkCore.Query An exception occurred while iterating over the results of a query for context type 'API.Data.DataContext'. Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such column: s.AppUserId''
The rest of the log is in the txt attachment. Also the red warning. In png.
SQLite Error 1: 'no such column: s.AppUserId'' this warning also in red on the webfront. In the right bottom. admin/dashboard#statistics
Okay hold on, you are not updating correctly. You are updating to nightlies which you shouldn't do. Nightlies are like beta releases in-between the stables. If you are on a stable, you shouldn't use them. They can have breaking changes in there.
You just need to go from v0.7.8.2 directly to v0.7.14. Every migration will run. You can grab a backup from config/backups and retry for me.
SQLite Error 1: 'no such column: s.AppUserId'' This is an Okay issue if you are on the latest, but it shouldn't show up in the UI. It implies the update didn't go smoothly.
Let's just retry from the beginning and see what happens. A user today just updated from v0.7.8.2 to latest and only issue they had was they didn't mount their config volume correctly.
Yes, that's what I did in the first place, But that did't work. It gave me the spinner. So I was hoping that incremental steps would work. I will try it again from kizaing/kavita:0.7.8.2 to jvmilazz0/kavita:latest and let you know.
Make sure that you are restoring your OLD db from backup or temp/migrations/v0.7.8.2/kavita.db when you're attempting to update. Feel free to send me logs and I can look over them.
Made a Kavita dev. Copied kavita.db 0.7.8.2 from the live (first stopped it) running with kizaing/kavita:0.7.8.2 image to the dev environment and it runs just fine. On a different network port. admin/dashboard#system Version 0.7.8.2
Then I stopped the dev container. Swapped the image to jvmilazz0/kavita:latest. Start it up again. Cleared browser cache. I can log in. But then only the spinner. And lots of page errors in the browser developer console. See image.
When I do not refresh the browser, Kavita 0.7.14 is working? It shows 0.7.14. Strangely. After a browser refresh its spinner time again. And after a dozen refreshes ctrl F5 the /admin/dashboard is back, For a moment. Tried different browsers. In privacy mode. And directly local ip address. Not via a reverse proxy. Normally it's the other way around. Clear the cache to get a working page/website. Scratching my head here,
There are two files in the Kavita root folder namely: imported-want-to-read-migration.csv and want-to-read-migration.csv see dropped in files. attached log files and a screenshot. Thanx in advance.
kavitalog_afterupdatetolatestversion.txt
imported-want-to-read-migration.csv
want-to-read-migration.csv
kavita20240210.log
Hmm Okay, so I do see the "error".
Would you mind emailing me or DMing me via discord (same name) your DB? I think the issue is that the migration (which produces the want-to-read-migration.csv) is failing to remove the AppUserId from the Series Table. At some point it got added when Want To Read was added and I recently removed it in this latest stable.
I'm not 100% sure as just this morning someone updated successfully from v0.7.8.2 as well, no issues. Only thing I can think of is AppUserId column is or isn't on Series which is causing some error (but it shouldn't). Otherwise, I'd need to check the DB.
Do you have any custom Smart Filters bound to your Dashboard or Side Nav?
Oops, one Kavita user is using https://github.com/Snd-R/komf-userscript. Could that be the trouble? Totally forgotten about that. Pfff. I will "slap him around with a large wet trout" ;-P if that's the case. I also updated another Kavita instance. same way, on an other server. Without komf-userscript That went well, It a SQLite db. Can I run a sql 'query' instruction myself in for example in the DB Browser for SQlite software tool. Or is it a (to) deep dive in the tables and joins etc. I am orkey3364 on Discord. Send over two db files. 0.7.8.2 old(kavita_old_b4updating.db) and 0.7.14.0 (kavita_new_notworking.db) Hopefully the upload worked.
I'm not sure about the komf userscript, it shouldn't cause any issue.
Please re-add me as a friend on discord (or you can use something like wetransfer and send me the db without going through the friend process)
Can you run this SQL on your db?
Select AppUserId, Id from Series WHERE AppUserId IS NOT NULL ORDER BY AppUserId;
I really just want to understand if the AppUserId is still in your series or not. This shouldn't actually cause any issues, but it is step 1 in debugging the underlying issue.
Results after running the query on the old and the new db.
old db b4 updating: 0.7.8.2 Result: 1 rows returned in 26ms At line 1: Select AppUserId, Id from Series WHERE AppUserId IS NOT NULL ORDER BY AppUserId;
new db after updating to 0.7.14.0 Result: near "Result": syntax error At line 1: Result
Okay that's perfect. I saw your friend request, please drop me the databases when you can and I'll debug today.
Dropped the databases from before and after. Thanks again
Did some comparing between the old and the new database. Try to figure out what's causing the spinner. So far diffed the databases. As a start... In windows I have used https://github.com/shuebener/SQLiteCompare/releases/tag/v3.0.0.0 see image. Nice graphical tool.
In Linux I have used:
sqlite3 kavitaold.db .dump > kavitaold.sql sqlite3 kavitanew.db .dump > kavitnew.sql diff -u kavitaold.sql kavitanew.sql > diff.txt
You're going to want to look at the __EFMigrationsHistory table, which will have the different migrations. That is how we identify if migrations were ran or not. Likewise, in ServerSettings, there is a row with the version that the DB was running (unless the migrations were successful).
docker pull kizaing/kavita:0.7.8.2 runs docker pull jvmilazz0/kavita:nightly-0.7.8.2 runs also
docker pull jvmilazz0/kavita:0.7.9 nope not even a spinner.
Not from kizaing/kavita:0.7.8.2 or from jvmilazz0/kavita:nightly-0.7.8.2 to jvmilazz0/kavita:0.7.9 tried both.
Diffed the databases. Not much going on.
__EFMigrationsHistory table both sides are empty.
Table ServerSetting key11 changed from 0.7.8.0 to 0.7.9.0
Next maybe comparing the docker images.
@ariedeleen Did you ever get to the bottom of this?
Oops, totally missed your comment. No never ever got an answer or solution myself to this problem.
What happened?
There was a popup window in Kavita with a warning. To use a different Docker image. So switched from kizaing/kavita:0.7.8.2 to jvmilazz0/kavita:latest (0.7.13.0) is now .14 Stopped the container switched the image and started up again.
But after that you could login to Kavita. But there was only a spinner. Running round and round. The 'structure' the left menu. Top bar is there but no 'data'. Also it is not possible to logout again.
Everything seems to be ok. Tried different browsers. Removed the cache. But in vain. So is there a way to solve this.
What did you expect?
Heaving a working Kavita webfront ;-P
Kavita Version Number - Don't see your version number listed? Then your install is out of date. Please update and see if your issue still persists.
0.7.14 - Stable
What operating system is Kavita being hosted from?
None
If the issue is being seen on Desktop, what OS are you running where you see the issue?
None
If the issue is being seen in the UI, what browsers are you seeing the problem on?
No response
If the issue is being seen on Mobile, what OS are you running where you see the issue?
None
If the issue is being seen on the UI, what browsers are you seeing the problem on?
No response
Relevant log output
Additional Notes
Maybe this issue is already mentioned but couldn't find a relevant topic.