linuxserver / emulatorjs

Self hosted web based retro emulation front end with rom and art management.
379 stars 26 forks source link

Unabled to upload media - TypeError: RequestInit: duplex option is required when sending a body #106

Closed daedric7 closed 5 months ago

daedric7 commented 8 months ago

Everytime i try to upload missing media i get:

emulatorjs  | node:internal/deps/undici/undici:11576
emulatorjs  |     Error.captureStackTrace(err, this);
emulatorjs  |           ^
emulatorjs  | 
emulatorjs  | TypeError: RequestInit: duplex option is required when sending a body.
emulatorjs  |     at Object.fetch (node:internal/deps/undici/undici:11576:11)
emulatorjs  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
emulatorjs  | 
emulatorjs  | Node.js v18.17.1

How can i debug this ?

j0nnymoe commented 8 months ago

Post information on how you've deployed the container.

daedric7 commented 8 months ago

Post information on how you've deployed the container.

Apologies, it was indeed a crappy issue.

EmulatorJS deployed via docker-compose.yaml:

services:
  emulatorjs:
    image: lscr.io/linuxserver/emulatorjs:latest
    container_name: emulatorjs
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - SUBFOLDER=/ #optional
    volumes:
      - ./config:/config
      - /share/emulatorjs/data:/data
      - /share/roms:/share/roms
    ports:
      - 3000:3000
      - 3080:80
      #- 4001:4001 #optional
    restart: unless-stopped

I've checked permissions on dirs, i've set everything to 777 to isolate a permission issue.

This is the file i'm trying to send, but a video causes the same problem:

image (2)

j0nnymoe commented 8 months ago

Post your full path for your /config mount

daedric7 commented 8 months ago

Post your full path for your /config mount

That's exactly as it is in docker-compose.yaml, but if you need to know the full path (on the host):

/opt/emulatorjs/config/

Jahn16 commented 8 months ago

@daedric7 As a workaround you can upload the image to /data/<emulator>/<game>/logos with the same name as the ROM file but ending with a image file extension like .png

LinuxServer-CI commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

thelamer commented 6 months ago

I was still using js-ipfs while updating the ipfs in the container constantly I need to refactor everything to a new lib that is not depreciated this might take a bit.

thelamer commented 5 months ago

I pinned back nodejs in the container to head 16.x it the uploading media is functional with the latest image.

thelamer commented 5 months ago

Closing as this is now fixed, let me know if anything is not working on your end, and if you do improve a bunch of art the custom metadata tab in the backend provides the metadata I need to add it to everyone's installs.