Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Update incoming_form.js #269

wants to merge 1 commit into from

4 participants

Titus Tienaah Felix Geisendörfer shaoman swayok
Titus Tienaah

fixing, fs: missing callback Error: ENOENT, unlink

Titus Tienaah intdxdt Update incoming_form.js
fixing, fs: missing callback Error: ENOENT, unlink
Felix Geisendörfer

Can you provide a test case for this?


Can you help me?
when I use the form.parse always occur “[Error : Request aborted ]” ? Can you tell me why?
will my code just from here


also when I debug into the parse method , I want to watch "this" is what And
happened this :

There was an internal error in Node's debugger. Please report this bug.
Cannot convert object to primitive value
TypeError: Cannot convert object to primitive value
at _debugger.js:1318:43
at Array.forEach (native)
at wait (_debugger.js:1317:22)
at _debugger.js:1309:7
at _debugger.js:1005:7
at _debugger.js:404:5
at Client._onResponse (_debugger.js:260:5)
at Protocol.execute (_debugger.js:134:14)
at Client. (_debugger.js:175:14)
at Client.EventEmitter.emit (events.js:95:17)

Titus Tienaah

form.parse works as expected, i am not sure how you arrived at the bug.
i tried the example from your link :
here is the source :
works as expected.


Getting fs: missing callback Error: ENOENT, unlink /path/to/uploaded/file
Can't really find out why this is happening. At least this fix seems to be fixing crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 7, 2014
  1. Titus Tienaah

    Update incoming_form.js

    intdxdt authored
    fixing, fs: missing callback Error: ENOENT, unlink
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 1 deletion.
  1. +13 −1 lib/incoming_form.js
14 lib/incoming_form.js
@@ -279,7 +279,19 @@ IncomingForm.prototype._error = function(err) {
if (Array.isArray(this.openedFiles)) {
this.openedFiles.forEach(function(file) {
- setTimeout(fs.unlink, 0, file.path);
+ //setTimeout(fs.unlink, 0, file.path); //BUG
+ var unlink_cb = function () {
+ fs.unlink(file.path, function (ex) {
+ if (ex) {
+ console.log('incomplete file unlink error : modified formidable : titus');
+ }
+ })
+ };
+ fs.exists(file.path, function (exists) {
+ if (exists) {//attemp unlink on incomplete files
+ unlink_cb();
+ }
+ });
Something went wrong with that request. Please try again.