Coder Social home page Coder Social logo

node 14 about async-busboy HOT 18 CLOSED

m4nuc avatar m4nuc commented on June 15, 2024
node 14

from async-busboy.

Comments (18)

alqu avatar alqu commented on June 15, 2024 9

Thanks for merging @amit777. Please update the npm package :-)

from async-busboy.

Sceat avatar Sceat commented on June 15, 2024 5

still hang on node 16

from async-busboy.

m4nuC avatar m4nuC commented on June 15, 2024 4

1.1.0 published to NPM. Apologies to everyone for the delay

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024 2

Hi @FredericHeem and @alqu would you mind testing my fork with the fixes here: https://github.com/amit777/async-busboy

It seems to work for me.

from async-busboy.

ogarich89 avatar ogarich89 commented on June 15, 2024 1

Same problem. Had to use @koa/multer =(

from async-busboy.

alqu avatar alqu commented on June 15, 2024

Same here. Any solution in sight?

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024

Also noticed upload issue on node14. Works on node 12. Using v1.0.1

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024

I've been debugging this. While I thought the code would always hang, I did actally see it succesfully work twice while I was putting console logs in.. I thought maybe the console.log was somehow causing it to start working, but it doesn't seem to be the case.. so it seems like it will fail most of the time but may occasionally work.

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024

ok.. I think i've found the culprit. busboy's "close" event seems to be firing before "finished". When this happens, the finished event gets unsubscribed to, and the Promise is not resolved. I'm not sure if some assumption changed in Node14 streams about the order of events.

busboy.on('close', cleanup);

from async-busboy.

imox2 avatar imox2 commented on June 15, 2024

@amit777 yep, thats the culprit. I too found that

Screenshot 2020-09-18 at 2 17 29 AM

Also, don't you think
busboy.on('close', cleanup) is required for some other case. So maybe removing that will solve this case but break anything else?

Also, I was more interested in finding why is close called early. Maybe something changed in node 14

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024

in my pull request I did remove the .on('close') since it only calls cleanup(). Cleanup looks like it would get call anyway later by another event, so I think it may not be impactful, but I'm not sure.

Out of curious, what tool did you use that generated that output from your screenshot?

from async-busboy.

alqu avatar alqu commented on June 15, 2024

Hi @FredericHeem and @alqu would you mind testing my fork with the fixes here: https://github.com/amit777/async-busboy

It seems to work for me.

I tested it locally and on a production server - it works fine, no problems so far.

from async-busboy.

FredericHeem avatar FredericHeem commented on June 15, 2024

@amit777 thanks a lot, confirmation from my side your fork is working fine. Waiting for the package to be published.

from async-busboy.

lehmamic avatar lehmamic commented on June 15, 2024

have the same problem, waiting as well...

from async-busboy.

fjeddy avatar fjeddy commented on June 15, 2024

Guess we can consider this repo dead.

from async-busboy.

amit777 avatar amit777 commented on June 15, 2024

@m4nuC would it be possible to publish the updated package on npm? It looks like a lot of testers confirmed it works.

from async-busboy.

m4nuC avatar m4nuC commented on June 15, 2024

@amit777 on it. Sorry for the delay

from async-busboy.

Uzlopak avatar Uzlopak commented on June 15, 2024

Do you set autoDestroy to false?

from async-busboy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.