YunoHost-Apps / audiobookshelf_ynh

Audiobookshelf package for YunoHost
https://audiobookshelf.org/
GNU General Public License v3.0
4 stars 4 forks source link

Upload of files is not possible #114

Open Sputnik2525 opened 3 months ago

Sputnik2525 commented 3 months ago

Describe the bug

Link to forum entry https://forum.yunohost.org/t/audiobookshelf-upload-of-files-is-not-possible/28648/1

I installed the app from the official application "store". I have created a new user and try to upload a simple audiofile into the audiobookshel app. Unforunately I get an error message called.

<html>

<head><title>413 Request Entity Too Large</title></head>

<body>

<center><h1>413 Request Entity Too Large</h1></center>

<hr><center>nginx</center>

</body>

</html>

Context

Steps to reproduce

Expected behavior

The file uploads and is available in the UI.

What I tried to do

I checked the nginx configuration file and it shows at text /etc/nginx/conf.d/audiobookshelf.<mydomain.tld>.d/audiobookshelf.conf

It says that the upload limit is set to 10G

#sub_path_only rewrite ^/$ / permanent;
location / {

  proxy_pass http://127.0.0.1:8096;
  proxy_redirect    off;
  proxy_set_header  Host $host;
  proxy_set_header  X-Real-IP $remote_addr;
  proxy_set_header  X-Forwarded-Proto $scheme;
  proxy_set_header  X-Forwarded-Port $server_port;
  proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header  X-Forwarded-Host $server_name;

  proxy_pass_request_headers on;

  #WebSocket Support
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $http_connection;

  client_max_body_size 10G;

  # Include SSOWAT user panel.
  include conf.d/yunohost_panel.conf.inc;
}

Logs

Where can I find logs for the application?

When an operation fails, YunoHost provides a simple way to share the logs.

After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)

If applicable and useful, add screenshots to help explain your problem.

tituspijean commented 3 months ago

10G should be way enough indeed.

Can you share NGINX and Audiobookshelf's service logs right after truggering the error?

Can you also have a look to your browser's Network tab in developers console (F12 key), ans see which request fails?

Edit: I have just tried to install the app on my server and I can replicate the issue.

Can you confirm your error is similar to mine? https://paste.yunohost.org/aqukejaqay In my case, Audiobookshelf does not have the perssion to write in the target directory I chose.

Try selecting /home/yunohost.app/audiobookshelf as target directory or make sure the audiobookshelf system user can write where you want to store data.

voiceoverguyuk commented 2 months ago

I'm trying to upload a file 327MB, really small, but still says "413 Request Entity Too Large". Is there any update to get this working?

tituspijean commented 2 months ago

@voiceoverguyuk, I have been exchanging ideas with @Sputnik2525. Feel free to try to replicate their fix and my subsequent issue.

brimwats commented 1 month ago

@tituspijean it's a permissions error

2024-05-18 09:20:39.235

FATAL

[Server] Unhandled rejection: Error: EACCES: permission denied, mkdir '/home/yunohost.multimedia/REDACTED/eBook/Books/02. Audiobooks/Malka Older', promise: Promise { <rejected> [Error: EACCES: permission denied, mkdir '/home/yunohost.multimedia/REDACTED/eBook/Books/02. Audiobooks/Malka Older'] { errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/home/yunohost.multimedia/REDACTED/eBook/Books/02. Audiobooks/Malka Older' } }

I don't know why its giving the filesize issue error in the popup but it does

image