Sebelino / aax-to-mp3

Dockerized web service for converting Audible AAX (or AAXC) files to MP3
https://hub.docker.com/r/sebelino/aax-to-mp3
GNU General Public License v3.0
9 stars 2 forks source link

Maximal file size #2

Closed dvirginz closed 1 year ago

dvirginz commented 1 year ago

Thank you for this repo, and for providing a docker image.

The app crashes for oversized aax. Is there a reason for that constraint? as it is a local service and the only resources are my own?

Error Error: maxFileSize exceeded, received 209747745 bytes of file data
    at Stream.<anonymous> (/usr/src/app/node_modules/formidable/lib/incoming_form.js:222:19)
    at Stream.emit (events.js:209:13)
    at MultipartParser.parser.onPartData (/usr/src/app/node_modules/formidable/lib/incoming_form.js:387:14)
    at callback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:102:31)
    at dataCallback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:112:11)

Thanks!

Sebelino commented 1 year ago

Hi, I think that's simply the default limit of the formidable library. I'll see if I can increase the limit.

Sebelino commented 1 year ago

Should work now; please reopen if it doesn't.

$ docker pull sebelino/aax-to-mp3:latest@sha256:2a0940d53e229ae5718dcc644f70ea7c0943f57c647992a7bd811a1681bf6d02
$ docker run -p 80:80 sebelino/aax-to-mp3:latest
dvirginz commented 1 year ago

@Sebelino Your help and responsiveness are admirable for an open-source free-time project. Thanks!

I believe another library requires the change

Digest: sha256:2a0940d53e229ae5718dcc644f70ea7c0943f57c647992a7bd811a1681bf6d02
Status: Downloaded newer image for sebelino/aax-to-mp3@sha256:2a0940d53e229ae5718dcc644f70ea7c0943f57c647992a7bd811a1681bf6d02
docker.io/sebelino/aax-to-mp3:latest@sha256:2a0940d53e229ae5718dcc644f70ea7c0943f57c647992a7bd811a1681bf6d02
(base) dvirginzburg@dvirs-MBP ~ % docker run -p 80:80 sebelino/aax-to-mp3:latest 
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Running on http://0.0.0.0:80
http/ws server listening on 80
Error Error: maxFileSize exceeded, received 209731348 bytes of file data
    at Stream.<anonymous> (/usr/src/app/node_modules/formidable/lib/incoming_form.js:222:19)
    at Stream.emit (events.js:209:13)
    at MultipartParser.parser.onPartData (/usr/src/app/node_modules/formidable/lib/incoming_form.js:387:14)
    at callback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:102:31)
    at dataCallback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:115:11)
    at MultipartParser.write (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:237:15)
    at IncomingForm.write (/usr/src/app/node_modules/formidable/lib/incoming_form.js:159:34)
    at IncomingMessage.<anonymous> (/usr/src/app/node_modules/formidable/lib/incoming_form.js:125:12)
    at IncomingMessage.emit (events.js:209:13)
    at IncomingMessage.Readable.read (_stream_readable.js:520:10)
/usr/src/app/server.js:211
            throw err
            ^

Error: maxFileSize exceeded, received 209731348 bytes of file data
    at Stream.<anonymous> (/usr/src/app/node_modules/formidable/lib/incoming_form.js:222:19)
    at Stream.emit (events.js:209:13)
    at MultipartParser.parser.onPartData (/usr/src/app/node_modules/formidable/lib/incoming_form.js:387:14)
    at callback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:102:31)
    at dataCallback (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:115:11)
    at MultipartParser.write (/usr/src/app/node_modules/formidable/lib/multipart_parser.js:237:15)
    at IncomingForm.write (/usr/src/app/node_modules/formidable/lib/incoming_form.js:159:34)
    at IncomingMessage.<anonymous> (/usr/src/app/node_modules/formidable/lib/incoming_form.js:125:12)
    at IncomingMessage.emit (events.js:209:13)
    at IncomingMessage.Readable.read (_stream_readable.js:520:10)
Sebelino commented 1 year ago

Ok, interesting. I cannot reproduce it with a large file, and the stacktrace above looks almost the same as before.

Could you confirm that you are running the correct image by running:

docker run -p 80:80 sebelino/aax-to-mp3:latest@sha256:2a0940d53e229ae5718dcc644f70ea7c0943f57c647992a7bd811a1681bf6d02

or:

docker image ls | grep aax-to-mp3
Sebelino commented 1 year ago

Or alternatively:

docker run -p 80:80 sebelino/aax-to-mp3:v1.0.1
dvirginz commented 1 year ago

You are too good:)

It was indeed my mistake not pulling the newer docker.

The library works, tested on 250MB file from audible.