Aws-sdk-ios: AWSS3TransferUtility error handling

Created on 1 Nov 2017  路  9Comments  路  Source: aws-amplify/aws-sdk-ios

  • What service are you using? AWSS3TransferUtility
  • In what version of SDK are you facing the problem? Latest
  • Is the issue limited to Simulators / Actual Devices? No
  • Can your problem be resolved if you bump to a higher version of SDK? No
  • Is this problem related to specific iOS version? No
  • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks? Cocoapods
  • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.
  1. AWSS3TransferUtility does not capture errors received from S3 and pass them back to the caller in a useable manner.

  2. AWSS3TransferUtility ignores all responses from S3 when doing uploads.

  3. AWSS3TransferUtility does not log any errors received from S3.

I have addressed these issues in a Pull Request (https://github.com/aws/aws-sdk-ios/pull/666) that I originally created on May 4, but that request has not been reviewed/merged. I am creating this issue to try to increase visibility to the PR and hopefully get it reviewed and merged.

s3

Most helpful comment

It seems we are facing a similar issue.

A comprehensive investigation showed that poor network conditions leads to the following problem:
The upload of a file (more precisely a picture from 100 KB to 1MB) apparently completes without an error, but the supposedly uploaded file is in fact absent from the S3 bucket.
However nothing indicates that the upload actually failed.

My config. :

  • Service AWSS3TransferUtility
  • Version 2.3.6
  • Device or Emulator
  • No specific iOS version
  • CocoaPods
  • How to reproduce it:
  • Use AWSS3TransferUtility class to upload several files of ~ 500KB
  • Make your network condition poor (a maximum 200 kb/s upload rate should be ok, with possibly some losses)
  • Observe the bucket you are uploading to with the S3 dashboard.
  • Notice that some of your files has not been uploaded whereas the SDK did not raise any error.

@k4ety's PR (https://github.com/aws/aws-sdk-ios/pull/666) may fix this issue (I have not tried, though).

Another question is about the reason for the failure of the upload. By using AWSS3TransferUtilityUploadProgressBlock, we observe that the upload seems to complete successfully in terms of bytes sent, but as said earlier the file cannot be found in the bucket. We thought about a timeout-related issue (cf. https://github.com/aws/aws-sdk-js/issues/683), but could not be definitive about it for now.

Any insight would be greatly appreciated :)

All 9 comments

It seems we are facing a similar issue.

A comprehensive investigation showed that poor network conditions leads to the following problem:
The upload of a file (more precisely a picture from 100 KB to 1MB) apparently completes without an error, but the supposedly uploaded file is in fact absent from the S3 bucket.
However nothing indicates that the upload actually failed.

My config. :

  • Service AWSS3TransferUtility
  • Version 2.3.6
  • Device or Emulator
  • No specific iOS version
  • CocoaPods
  • How to reproduce it:
  • Use AWSS3TransferUtility class to upload several files of ~ 500KB
  • Make your network condition poor (a maximum 200 kb/s upload rate should be ok, with possibly some losses)
  • Observe the bucket you are uploading to with the S3 dashboard.
  • Notice that some of your files has not been uploaded whereas the SDK did not raise any error.

@k4ety's PR (https://github.com/aws/aws-sdk-ios/pull/666) may fix this issue (I have not tried, though).

Another question is about the reason for the failure of the upload. By using AWSS3TransferUtilityUploadProgressBlock, we observe that the upload seems to complete successfully in terms of bytes sent, but as said earlier the file cannot be found in the bucket. We thought about a timeout-related issue (cf. https://github.com/aws/aws-sdk-js/issues/683), but could not be definitive about it for now.

Any insight would be greatly appreciated :)

Hi @k4ety and @DemisB, Thanks for reporting to us. We are looking into the PR #666. I have two entered comments on the review.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Up

I have exacly the same issue but with downloading images ~500 KB.

666 has been merged and released as part of rev 2.6.18.

Hi @kvasukib @cbommas , we're still facing this issue where transferUtility never returns an error. For e.g., if network is gone, the SDK method seems to wait for an indefinite time and never really returns any error. It resumes the task once the network is restored. We're using the iOS SDK - S3 pods version 2.6.35.

@pothunoorisk Please update your SDK to the latest version (the latest is 2.9.9), and if you are still seeing problems, open a new issue.

Hi @palpatim , we are still facing this problem even after updating SDK to v2.9.9. This problem is more likely for bad / no network scenarios. I saw one related thread which is still open. Do we have any solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pawlowskialex picture pawlowskialex  路  4Comments

minhthuc251 picture minhthuc251  路  4Comments

aymericio picture aymericio  路  5Comments

cornr picture cornr  路  4Comments

mohab2014 picture mohab2014  路  4Comments