Closed cpetzel closed 4 weeks ago
This sounds like a permissions issue to me. I would first verify where the config is mounted and then the permissions of those directories.
I don't recall if you can change the location on docker because you'd have to mount that location beforehand. Let's first fix your issues then move onto changing the directory on docker.
Shouldn't it be?
i have the same problem on Unraid. Permissions seems ok
I checked the code and there are no restrictions on Docker users changing the bookmarks directory. I'll test on my dev instance to make sure there is no regression.
There are two separate issues here. That bookmarks don't work out of the box. In an attempt to fix what might be a permission issue, I also can't change the bookmarks directory.
for the latter, when trying to change the bookmarks directory, here are my permissions for the mounted volume.
craig@nas:/volume3/Data3/kavita$ pwd
/volume3/Data3/kavita
craig@nas:/volume3/Data3/kavita$ ls -la
total 8
drwxrwxrwx+ 1 craig users 60 May 3 00:09 .
drwxrwxrwx+ 1 root root 292 May 2 22:27 ..
drwxrwxrwx+ 1 craig users 0 May 3 00:11 bookmarks
drwxrwxrwx+ 1 craig users 190 May 3 09:19 config
-rwxrwxrwx+ 1 craig users 6148 May 3 00:09 .DS_Store
drwxrwxrwx+ 1 root users 88 May 3 08:57 @eaDir
The program has no problem writing to the sibling directory (config).
I think the issue, is that the code is deleting the bookmarks directory... so it seems docker won't let you delete the root mounted directory. If I use a child directory under that import.. ex: - /volume3/Data3/kavita/bookmarkRoot:/bookmarkRoot:rw and then use /bookmarkRoot/bookmarks as my bookmark folder in the UI, then the admin panel lets me make that change!
However, bookmarks still do not appear to be written to disk. When saving a bookmark, I get no error in the UI, but I don't see any bookmarks... (this is true for OOTB, and also when I change my bookmarks directory).
looking at the logs, the first bookmark save is ok...
[Kavita] [2024-05-03 16:35:10.600 +00:00 3] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/reader/ptoc?chapterId=7 responded 200 in 1.3384 ms
so it is making it into the DB... Then the next bookmark save (on the same text) fails
[Kavita] [2024-05-03 16:37:37.155 +00:00 64] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/reader/create-ptoc responded 400 in 3.5946 ms
Duplicate bookmark entry already exists
So why are bookmarks making their way into the DB, but not showing anything in the UI or directory?
Sorry to highkjack the thread. Do i have to open a separate one ?
@Maitresinh that would be great if you could open a separate issue.
@cpetzel Bookmarks work for me. The way I implemented them is that I enter it into the DB and then move the file. So the file isn't being able to copy from config/cache/ to config/bookmarks and even if it fails, it is already "in the db".
I'm thinking that the mount point might confuse Kavita. I recall that when you setup your libraries, you have to navigate to / first. Perhaps that is what's happening here?
@DieselTech or @therobbiedavis would one of you be willing to try this out for me?
I guess I'm not even able to see this file you speak of... After I create a bookmark, my bookmark directory is empty (when trying with both the OOTB default dir, and the updated mounted dir).
the only files I see in /config/cache, are folders with the epub file inside of it.
@DieselTech or @therobbiedavis would one of you be willing to try this out for me?
Looking into it now.
Wait @cpetzel are you talking about Personal Table of Contents also known as Bookmarks in Epub reader or Bookmarks from image-based reader?
Because they are 2 different things and work very different.
I was imagining bookmarks being like highlights.
The documentation does not tell you how to create bookmarks, but displays collections that have bookmarks, so I had assumed, if I create a bookmark, it would show up there...
But now that you mention this, I see that there is a bookmark section near the table of contents, and that my bookmarks are there! Sorry for the confusion. Maybe some clarification is needed in the documentation.
How would I add bookmarks as seen in the documentation?
Those image based bookmarks are for image-based media (archives/image). There is a button on top right or you can double tap the image.
We just launched the new wiki, so looks like not all the reader sections have been flushed out. I'll take note on the potential confusion point.
If you have anything else, feel free to comment, but going to close since you got it working.
Great! Thank you for the quick response, and helpful info! I really like the app so far!
Same confusion for me. Not totally clear thought (My first language is not English)
What happened?
When saving a bookmark, it does not error. But when I click on the Bookmarks page, I see an empty list of bookmarks... When I go back to the same section in the book and attempt to save a bookmark, I get an error saying that this bookmark already exists... so why don't I see it?
I also cannot change my bookmark directory... I get a "device or resource busy" error message.
I am on a synology, with kavita created through docker.
I think on synology, there might be a race condition with deleting the folder when checking permission? perhaps it cannot delete the "test.txt" file fast enough?
What did you expect?
When saving a bookmark, I can see it in the bookmarks page.
I also expect to be able to change the bookmark dir (mounted docker volume)
Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.
0.8.1 - Stable
What operating system is Kavita being hosted from?
Docker (Other)
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?
Chrome
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 Mobile UI, what browsers are you seeing the problem on?
No response
Relevant log output