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.

Return the transmission when the large file is uploaded

See original GitHub issue
  Error: Request aborted
      at IncomingMessage.<anonymous> (/web/elris/Server/node_modules/formidable/lib/incoming_form.js:122:19)
      at IncomingMessage.emit (events.js:182:13)
      at abortIncoming (_http_server.js:444:9)
      at socketOnClose (_http_server.js:437:3)
      at Socket.emit (events.js:187:15)
      at TCP._handle.close [as _onclose] (net.js:595:12)

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:406:19)
    at clearBuffer (_stream_writable.js:540:7)
    at onwrite (_stream_writable.js:465:7)
    at fs.js:2329:5
    at FSReqWrap.wrapper [as oncomplete] (fs.js:2295:5)
Emitted 'error' event at:
    at onwriteError (_stream_writable.js:425:12)
    at onwrite (_stream_writable.js:456:5)
    at doWrite (_stream_writable.js:406:11)
    at clearBuffer (_stream_writable.js:540:7)
    [... lines matching original stack trace ...]
    at FSReqWrap.wrapper [as oncomplete] (fs.js:2295:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lovelyz@1.0.0 dev: `node ./app/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lovelyz@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/miaomunmun/.npm/_logs/2018-06-18T12_34_00_801Z-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tunnckoCorecommented, Jun 24, 2018

Sounds pretty familiar - https://github.com/tunnckoCore/koa-better-body/issues/109. But you said 500kb, not 500mb. Anyway.

The default maxFileSize was bumped to 200mb in v1.2.1? Try adding maxFileSize option manually?

0reactions
chitkarian-19commented, Nov 10, 2022

@AmeerAsif777 are u passing multipart form data, I mean are u passing any image/video in the form request body ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return the transmission when the large file is uploaded #470
I guess the issue can be from incoming_form.js error handler. When error happens, it destroys the file streams - see lines marked with...
Read more >
How to Upload Large Files Using Plain JavaScript
Pause upload​​ After talking about generating hash and file transfer in seconds, go back to the breakpoint to resume the transfer. Breakpoint ...
Read more >
How does HTTP Deliver a Large File? | by Carson - Medium
When sending a response, the server adds a header Transfer-Encoding: chunked , letting the browser know that data is transmitted in chunks.
Read more >
Uploading large files with JavaScript: File.slice() to the rescue!
When you watch a streaming video from api.video, Netflix or YouTube, the large video files are broken into smaller segments for transmission.
Read more >
What is the best approach to handle large file uploads in a ...
If you don't need any processing at all, your best bet may be to simply go straight to S3 with them. This solution...
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