Snd-R / komf

Komga and Kavita metadata fetcher
MIT License
323 stars 19 forks source link

Komf / Komelia - Apprise AccessDeniedException Error on Saving #187

Closed valdearg closed 2 days ago

valdearg commented 5 days ago

Having a play around with the new Komelia interface and setting up the Apprise notifications.

I've added in the URL and the "test send" option is working correctly.

The only problem is that when changing the Notification Template and clicking on the Save button you receive an AccessDeniedException error such as below:

image

I'm wondering if the config location for the apprise config might need to be tweaked in the docker container. I have config directory mounted at the /config mount point, from the screenshot it's writing to /app/./apprise.

If I ls the config dir in the container it'll give me the yml file and wondering if that might be the correct location.

applesoff commented 5 days ago

i get this too. i restart the docker container each time to fix it. it would be nice to get a real fix tho.

On a side note: what is your URL that uses "json://" i have a standard http link for mine.

valdearg commented 5 days ago

Oh cool, you're right there. Thanks for the advice there!

So on the JSON:// I'm having a bit of a play with a custom system, basically it'll call webhookd with the notification data, that will then trigger another API which does a few weird things. The json:// URL is referring to this: https://github.com/caronc/apprise/wiki/Notify_Custom_JSON which is basically a generic part, the tester will send through effectively:

{"version": "1.0", "title": "2/1", "message": "Series Summary\nnew book was added to library Test library:\nTestBook", "attachments": [], "type": "info"}

The title being the series.id and library.id, which is where I ran into the issue with the saving.

Which I then parse in my system.

Snd-R commented 3 days ago

I can't reproduce this. Does it show the same error if you try to save discord template? it should write to config dir you mount in docker container, unless KOMF_CONFIG_DIR environment variable is overwritten Check that you don't override the environment variable

valdearg commented 2 days ago

Yes, seemed to happen with the Discord template also.

I've left the docker-compose file really basic with the following:

version: "3.7"
services:
  komf:
    image: sndxr/komf:latest
    container_name: komf
    ports:
      - "8089:8085"
    user: "1000:1000"
    volumes:
      - ./config:/config #path to directory with application.yml and database file
    restart: unless-stopped

Then on the folder itself

valdearg@sinon:~/komf$ ls -l
total 8
drwxrwxr-x 3 valdearg valdearg 4096 Nov 23 20:37 config
-rw-rw-r-- 1 valdearg valdearg  264 Dec 29  2022 docker-compose.yml

valdearg@sinon:~/komf$ id
uid=1000(valdearg) gid=1000(valdearg) groups=1000(valdearg),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd),998(docker)

Matching up with the ownership.

Oddly enough, after the earlier suggestion to restart the container and try it immediately. I now get an apprise dir in the config, containing the template files and I'm able to save the template.

Very strange. Maybe it's failing on creating the initial apprise dir in certain situations?

Snd-R commented 2 days ago

fixed in https://github.com/Snd-R/komf/commit/c49f1e524ce05cd878106d51cb5960712ed26260