dim icon indicating copy to clipboard operation
dim copied to clipboard

dim.db no longer writable after creating admin account

Open donmor opened this issue 11 months ago • 6 comments

Describe the bug dim.db get locked and was no longer writable after creating admin account.

To Reproduce Steps to reproduce the behavior:

  1. Build dim from latest source (patched by #597)
  2. Run dim and create the admin account
  3. Add a library
  4. See ERROR request{method=POST uri=/api/v1/library version=HTTP/1.1}: dim_web::routes::library: Error committing transaction err=Database(SqliteError { code: 5, message: "database is locked" }) in console

Device and browser including versions: Chromium 102.0.5005.63 (on Linux / loongarch64 PC)

Additional context Any operation writing the database gets a 500 response; creating accounts gets 401. I built dim with this fork(#597), this may affect the behavior of program.

donmor avatar Mar 05 '24 08:03 donmor

Does the lock occur on the latest master? First time seeing this issue and the scanner/dB code hasn't been modified in a long time.

vgarleanu avatar Mar 05 '24 08:03 vgarleanu

Not sure... Now trying #593 to see if it works

donmor avatar Mar 05 '24 08:03 donmor

Not sure... Now trying #593 to see if it works

Please try latest master

vgarleanu avatar Mar 05 '24 08:03 vgarleanu

I'm using loongarch64 (yet another new risc architecture) and latest master failed to build here because of the aged ring 0.16.20 dep (⊙_⊙;) So I have to use code from PRs with sqlx bumped to 0.7.x and patch it again to use nix 0.27+.

donmor avatar Mar 05 '24 08:03 donmor

Okay it IS sqlx 0.7 patches that breaks the db XD Moving to #593 and #597

donmor avatar Mar 06 '24 01:03 donmor

BTW I commented out use crate::inspect::ResultExt; in dim-core/src/scanner/movie.rs and dim-core/src/scanner/tv_show.rs as they throw errors

donmor avatar Mar 06 '24 01:03 donmor