Closed Skeeve closed 2 months ago
romm | WARNING: [RomM][2024-09-04 13:03:59] Couldn't remove cover from 'In the Dark 2' since '/romm/resources/roms/95/230/cover' doesn't exists.
That's a new one, usually it needs to delete the old image before uploading a new one, but it can't seem to find it. Between this and your other issue, there might be something wonky with your setup. Can you verify that the perms for the resources
mount is correct?
What should the permissions be?
My setup is like this:
/media/INTSENSO
as a vfat mount on a machine running LibreElec with the Docker-Plugin.
Everything is owned by root.
Maybe that's not a good idea?
No that should be fine, though libreelec is an interesting choice! Can you post your docker compose here, hiding any sensitive info/keys?
volumes:
mysql_data:
romm_resources:
romm_redis_data:
services:
romm:
image: rommapp/romm:latest
container_name: romm
restart: unless-stopped
environment:
- DB_HOST=romm-db
- DB_NAME=romm # Should match MYSQL_DATABASE in mariadb
- DB_USER=romm-user # Should match MYSQL_USER in mariadb
- DB_PASSWD=***
- ROMM_AUTH_SECRET_KEY=*** # Generate a key with `openssl rand -hex 32`
- IGDB_CLIENT_ID=*** # Generate an ID and SECRET in IGDB app:igdb_***
- IGDB_CLIENT_SECRET=*** # https://api-docs.igdb.com/#account-creation
- MOBYGAMES_API_KEY=moby_*** # https://www.mobygames.com/info/api/
- STEAMGRIDDB_API_KEY # https://github.com/rommapp/romm/wiki/Generate-API-Keys#steamgriddb
volumes:
- romm_resources:/romm/resources # Resources fetched from IGDB (covers, screenshots, etc.)
- romm_redis_data:/redis-data # Cached data for background tasks
- /media/INTENSO/romm/library:/romm/library # Your game library
- /media/INTENSO/romm/assets:/romm/assets # Uploaded saves, states, etc.
- /media/INTENSO/romm/config:/romm/config # Path where config.yml is stored
ports:
- 6464:8080
depends_on:
- romm-db
romm-db:
image: mariadb:latest # if you experience issues, try: linuxserver/mariadb:latest
container_name: romm-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=***
- MYSQL_DATABASE=romm
- MYSQL_USER=romm-user
- MYSQL_PASSWORD=***
volumes:
- mysql_data:/var/lib/mysql
libreelec is an interesting choice!
It's a machine (a wyse thin client) I got cheap and which is running 24/7. So it seemed to me like a logical choice.
I could have used my QNAP NAS as well…
The funny(?) thing is: There is no cover-info for that game in the database as far as I can tell:
id | igdb_id | sgdb_id | file_name | file_name_no_tags | file_extension | file_path | name | slug | summary | path_cover_s | path_cover_l | revision | tags | multi | files | url_cover | url_screenshots | path_screenshots | regions | languages | file_name_no_ext | file_size_bytes | igdb_metadata | platform_id | moby_id | moby_metadata | created_at | updated_at | crc_hash | md5_hash | sha1_hash |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
230 | 56978 | (null) | In the Dark 2.zip | In the Dark 2 | zip | roms/gbc | In the Dark 2 | (null) | [] | false | [{"filename": "In the Dark 2.zip", "size": 619348, "last_modified": 1725440980.0}] | [] | [] | [] | [] | In the Dark 2 | 619348 | {} | 95 | (null) | {} | 2024-09-04 09:10:01 | 2024-09-04 13:31:38 | 6bf67f40 | 38107b482050376f7b92fbf1ffb512a5 | 3115a7831a69cebeff5e7a2377f2ca6fd15bfe47 |
(BTW: I removed the wrong tags mentioned in #1170.)
I created /romm/resources/roms/95/255/cover
and the error message is gone when saving the custom cover.
But still the custom cover is not saved.
Also /romm/resources/roms/95/255/cover
is gone after saving the custom cover.
$ docker exec -it 22f03bdd7bf6 sh
/romm # ls -al /romm/resources/roms/95/255/cover
ls: /romm/resources/roms/95/255/cover: No such file or directory
/romm # mkdir /romm/resources/roms/95/255/cover
/romm # ls -al /romm/resources/roms/95/255/cover
total 8
drwxr-xr-x 2 root root 4096 Sep 5 12:55 .
drwxr-xr-x 3 root root 4096 Sep 5 12:55 ..
Saving custom cover here
romm | 192.168.192.72:0 - "PUT /api/roms/255?rename_as_source=false&remove_cover=true&unmatch_metadata=false HTTP/1.0" 200
romm | INFO: [nginx][2024-09-05 12:55:30] 192.168.192.72 - - "PUT /api/roms/255?rename_as_source=false&remove_cover=true&unmatch_metadata=false HTTP/1.1" 200 555 "http://kodiwyse.local:6464/rom/255" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" rt=0.216 uct="0.000" uht="0.208" urt="0.209"
Looking into container:
/romm # ls -al /romm/resources/roms/95/255/cover
ls: /romm/resources/roms/95/255/cover: No such file or directory
Seems the image file is not even sent to the server!
I overlooked "artwork: (binary)".
So no wonder nothing is saved.
I tried matching the game against any other game so that I have any cover at all.
Then I tried to replace the cover with the one I really want to have and I noticed in the web console of my browser a 403 forbidden:
Not to mention: The new cover wasn't stored at all.
I found the issue, but with different steps than what you reported.
If I go to a game, click on "Edit", then click on "Delete cover" (trash icon), and after that I click on the pencil and add a new image, I get the behavior you are experiencing.
The key here is that clicking on the "Delete cover" button first sets "remove_cover = true" to be sent in the request. When that parameter is received by the backend, it deletes the existing cover, and doesn't set a new one, even if it received it.
Can you confirm if you get the right behavior, if you do not use "Delete cover", and just click on the pencil, add a new cover, and click "Save"?
I'll upload a fix so that using the pencil button restarts the removeCover
attribute to false
.
I never clicked "Delete cover" as I had none.
When doing the experiment with matching with any game I alos didn't click delete if I remember correctly.
But I will test it anyway now again.
Tested and not clicking the trash icon made no difference.
remove_cover=true
is set. In the web console as well as in the logs.
Works!
RomM version
Describe the bug I'm trying to set a cover of a game but it's not saved.
To Reproduce Steps to reproduce the behavior:
Expected behavior After saving the cover should be shown
Screenshots
Here are the logs of my action:
Desktop (please complete the following information):
Smartphone (please complete the following information):
Not used