question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

saveRequestFiles hangs for some fields

See original GitHub issue

🐛 Bug Report

I send a simple multipart request with just one file and consume them with req.saveRequestFiles(). For some files it works, but for some other files never resolves. It seems that the code hangs here https://github.com/fastify/fastify-multipart/blob/5ca152453fc08a36f0ccd943af9f574db52526e7/index.js#L502 after successfully processing the file.

To Reproduce

Steps to reproduce the behavior:

const files = await req.saveRequestFiles();

Expected behavior

Does not hang

Your Environment

  • node version: 14
  • fastify version: 3.5.1
  • os: Linux

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mcollinacommented, Nov 12, 2020

I think we can just workaround it in here by setting ._writableState.autoDestroy = false if it is true. @vkurchatkin could you make a PR to this repo?

1reaction
mcollinacommented, Nov 10, 2020

This looks a lot like a bug in pipeline 😦 and node core. Let me also ping @ronag who worked on that lately.

Would you be able to start peeling the onion and get to a reproducible case without the use of fastify or busboy?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to save UploadFile in FastAPI - Stack Overflow
Background. UploadFile is just a wrapper around SpooledTemporaryFile , which can be accessed as UploadFile.file . SpooledTemporaryFile() [.
Read more >
fastify-multipart - npm
Accumulate whole file in memory; Mode to attach all fields to the request body; Tested across Linux/Mac/Windows. Under the hood it uses busboy....
Read more >
Request hangs in browser - ASP.NET Discussion Boards ...
I have an ASP.net\AJAX 4.0 forms application that is having a performance issue. The app is hosted on go daddy shared hosting servers....
Read more >
Uploading Files - Patrick's Software Blog
Introduction. In this blog post, I'll demonstrate how to upload files to a Flask application using the Flask-WTF module (for handling forms) ...
Read more >
Web Connection 7.15 Release Notes - West Wind Technologies
The old Save Request Files checkbox and Display Request buttons have been ... There's a new Request Info page that shows some summary ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found