Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 2.1.0 caused a regression with uploadPart #459

Closed
andrewrk opened this issue Jan 9, 2015 · 7 comments
Closed

release 2.1.0 caused a regression with uploadPart #459

andrewrk opened this issue Jan 9, 2015 · 7 comments

Comments

@andrewrk
Copy link

andrewrk commented Jan 9, 2015

node-s3-client calls aws sdk uploadPart with Body set to a stream.Readable. In version 2.0.31, this works fine. In 2.1.0 and later, this function never calls the callback.

@lsegal
Copy link
Contributor

lsegal commented Jan 9, 2015

Hey @andrewrk. Can you provide a minimal reproduction case for this? Also Node.js version? I'm not able to reproduce it here on Node.js 0.10.35 (or 0.10.28 for what it's worth):

// test.js
var fs = require('fs');
var AWS = require('aws-sdk');
var s3 = new AWS.S3({params: {Bucket: process.env.BUCKET, Key: process.env.KEY}});
var body = fs.createReadStream('bigfile');

s3.createMultipartUpload(function(err, data) {
  if (err) throw err;
  console.log("Created MP upload", data.UploadId);
  s3.uploadPart({UploadId: data.UploadId, PartNumber: 1, Body: body}, function(err2, data2) {
    if (err2) throw err2;
    console.log("Uploaded a part.");
    s3.abortMultipartUpload({UploadId: data.UploadId}).send();
  });
});

Output from run:

$ BUCKET=MYBUCKET KEY=bigfile node test
Created MP upload g5k3kBtmRguJmd6tPBJhjtJEtjjUVYYV.9Dx45.SVK...
Uploaded a part.

@andrewrk
Copy link
Author

Thanks for keeping the issue open for 10 days while I was busy.

When I run this example code, I do not get to the "Created MP upload" console.log. It hangs forever on s3.createMultipartUpload.

$ uname -a
Linux andy-bx 3.16.0-25-generic #33-Ubuntu SMP Tue Nov 4 12:06:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v0.10.29
$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:    14.10
Codename:   utopic

v0.10.29 is not the newest 0.10.x version, but sadly this is the version that is available in Ubuntu and Debian's package managers, so it's an important version to support.

@lsegal
Copy link
Contributor

lsegal commented Jan 20, 2015

Can't seem to reproduce this with 0.10.29 either:

$ nvm use 0.10.29
Now using node v0.10.29
$ BUCKET=MYBUCKET KEY=bigfile node test
Created MP upload MVLMDgkKJnhSGu1OFO6CzvioJe....
Uploaded a part.

Haven't tried this on Ubuntu, though... this is on Mac OS X 10.10. I'll give this a shot on a Ubuntu instance a little later today.

@andrewrk
Copy link
Author

Got the same behavior with node v0.10.35 (latest stable)

@AdityaManohar
Copy link
Contributor

@andrewrk
I just ran this sample on an Ubuntu install and I'm still not able to reproduce the error (SDK v2.1.16).

$ BUCKET=aditm KEY=upload node s3_upload.js
Created MP upload mB_dz6EarM4gy63XZaWaD1W0Rk9h3j ...
Uploaded a part.

$ uname -a
Linux ip-255.255.255.255 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ node -v
v0.10.35

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty

Is there any other information that you can provide that can help reproduce your issue?

@lsegal
Copy link
Contributor

lsegal commented May 4, 2015

Marking this as closed since we could not reproduce on Ubuntu with the latest version of the SDK. Note that we did find similar reports specific to the usage of custom mocks like fake-s3 (via #525). It's possible that if you were running into this with a mock like fake-s3 or similar, that this might be an issue specific to that library. One of the changes in the SDK is that we rely on Expect: 100-continue support for files >= 1MB, and this must be supported by your test endpoint as well, if you are using a mock.

Feel free to re-open if you have other info to help narrow down this issue.

@lock
Copy link

lock bot commented Sep 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants