formidable icon indicating copy to clipboard operation
formidable copied to clipboard

Issue when parsing large files

Open maximedupre opened this issue 8 years ago • 5 comments

I don't know the inner workings of the problem, because I didn't build the library where the error is coming from, but please see https://github.com/tunnckoCore/koa-better-body/issues/109.

maximedupre avatar Oct 27 '17 03:10 maximedupre

Yup. It seems like problem in node-formidable. And if this helps to anyone, here's explanation.

In the given issue, there is really well-known and all loved "cannot read of undefined"

TypeError: Cannot read property 'fields' of undefined

Yep, but it isn't a problem in my code, because in that line the result variable must be an object with fields and files properties which comes directly when "end" event of Formidable is fired here.

Now i'm starting to think that it not even goes to there, but probably aborted or error event is fired.

Yes, i should probably add one try catch block there so we can debug more. Btw, @maximedupre you can try locally and see what is the real error. I'm sure that one of above events are fired.

tunnckoCore avatar Oct 27 '17 10:10 tunnckoCore

The onerror event handle of koa-better-body is being fired with the above error.

maximedupre avatar Oct 27 '17 19:10 maximedupre

Ssstrange. I seriously think that the problem is here, but i'll check what i can do in my lib as soon as i get a bit more time.

tunnckoCore avatar Oct 27 '17 20:10 tunnckoCore

Is it an issue inside koa-better-body or formidable ?

GrosSacASac avatar Dec 27 '20 20:12 GrosSacASac

It cannot be at koa-better-body for sure. I don't do anything specific and spectacular there, just calling Formidable (.parse without callback).

tunnckoCore avatar Jan 07 '21 00:01 tunnckoCore