Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.36k stars 331 forks source link

Can't see books on brand new instance after forcing scan #1698

Closed SteveDinn closed 1 year ago

SteveDinn commented 1 year ago

Describe the bug This may be more of a "tell me why I'm dumb" post than an actual bug, but I can't figure out what's going wrong.

I had books in an old version of Kavita that I hadn't updated in a long time. According to the docs, if you're more than 2 versions behind, just start over, so that's what I did. I backed up and then deleted my data folder and pulled kizaing/kavita:latest. I set up everything again -- note that my docker-compose.yml did not change -- but this time when I forced a scan on my library folders, it finds nothing.

To Reproduce Steps to reproduce the behavior:

  1. Initialize new Kavita instance from scratch using docker
  2. Add a library, force scan.
  3. See nothing in library.
  4. No errors in logs, but 0 books found.

docker-compose.yml

version: "2.0"
services:
  app:
    image: "kizaing/kavita:latest"
    restart: "unless-stopped"
    volumes:
      - "/mnt/mediasonic/media/comics:/comics:ro"
      - "/mnt/mediasonic/media/literature/books:/books:ro"
      - "/mnt/mediasonic/media/literature/manga:/manga:ro"
      - "/srv/kavita/data:/kavita/config"
    ports:
      - "8017:5000"

Note that I also tried mounting the folders as read-write, but that did not help.

The mounted folder from inside the container

$ docker exec -it kavita_app_1 /bin/bash
root@41b6ea419071:/kavita# cd /books
root@41b6ea419071:/books# ls -lF
total 28736
-rw-rw-r-- 1 1000 1000  254643 Mar 23  2015 Blood\ is\ Red.epub
-rw-rw-r-- 1 1000 1000  361876 Mar 23  2015 Bones\ are\ White.epub
-rw-rw-r-- 1 1000 1000 4572824 Mar 23  2015 GFL\ #1-\ The\ Rookie.epub
-rw-rw-r-- 1 1000 1000 1680181 Mar 23  2015 GFL\ #2\ -\ The\ Starter.epub
-rw-rw-r-- 1 1000 1000 2484281 Mar 23  2015 GFL\ #3\ -\ The\ All\ Pro.epub
-rw-rw-r-- 1 1000 1000 4029708 Mar 23  2015 GFL\ #4\ -\ The\ MVP.epub
-rw-rw-r-- 1 1000 1000 1963735 Mar 23  2015 GFL\ #5\ -\ The\ Champion.epub
-rw-rw-r-- 1 1000 1000  561085 Mar 23  2015 GFL\ -\ The\ Detective.epub
-rw-rw-r-- 1 1000 1000  307218 Mar 23  2015 GFL\ -\ The\ Reporter.epub
-rw-rw-r-- 1 1000 1000  528522 Mar 23  2015 GFL\ -\ Title\ Fight.epub
-rw-rw-r-- 1 1000 1000 1758552 Jan 29  2016 Girl\ Who\ Kicked\ the\ Hornet_s\ Nest,\ The\ -\ Stieg\ Larsson-viny.pdf
-rw-rw-r-- 1 1000 1000 1617044 Jan 29  2016 Girl\ Who\ Played\ with\ Fire,\ The\ -\ Stieg\ Larsson-viny.pdf
-rw-rw-r-- 1 1000 1000 1466011 Jan 29  2016 Girl\ with\ the\ Dragon\ Tattoo,\ The\ -\ Stieg\ Larsson-viny.pdf
-rw-rw-r-- 1 1000 1000  690280 Dec  1 16:01 Hacking\ Capitalism\ -\ Kris\ Nova.epub
-rw-rw-r-- 1 1000 1000 3162018 Jan 24  2022 His\ Dark\ Materials\ Anthology\ -\ Philip\ Pullman.epub
-rw-rw-r-- 1 1000 1000 3787769 Apr 29  2022 Scary\ Stories\ to\ Tell\ in\ the\ Dark.pdf
-rw-rw-r-- 1 1000 1000  159510 May  5  2013 Strunk\ _\ White\ -\ The\ Elements\ of\ Style.pdf
root@41b6ea419071:/books# exit

