-
Notifications
You must be signed in to change notification settings - Fork 549
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
S3 TransferUtility onStateChanged not called although onProgressChanged indicates completed upload #120
Comments
@kwatra What's the state of the transfer? Is the upload successful? Would you please increase socket timeout via ClientConfiguration? |
@fosterzhang Thanks for the quick response. No the upload is not successful -- I confirmed via the S3 console that the file was not uploaded. Sure, I will try increasing the socket timeout. However I am worried that it may just decrease the frequency of this error, but the underlying problem will still exist. The main problem is that since the TransferObserver doesn't fire any error in this case, I have no way of knowing when to trigger a retry. Thanks. |
@kwatra Thanks for the information. |
@fosterzhang Thanks for the update. Will look forward to the fix. By any chance is this bug specific to 2.2.14, and would reverting to 2.2.13 help for the time being? Thanks. |
@kwatra it's a general bug that exists in all versions. It's somehow tricky to fix. I have a fix in mind, but it causes unwanted behaviors. For now, I suggest you increase the socket timeout if it happens often. |
Thanks @fosterzhang. Will look forward to the fix. |
@fosterzhang I've been having the same issue trying to test a large (500MB) upload over a relatively slow connection (2Mb down/1Mb up). I see several SocketTimeOut exceptions but the transfer does continue. I'm using onProgressChanged to report the percent completed to a progress dialog, and on reaching 100% I notice in the Android Monitor that TransferService calls stopSelf, however when I examined the TransferObserver in a debugger, getTransferState returns IN_PROGRESS. As such onStateChanged never fires (and thus I'm unable to report to the user that the transfer was unsuccessful and close the progress dialog). When I look at the bucket, the file has not been uploaded. I've set the socket timeout to 0 (infinity) just as a test, and the upload is sometimes able to complete (though sometimes it fails but at least it does change the state to fail). Hope this information is useful, please let me know if you'd like any more details! |
@jsarabia1247 Thanks for the information. I'll address this ASAP. |
Yep, this is directly connected to my problem also -> #119 I've solved it by increasing that timeout, for now. ps. Thanks for responding so quickly :) |
@fosterzhang and all, Thanks for these discussion, we are also facing the same problem. Here are some more details, these may help you to figure out the exact problem I believe,
This is the reason still IN_PROGRESS state is notified by the TransferObserver. |
@kwatra @jsarabia1247 This is fixed in v2.2.16. For detailed changes, please refer to the change log. |
Great. Thanks! |
still facing this issues with aws sdk 2.4.1 |
still facing the issue in sdk 2.6.6 |
Every once in a while when I upload a file to S3 via TransferUtility, the TransferObserver's onStateChanged is not called at all, even though onProgressChanged indicates that the upload has been completed. This is usually accompanied by an error log indicating a time out, which looking at the code suggests should just trigger a retry.
Example of last few logs:
onProgressChanged call with params: id: 7, bytesCurrent: 15244198, bytesTotal: 15244198
Few notes:
The text was updated successfully, but these errors were encountered: