Comments (4)
+1 I have similar issues...
from aws-sdk-ios-v1.
Apologies for the lack of contact on this issue. Can you clarify how you're using the library? Specifically:
- Are you using the low level AmazonS3Client or S3TransferManager?
- You indicated that you queue up requests and process them serially, how are you accomplishing this?
- What region is your bucket in? Does this happen with other buckets?
- Are these uploads done over Wifi or cellular?
- What version of iOS are you targeting and what version is running on the device?
Given that we're relying on the behavior of NSURLConnection to handle connections we may need to follow up with Apple, but if we can narrow down the cause that will go a long way to being able to file a report if necessary.
from aws-sdk-ios-v1.
Closing issue due to lack of follow up. Please feel free to reopen if you continue to have the issue.
from aws-sdk-ios-v1.
I ran into the same issue today and it looks like this type of error is happening to non-iOS S3 clients, too.
The article "Broken Pipe Error when using Boto + S3" at http://reterwebber.wordpress.com/2013/08/22/broken-pipe-error-when-using-boto-s3/ lead me to the solution that worked for me, too:
Tell the S3 library which region (host) you are using.
@turacma, to answer your questions:
- Happened with both AmazonS3Client and S3TransferManager
- eu-west-1 (ireland)
- Over Wifi, haven't tested otherwise.
- Simulator running iOS 7.0.4, built against SDK 7.
Incidentally I ran into the same issue last week when using http://s3tools.org/s3cmd (which is written in python) while writing into my Ireland located bucket. The symptom (Broken Pipe) was the same, the solution (explicit region host selection) as well.
Here is the code I used:
- (void) uploadFileToS3
{
// NSString* hostname = @"s3.amazonaws.com"; // Triggered "Broken Pipe" error!
NSString* hostname = @"s3-eu-west-1.amazonaws.com";
NSString* bucketName = @"iosbucket";
NSString* accessKey = @"XXX";
NSString* secretKey = @"YYY";
NSString* localImageName = @"galaxy.jpg"; // ~15MB
NSString* keyName = @"galaxy.jpg";
AmazonS3Client* s3 = [[AmazonS3Client alloc] initWithAccessKey:accessKey withSecretKey:secretKey];
S3PutObjectRequest* por = [[S3PutObjectRequest alloc] initWithKey:keyName inBucket:bucketName];
por.data = UIImageJPEGRepresentation([UIImage imageNamed:localImageName], 0.8);;
por.contentType = @"image/jpeg";
por.hostName = hostname;
BOOL useTransferManager = YES;
if (useTransferManager)
{
S3TransferManager* tm = [S3TransferManager new];
tm.s3 = s3;
[tm upload:por];
}
else
{
[s3 putObject:por];
}
}
from aws-sdk-ios-v1.
Related Issues (20)
- Exceptions should be used for programming/unexpected runtime errors only, not error conditions HOT 1
- S3 server throws 403 error if Date Header for a S3GetObjectRequest is more than 15 minutes old. HOT 2
- S3TransferManager does not resume data uploads after pause / resume HOT 2
- Weird import issues when used via CocoaPods HOT 3
- Delegate method didFailWithError is not called on failure HOT 1
- Support 64 bits architectures HOT 3
- Crash after canceling S3 GetObject request in S3TransferManager HOT 7
- S3 single part throttling stream uploading ? HOT 1
- SIGSEGV [S3Response connection:didReceiveResponse:] HOT 2
- use cocoapods HOT 4
- Can't upload file larger than 196608 bytes to S3 HOT 7
- Support ConditionalOperator in DynamoDBScanRequest? HOT 1
- Large file multi-part upload in version 1.7.1 with S3TransferManager HOT 1
- Mac version HOT 3
- Plans to implement SSE-C ? HOT 3
- Invalid request serialization HOT 3
- Threading issue HOT 5
- Difference between 1.7.0 and 2.0.6 SDK Versions HOT 1
- Crashes in AWSURLSessionManager HOT 13
- Crash writing file in AWSURLSessionManager HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-ios-v1.