[BUG]: Crash at the end of download on containered version #680

Open
opened 2024-05-02 03:26:48 +00:00 by abaurens · 2 comments
abaurens commented 2024-05-02 03:26:48 +00:00 (Migrated from github.com)

Program version

master (2488edc0243d8bef88db805aca0997bd23a4f41)

Operating System

Linux

Type

GUI

Service

Crunchyroll

Command used

aniDL

Show ID

G60914JM6

Episode

1

Console Output

2024-05-02 05:19:22 Resuming download from part 251...
2024-05-02 05:19:22 50 of 358 parts downloaded [14%] (3s | 6.5Mb/s)
2024-05-02 05:19:22 100 of 358 parts downloaded [28%] (3s | 6.6Mb/s)
2024-05-02 05:19:22 150 of 358 parts downloaded [42%] (2s | 5.9Mb/s)
2024-05-02 05:19:22 node:fs:1398
2024-05-02 05:19:22   handleErrorFromBinding(ctx);
2024-05-02 05:19:22   ^
2024-05-02 05:19:22 
2024-05-02 05:19:22 Error: EACCES: permission denied, mkdir 'app'
2024-05-02 05:19:22     at Object.mkdirSync (node:fs:1398:3)
2024-05-02 05:19:22     at Object.mkdirSync (pkg/prelude/bootstrap.js:1639:33)
2024-05-02 05:19:22     at /snapshot/lib/crunchy.js
2024-05-02 05:19:22     at Array.forEach (<anonymous>)
2024-05-02 05:19:22     at Crunchy.<anonymous> (/snapshot/lib/crunchy.js)
2024-05-02 05:19:22     at Generator.next (<anonymous>)
2024-05-02 05:19:22     at fulfilled (/snapshot/lib/crunchy.js)
2024-05-02 05:19:22     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024-05-02 05:19:22   errno: -13,
2024-05-02 05:19:22   syscall: 'mkdir',
2024-05-02 05:19:22   code: 'EACCES',
2024-05-02 05:19:22   path: 'app'
2024-05-02 05:19:22 }
2024-05-02 05:19:22 
2024-05-02 05:19:22 Node.js v18.18.2

Additional Information

I am using the docker image that I compiled myself from the master branch.

The error most likely comes from the fact that I changed the user who is runing the the app within the container. However, it somehow manages to download all the parts and to create the directory structure for it.
The error only appears at the end, when it tries to mux the files together.

I already tried and succeded to fix this by letting the container run as root. But this is not a acceptable solution for me as it runs on my self hosted server and is available from the internet.

### Program version master (2488edc0243d8bef88db805aca0997bd23a4f41) ### Operating System Linux ### Type GUI ### Service Crunchyroll ### Command used aniDL ### Show ID G60914JM6 ### Episode 1 ### Console Output ```Shell 2024-05-02 05:19:22 Resuming download from part 251... 2024-05-02 05:19:22 50 of 358 parts downloaded [14%] (3s | 6.5Mb/s) 2024-05-02 05:19:22 100 of 358 parts downloaded [28%] (3s | 6.6Mb/s) 2024-05-02 05:19:22 150 of 358 parts downloaded [42%] (2s | 5.9Mb/s) 2024-05-02 05:19:22 node:fs:1398 2024-05-02 05:19:22 handleErrorFromBinding(ctx); 2024-05-02 05:19:22 ^ 2024-05-02 05:19:22 2024-05-02 05:19:22 Error: EACCES: permission denied, mkdir 'app' 2024-05-02 05:19:22 at Object.mkdirSync (node:fs:1398:3) 2024-05-02 05:19:22 at Object.mkdirSync (pkg/prelude/bootstrap.js:1639:33) 2024-05-02 05:19:22 at /snapshot/lib/crunchy.js 2024-05-02 05:19:22 at Array.forEach (<anonymous>) 2024-05-02 05:19:22 at Crunchy.<anonymous> (/snapshot/lib/crunchy.js) 2024-05-02 05:19:22 at Generator.next (<anonymous>) 2024-05-02 05:19:22 at fulfilled (/snapshot/lib/crunchy.js) 2024-05-02 05:19:22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { 2024-05-02 05:19:22 errno: -13, 2024-05-02 05:19:22 syscall: 'mkdir', 2024-05-02 05:19:22 code: 'EACCES', 2024-05-02 05:19:22 path: 'app' 2024-05-02 05:19:22 } 2024-05-02 05:19:22 2024-05-02 05:19:22 Node.js v18.18.2 ``` ### Additional Information I am using the docker image that I compiled myself from the master branch. The error most likely comes from the fact that I changed the user who is runing the the app within the container. However, it somehow manages to download all the parts and to create the directory structure for it. The error only appears at the end, when it tries to mux the files together. I already tried and succeded to fix this by letting the container run as root. But this is not a acceptable solution for me as it runs on my self hosted server and is available from the internet.
Jaynator495 commented 2024-05-02 14:49:44 +00:00 (Migrated from github.com)

You need to change the permission/ownership of the output folder to your user, otherwise, it will fail as you have seen.

You need to change the permission/ownership of the output folder to your user, otherwise, it will fail as you have seen.
abaurens commented 2024-05-02 20:47:19 +00:00 (Migrated from github.com)

Yes, that's what I did as a workaround.
However, since the app manages to download the parts, and to generate the subdirectories,
it means it should already be able to work in that directory without me having to modify the docker image.

The /app directory doesn't have write rights and ther's basically no reason for which the app would have exec an mkdir command on that path in the first place since it always exist..

Yes, that's what I did as a workaround. However, since the app manages to download the parts, and to generate the subdirectories, it means it should already be able to work in that directory without me having to modify the docker image. The `/app` directory doesn't have write rights and ther's basically no reason for which the app would have exec an `mkdir` command on that path in the first place since it always exist..
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Creepso/multi-downloader-nx#680
No description provided.