Logs

app_1  | [Kavita] [2022-12-15 14:11:46.151 +00:00  3] [Information] API.Controllers.LibraryController Created a new library: Books
app_1  | [Kavita] [2022-12-15 14:11:46.152 +00:00  3] [Debug] API.Services.Tasks.Scanner.LibraryWatcher [LibraryWatcher] Restarting watcher
app_1  | [Kavita] [2022-12-15 14:11:46.152 +00:00  3] [Information] API.Services.Tasks.Scanner.LibraryWatcher [LibraryWatcher] Stopping watching folders
app_1  | [Kavita] [2022-12-15 14:11:46.156 +00:00  3] [Information] API.Services.Tasks.Scanner.LibraryWatcher [LibraryWatcher] Starting file watchers
app_1  | [Kavita] [2022-12-15 14:11:46.170 +00:00  3] [Debug] API.Services.Tasks.Scanner.LibraryWatcher [LibraryWatcher] Watching /books
app_1  | [Kavita] [2022-12-15 14:11:46.172 +00:00  3] [Information] API.Services.Tasks.Scanner.LibraryWatcher [LibraryWatcher] Watching 1 folders
app_1  | [Kavita] [2022-12-15 14:11:46.179 +00:00  3] [Information] API.Services.TaskScheduler Enqueuing library scan for: 1
app_1  | [Kavita] [2022-12-15 14:11:46.184 +00:00  40] [Information] API.Services.Tasks.CleanupService Performing cleanup of Cache & Temp directories
app_1  | [Kavita] [2022-12-15 14:11:46.185 +00:00  3] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/library/create responded 200 in 108.0372 ms
app_1  | [Kavita] [2022-12-15 14:11:46.185 +00:00  40] [Information] API.Services.Tasks.CleanupService Cache and temp directory purged
app_1  | [Kavita] [2022-12-15 14:11:46.207 +00:00  3] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library responded 200 in 2.6803 ms
app_1  | [Kavita] [2022-12-15 14:11:46.207 +00:00  57] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library responded 200 in 5.0568 ms
app_1  | [Kavita] [2022-12-15 14:11:46.214 +00:00  58] [Information] API.Services.Tasks.ScannerService [ScannerService] Beginning file scan on Books
app_1  | [Kavita] [2022-12-15 14:11:46.247 +00:00  58] [Information] API.Services.Tasks.ScannerService [ScannerService] Finished file scan in 20 milliseconds. Updating database
app_1  | [Kavita] [2022-12-15 14:11:46.263 +00:00  58] [Information] API.Services.Tasks.ScannerService [ScannerService] Finished library scan of 0 series in 66 milliseconds for Books. There were no changes
app_1  | [Kavita] [2022-12-15 14:11:46.263 +00:00  58] [Debug] API.Services.Tasks.ScannerService [ScannerService] Removing Series that were not found during the scan
app_1  | [Kavita] [2022-12-15 14:11:46.264 +00:00  47] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library responded 200 in 1.1098 ms
app_1  | [Kavita] [2022-12-15 14:11:46.264 +00:00  3] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library responded 200 in 1.1053 ms
app_1  | [Kavita] [2022-12-15 14:11:46.270 +00:00  58] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 0 series that needs to be removed: []
app_1  | [Kavita] [2022-12-15 14:11:46.271 +00:00  58] [Debug] API.Services.Tasks.ScannerService [ScannerService] Removing Series that were not found during the scan - complete

Expected behavior I expect my books to show up in my library.

Screenshots Nothing to see. My library is empty.

Desktop (please complete the following information):

Additional context I'm sure I must have done something dumb, but, being dumb, I can't figure out what that might have been :)

scare376 commented 1 year ago

you arent following the scanner requirements. https://wiki.kavitareader.com/en/guides/managing-your-files/scanner#introduction

it should look something like this. image

SteveDinn commented 1 year ago

Ah...I didn't realize anything in the libraries had changed. Thanks! I just pulled and restarted.