BrenekH / encodarr

Self-hosted web app for encoding files to a target format using distributed computing.
Mozilla Public License 2.0
63 stars 6 forks source link

0.3.0 Controller report SQL logic error when add a new library #112

Closed tr1p0p closed 3 years ago

tr1p0p commented 3 years ago

On Encodarr 0.3.0 on amr64 on Raspberry pi 4, on a fresh install with a new added library and path (to avoid bug when path mask is empty.

To Reproduce Steps to reproduce the behavior:

  1. Encodarr on rpi 4, debug mode logs
  2. Delete data.db and data.db.backup
  3. launch encodarr, add librairy
  4. See bunch of errors at each files

Expected behavior Scan the library properly

Errors :

SQL logic error : ON CONFLICT clauses does not match any PRIMARY KEY or UNIQUE constraint (1) and "SQL logic error: table files has no column named metadata (1)" when scan for a library

at the end, before the controller crash and close

BrenekH commented 3 years ago

What are the full log statements?

Also, if you could send the data.db and data.db.backup files, that would be awesome.

tr1p0p commented 3 years ago

Here are the .db files :

https://nullmoon.host/nullpload/f.php?h=0wHpAxGl&d=1 https://nullmoon.host/nullpload/f.php?h=3RBQtgm0&d=1

Sorry don't have the logs of the crash. And it's just errors at each file on my library and they're a LOT

BrenekH commented 3 years ago

Okay so this is being caused by the migration code not updating the files table to a slightly different column name, with a different data format as well.

BrenekH commented 3 years ago

The fix has been merged into develop. Waiting on a release to master.

BrenekH commented 3 years ago

This has been released in 0.3.1.

tr1p0p commented 3 years ago

This still is a issue also on the last release..

tr1p0p commented 3 years ago

So to the resume : The 0.3.1 version :

-Don't work when empty path field in library (so just fresh library add) -Make this error when you add something in path field (because... the empty field bug is kind of annoying)

So this just doesn't work out of the box on a fresh Debian 10 install on arm64 with a fresh encodarr controller and runner version. Was working before. Seem the DB break for nothing and do errors and issues.

tr1p0p commented 3 years ago

Here's logs + db on 0.3.1 (from a clean config folder)

https://nullmoon.host/nullpload/f.php?h=3qQ73s3l&d=1 controller.log https://nullmoon.host/nullpload/f.php?h=1erLhX4h&d=1 data.db https://nullmoon.host/nullpload/f.php?h=1b59QgaG&d=1 data.db.backup

BrenekH commented 3 years ago

Thanks for those logs.

I think I've identified the issue and created a fix. Unfortunately, the db has to be recreated again, but hopefully this will be the last time :crossed_fingers:

The fix is available on the Actions page and I would love to make sure that this is actually works before all of the changes are released. :fireworks:.

I feel like I should say thank you for sticking through this process. It has had its highs and its lows, but it all makes Encodarr a better and more robust platform.

tr1p0p commented 3 years ago

Yes it's work !

Well, i got some thing like this on some files, not all :

library/mediainfo.MetadataReader|104|WARNING|error while converting textTrack.Index (StreamOrder, UniqueID) <name of video file>strconv.Atoi: parsing "14256967768234927011": value out of range

But it scan the folder, put videos in queue, and with empty path field, so yeah theses issues seem to be fix !

Thanks for you're work too after all you doing all ! Sorry if some messages of mine seem cold or i seem annoyed, it's just beside english not me primary langage and the fact i can get mad sometimes when i don't understand how it's work.

But again thanks a lot for this great tools ! Now i miss the "don't encode if not reduce file size" option and stuffs like that, but it's the only the beginning and it's doing great at what it do. Excited to see the future of this project

BrenekH commented 3 years ago

I'm glad that it's working! I'll merge and release the changes as soon as I can.