linuxserver / docker-emulatorjs

Web based retro emulation frontend with rom scanning and automated art ingestion.
GNU General Public License v3.0
509 stars 51 forks source link

PSX extracting .chd file results in permission error #69

Closed mpclepto closed 6 months ago

mpclepto commented 6 months ago

Is there an existing issue for this?

Current Behavior

Using a psx .chd file (tekken 3), I am trying to scan it into the Rom Management tab, but I am seeing the following permission error. I gave full 777 to the following folders to no avail:

/data/hashes/psx/roms/tmp/split /data/hashes/psx/roms/tmp/


Scan exited with code: 1 PermissionError: [Errno 13] Permission denied: 'FILE (Track 1).bin' ^^^^^^^^^^^^^^^^^^^^ with open(out_name, 'wb') as outfile: File "/usr/local/bin/binmerge", line 254, in split_files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if split_files(os.path.join(outdir, args.basename), cue_map[0]): File "/usr/local/bin/binmerge", line 347, in main ^^^^^^ if not main(): File "/usr/local/bin/binmerge", line 367, in Traceback (most recent call last): [INFO] Output directory: /data/hashes/psx/roms/tmp/split [INFO] Opening cue: /data/hashes/psx/roms/tmp/FILE.cue [INFO] Splitting files... Tekken 3 (USA).chd is multi track need to split Extraction complete Extracting, 91.9% complete...


image

Expected Behavior

No response

Steps To Reproduce

  1. upload psx .chd game file via :3005 webui
  2. scan psx rom
  3. get errors

Environment

unRaid 6.10.3
x64
emulatorjs community app from linuxserver (downloaded fresh update this morning 2/5/2024)

CPU architecture

x86-64

Docker creation

Used default config, else:

/data: /mnt/user/ROMS/
/appdata: /mnt/user/appdata/emulatorjs

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

[ipfs-upgrade] Checking if fs-repo needs to be upgraded (this may take some time)
ipfs migration: already at version 15
[custom-init] No custom files found, skipping...
Initializing daemon...
Kubo version: 0.24.0
Repo version: 15
System version: amd64/linux
Golang version: go1.21.3
Connection to localhost (127.0.0.1) 80 port [tcp/http] succeeded!
Connection to localhost (127.0.0.1) 3001 port [tcp/*] succeeded!
Connection to localhost (127.0.0.1) 4001 port [tcp/*] succeeded!
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiDvt1_-oJSBaP602AoLEvIejHHXXyu77qXdkIvfhjafIA/certhash/uEiCC5evyqzPzHn7Pan3IR3w1IF8j83AY983PoD5rUfcaIQ
Swarm listening on /ip4/172.17.0.10/tcp/4001
Swarm listening on /ip4/172.17.0.10/udp/4001/quic-v1
Swarm listening on /ip4/172.17.0.10/udp/4001/quic-v1/webtransport/certhash/uEiDvt1_-oJSBaP602AoLEvIejHHXXyu77qXdkIvfhjafIA/certhash/uEiCC5evyqzPzHn7Pan3IR3w1IF8j83AY983PoD5rUfcaIQ
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiDvt1_-oJSBaP602AoLEvIejHHXXyu77qXdkIvfhjafIA/certhash/uEiCC5evyqzPzHn7Pan3IR3w1IF8j83AY983PoD5rUfcaIQ
Swarm announcing /ip4/172.17.0.10/tcp/4001
Swarm announcing /ip4/172.17.0.10/udp/4001/quic-v1
Swarm announcing /ip4/172.17.0.10/udp/4001/quic-v1/webtransport/certhash/uEiDvt1_-oJSBaP602AoLEvIejHHXXyu77qXdkIvfhjafIA/certhash/uEiCC5evyqzPzHn7Pan3IR3w1IF8j83AY983PoD5rUfcaIQ
Swarm announcing /ip4/47.41.147.249/udp/4001/quic-v1
Swarm announcing /ip4/47.41.147.249/udp/4001/quic-v1/webtransport/certhash/uEiDvt1_-oJSBaP602AoLEvIejHHXXyu77qXdkIvfhjafIA/certhash/uEiCC5evyqzPzHn7Pan3IR3w1IF8j83AY983PoD5rUfcaIQ
RPC API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
Connection to localhost (127.0.0.1) 3000 port [tcp/*] succeeded!
[ls.io-init] done.
github-actions[bot] commented 6 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thelamer commented 6 months ago

binmerge might need some kind of file locking that unraid's fuse lacks, I cannot replicate this locally on a normal Linux filesystem. The first thing to try is doing this with /data/ mounted to a cache drive or directly to a disk to see if it works as a test.

thelamer commented 6 months ago

You can also try execing into the container and testing a head script.

docker exec -it emulatorjs bash
cd /emulatorjs
rm has_files.sh
wget https://raw.githubusercontent.com/linuxserver/emulatorjs/master/has_files.sh
chmod +x has_files.sh

The scan won't error out on multi track files but you will need to manually identify them in the management screen with this change. Without the sha1 from the actual track there is no reference data I can use to automatically link the file.

If this change works please confirm and I can get it into the next release.

mpclepto commented 6 months ago

You can also try execing into the container and testing a head script.

docker exec -it emulatorjs bash
cd /emulatorjs
rm has_files.sh
wget https://raw.githubusercontent.com/linuxserver/emulatorjs/master/has_files.sh
chmod +x has_files.sh

The scan won't error out on multi track files but you will need to manually identify them in the management screen with this change. Without the sha1 from the actual track there is no reference data I can use to automatically link the file.

If this change works please confirm and I can get it into the next release.

I just tested this script while I had a free moment and it worked exactly as you described it would.

Would you like me to try the /data mount test as well?

thelamer commented 6 months ago

Naw, I don't run unraid but I would assume this is the issue, binmerge does byte reads and pipes out files which likely does not work on fuse based storage.

I'll cut a bugfix release it will take a bit to build.

mpclepto commented 6 months ago

Awesome, thank you!